Command-line options
Eclipse Atesor™ has one command. The .deb package installs it as atesor-ai, and a source checkout runs it as python3 main.py. Both forms take the same options and return the same exit codes. This page lists every option that main.py accepts, with its argument, its default and its effect, and the order in which Atesor processes them.
What is the command syntax?
Section titled “What is the command syntax?”The usage text in main.py is:
atesor-ai --repo URL [options] atesor-ai --setup-only | --cleanup | --clean-workspaceA port needs --repo. These commands do not need it:
--setup-only--rebuildwithout--repo--cleanupand--clean-image--clean-workspace--preflight--probe
If you give no --repo and none of these commands, Atesor prints ERROR: --repo argument is required, prints the help, and exits with code 1.
The built-in help puts the options in four groups: porting, performance, sandbox and other. After the options, the help prints example commands and a short list of environment variables. This page groups the options by task.
| Flag | Argument | Default | Effect |
|---|---|---|---|
-r, --repo |
URL |
none | The repository to port. |
Rules for --repo:
- The URL must start with
http://orhttps://. - After the scheme, the URL can use only letters, digits and the characters
._~:/?#@!+,=%-. - Atesor rejects any other value with
ERROR: unsupported or unsafe repository URLand exit code 1.
Atesor derives the repository name from the last segment of the URL and removes a .git suffix. For a generic last segment, Atesor adds the owner in front: cli, core, src, app, main, client, server and lib. For example, https://github.com/cli/cli gives cli-cli. The clone directory, the recipe cache key, the log files and the output files all use this name.
Platform and target
Section titled “Platform and target”| Flag | Argument | Default | Effect |
|---|---|---|---|
--platform |
NAME |
auto |
The sandbox distribution: alpine, debian, ubuntu or auto. |
--target |
NAME |
ATESOR_TARGET, else qemu |
Where the builds run: qemu or native. |
--container |
NAME |
the container name of the profile | The sandbox container name. Batch runs use it. |
--platform
Section titled “--platform”- A value other than
autosetsATESOR_PLATFORMfor the run. The flag wins over.env. ubuntuuses the same profile asdebian. The image, the container and the package names are the same.- With
autoon theqemutarget, Atesor uses a validATESOR_PLATFORMfirst. - Without one, Atesor reads
/etc/os-releasein the sandbox container. The container isATESOR_CONTAINER, elseatesor-ai-sandbox. - If that read fails or gives an unknown distribution, Atesor uses
alpine. - The
nativetarget does not detect the platform. Set--platformorATESOR_PLATFORM, or preflight rung 1 fails.
| Platform | Image | Container | Dockerfile (qemu) |
Dockerfile (native) |
|---|---|---|---|---|
alpine |
atesor-ai-sandbox:latest |
atesor-ai-sandbox |
Dockerfile |
Dockerfile |
debian, ubuntu |
atesor-ai-sandbox-debian:latest |
atesor-ai-sandbox-debian |
Dockerfile.debian |
Dockerfile.native |
--target
Section titled “--target”main.pyreads--targetbefore it parses the other options, becausesrc/config.pycomputes the workspace paths at import time.- The flag sets
ATESOR_TARGETand wins over.env. Both--target nativeand--target=nativework. When you give the flag two times, the last one wins. - Write the flag in full. The parser also accepts a short form such as
--targ native, but the early read does not. When the two values differ, Atesor printsERROR: write --target in full, for example --target native.and exits with code 1. - The
nativetarget needs the SSH settings. Refer to Environment variables and Native RISC-V machine.
--container
Section titled “--container”The flag sets ATESOR_CONTAINER for the run. --setup-only, --cleanup, --clean-image and the port all use this container name. batch_test.py gives each worker its own container with this flag, for example atesor-ai-sandbox-debian-w1.
Run control
Section titled “Run control”| Flag | Argument | Default | Effect |
|---|---|---|---|
-m, --max-attempts |
N (integer) |
5 |
The number of attempts before Atesor escalates the run. |
--force |
none | off | Ignore the recipe cache and run the full pipeline. |
--rebuild |
none | off | Rebuild the sandbox image before the run. |
--max-attempts
Section titled “--max-attempts”Atesor counts each recorded error as one attempt. When the count reaches N, the supervisor escalates the run and the exit code is 1. A build that succeeds always goes to the finish step, also when the count is at N. A value that is not an integer gives a parser error and exit code 2.
--force
Section titled “--force”Without --force, Atesor looks in the recipe cache before it checks the API key and before it starts the sandbox. A matching entry ends the run: Atesor writes <repo>_recipe.md from the cache and makes no LLM call. The entry must match the repository name and the sandbox. When the entry stores a repository URL, that URL must also match. With --force, Atesor skips this check and builds again. Refer to Recipe cache.
--optimize also skips this check, because performance mode needs a real build tree. Without --force, a cache entry with a verified verdict then becomes the build plan of the port. With --force, the agents plan the build again.
--rebuild
Section titled “--rebuild”The flag sets REBUILD_IMAGE=true.
- With
--repo, Atesor rebuilds the image of the active platform, then ports the repository. - The cache check comes first. A cache hit ends the run before the rebuild. Add
--forceto rebuild and port.--optimizealso skips the cache check. - Without
--repo, Atesor rebuilds the image and exits. - On the
qemutarget with--platform autoand no--container, a rebuild without--reporebuilds thealpinesandbox, then thedebiansandbox. - On the
nativetarget, podman builds the image on the machine.
Output
Section titled “Output”| Flag | Argument | Default | Effect |
|---|---|---|---|
--package |
none | off | After a successful build, write a zip with the recipe and the source tree. |
-v, --verbose |
none | off | Show the activity of the agents on the console. |
--package
Section titled “--package”- Atesor writes the zip when the final status is
SUCCESS. This includes a build that is not verified (exit code 3). The manifest in the zip records the verdict. - The zip goes to the
packages/directory of the workspace. Refer to Output files. - With
--optimize, the manifest has schema version 3. When performance mode accepts a tune, the zip also holds the files of that tune inoptimized/. - If the zip step fails, Atesor prints
Packaging FAILEDand exits with code 2. - On a cache hit, Atesor skips
--packageand prints a note, because no fresh source tree exists. Add--forceto build and package.
--verbose
Section titled “--verbose”Without the flag, the console shows the step and status lines, and log records of level ERROR only. With the flag, the console also shows log records of level DEBUG and the messages of each agent. The log file always records level DEBUG. The lines of the optimize step always show on the console, also without --verbose.
Performance mode
Section titled “Performance mode”Performance mode tries faster builds of a verified port for the machine that runs the build. Each candidate build is a “tune”: the verified build with other compiler flags or toolchain settings. Refer to Performance mode.
| Flag | Argument | Default | Effect |
|---|---|---|---|
--optimize |
none | off | After a verified port, build, check and measure tunes. |
--emulate-cpu |
MODEL |
ATESOR_QEMU_CPU, else none |
The QEMU_CPU model for --optimize and --probe on the qemu target. |
--probe |
none | off | Probe the machine in the sandbox, print the result, then exit. |
--optimize
Section titled “--optimize”- The optimize step runs after the finish step, so only a port with the status
SUCCESSreaches it. A port that fails or escalates does not. - The step needs the verdict
verified. For a port that is not verified, Atesor records the statusskippedand the reason. - The verified build stays the result of the port. Performance mode never changes the exit code of the port.
- Atesor skips the recipe cache check. Without
--force, a verified cache entry of the package becomes the build plan. Then the analyst and the scout make no LLM call. - Atesor applies the patches of that cache entry first. When the build fails, the fixer and the re-plan loop continue as usual.
- Atesor measures speed only on the
nativetarget. Onqemu, Atesor builds and checks each tune, but makes no speed claim. ATESOR_OPTIMIZE_BUDGETsets the time limit of the optimize step, in seconds. The default is 3600.- The console summary starts with a line
Optimized:that gives the answer, for exampleYES:orNO:. - On
native, Atesor removes the<repo>.opttree from the machine when the command ends. Add--packageto keep the files of an accepted tune. batch_test.pynever passes--optimize.
--emulate-cpu
Section titled “--emulate-cpu”- The value is a QEMU CPU model, for example
rva22u64. A model can also have properties, for examplerv64i,m=true,a=true,f=true,d=true,c=true,zba=true. - The value must start with a letter. It can use only letters, digits and the characters
_.,=+-, up to 512 characters in total. - For another value, Atesor prints an
ERROR:line that says the value is not a QEMU CPU model, and exits with code 1. - Atesor uses and checks the value only with
--optimizeor--probe. Without them, Atesor ignores the flag. - On
qemu, the flag wins overATESOR_QEMU_CPU. - The value
max, or no value, gives QEMU’smaxCPU. Atesor then builds no ISA tune, because no real board has that set of extensions. - On
native, Atesor ignores the flag and prints a warning. It ignoresATESOR_QEMU_CPUonnativewith no warning. - On a native machine,
--probeprints aQEMU model:line. That line gives an--emulate-cpuvalue that models the machine under QEMU.
--probe
Section titled “--probe”--proberuns alone. With--repo, Atesor printsERROR: --probe runs alone. Remove --repo, or remove --probe to port the repository.and exits with code 1.- Atesor does not check the API key for this command.
- Atesor sets up the sandbox first. On
native, preflight rungs 2 to 11 run before the setup. - The probe reads
/procand/sys, runs compiler checks, and runs test instructions in child processes. It does not change the machine. - Atesor prints the machine facts and the settings that performance mode derives from them. Then it writes
machine_profile_<target>.jsonto theoutput/directory, where<target>isqemuornative. - The exit code is 0 when the probe ran, else 1. On
native, the container stops when the command ends. - With
--rebuild, Atesor rebuilds the sandbox image before the probe. - Exception: on
qemuwith--platform autoand no--container,--probe --rebuildrebuilds both sandboxes and exits with no probe.
Setup and cleanup
Section titled “Setup and cleanup”| Flag | Argument | Default | Effect |
|---|---|---|---|
--setup-only |
none | off | Build the sandbox image if it is missing, start the container, then exit. |
--cleanup |
none | off | Stop and remove the sandbox container, then exit. |
--clean-image |
none | off | Also remove the sandbox image. It implies --cleanup. |
--clean-workspace |
none | off | Show the workspace size and delete the parts that you select. |
--setup-only
Section titled “--setup-only”- Atesor does not check the API key for this command.
--setup-onlywins over--repo. Atesor sets up the sandbox and does not port.- On
qemu, Atesor first looks for theqemu-riscv64handler in/proc/sys/fs/binfmt_misc. If the handler is missing, Atesor runsdocker run --privileged --rm tonistiigi/binfmt --install riscv64one time. - On
qemu, Docker builds the image forlinux/riscv64. Atesor creates the container with the memory limit8gand mounts the workspace at/workspace. - On
native, preflight rungs 2 to 11 run first. Podman builds the image on the machine, with a time limit of 5400 seconds. The container stops when the command ends.
--cleanup and --clean-image
Section titled “--cleanup and --clean-image”- Atesor uses the container name from
--containerorATESOR_CONTAINER, else the name of the profile. - With
--repoand without--rebuild, Atesor prints aNOTEthat it does not port the repository. - With
--rebuild, Atesor continues after the teardown. - On
native, preflight rungs 2 to 8 run first. Then podman on the machine removes the container, and the image for--clean-image.
--clean-workspace
Section titled “--clean-workspace”- Atesor prints the workspace location, the total size and the number of files.
- Atesor prints the size of each of these directories that exists:
repos,output,logs,.cacheandpatches. - Atesor asks for one choice:
1(repos/),2(output/),3(logs/),4(.cache/),5(all five directories) orq(quit). - Atesor deletes each selected directory and creates it again, empty.
Without an interactive terminal, Atesor cancels the cleanup. On native, a choice that includes repos also removes the cloned repositories in the work directory on the machine. Preflight rungs 2 to 10 run before that removal. This command always exits with code 0.
Debugging and help
Section titled “Debugging and help”| Flag | Argument | Default | Effect |
|---|---|---|---|
--preflight |
none | off | Check the native machine, then exit. |
--version |
none | off | Print atesor-ai <version>, then exit. |
-h, --help |
none | off | Print the help, then exit. |
--preflightruns all 11 preflight rungs and prints each result. The exit code is 0 when all rungs pass, else 1. On theqemutarget, Atesor prints a message and exits with code 1.--versionprints the value of__version__insrc/__init__.py. The release workflow writes the tag version into that file before it builds the.deb.--helpand--versionexit with code 0.
In what order does Atesor process the options?
Section titled “In what order does Atesor process the options?”- Atesor loads the
.envfiles and copies--targetintoATESOR_TARGET. --platform(other thanauto) setsATESOR_PLATFORM.--containersetsATESOR_CONTAINER.- Atesor compares
--targetwith the early read. Then preflight rung 1 checks the target settings. It runs for every command except--helpand--version, also onqemu. - With
--optimizeor--probe, Atesor checks the--emulate-cpuorATESOR_QEMU_CPUvalue. --probetogether with--repostops with code 1.--preflightruns and exits.- Atesor checks the
--repoURL. --cleanupand--clean-imagerun. They exit, unless--rebuildis set.--clean-workspaceruns and exits.- Without
--repo, a setup command or--probe, Atesor exits with code 1. - A rebuild of both
qemusandboxes runs and exits, when it applies. - The recipe cache check runs, unless
--setup-only,--forceor--optimizeis set. A hit exits. - On
native, preflight rungs 2 to 11 run. --probesets up the sandbox, probes the machine and exits.- Atesor checks the API key of the LLM provider. This step runs only for a port.
- Atesor sets up the sandbox.
--setup-only, and--rebuildwithout--repo, exit here. - The agents port the repository. With
--optimize, the optimize step follows a successful port.
Example commands
Section titled “Example commands”These examples use only real flags. Replace atesor-ai with python3 main.py in a source checkout.
# Build the sandbox one time (the platform comes from auto-detection)atesor-ai --setup-only
# Port zlib and show the agent activityatesor-ai --repo https://github.com/madler/zlib --verbose
# Port SQLite in the Debian sandbox and write a zipatesor-ai --repo https://github.com/sqlite/sqlite --platform debian --package
# Ignore the recipe cache and allow 3 attemptsatesor-ai --repo https://github.com/madler/zlib --force --max-attempts 3
# Check a native riscv64 machineatesor-ai --target native --platform debian --preflight
# Show what the native machine supports and save the profileatesor-ai --target native --platform debian --probe
# Port zlib on the native machine, try faster builds, and keep them in a zipatesor-ai --repo https://github.com/madler/zlib --target native --platform debian --optimize --package
# Build and check the tunes under QEMU with a modelled CPU (no timing)atesor-ai --repo https://github.com/madler/zlib --optimize --emulate-cpu rva22u64
# Remove the Debian sandbox container and its imageatesor-ai --platform debian --clean-imageHow does the atesor-ai launcher map to main.py?
Section titled “How does the atesor-ai launcher map to main.py?”The .deb package installs /usr/bin/atesor-ai, a POSIX shell script. The script does these steps:
- It checks that
/opt/atesor-ai/venv/bin/python3exists and can run. If not, it printsatesor-ai: bundled interpreter missing at /opt/atesor-ai/venv/bin/python3.and a reinstall command, then exits with code 1. - It exports
PYTHONDONTWRITEBYTECODE=1, so Python writes no bytecode files into/opt. - It puts
/opt/atesor-ai/appfirst inPYTHONPATH. - It runs
exec /opt/atesor-ai/venv/bin/python3 /opt/atesor-ai/app/main.py "$@".
The launcher passes all arguments to main.py unchanged. Thus atesor-ai ARGS and python3 main.py ARGS take the same options and return the same exit codes. These items are different:
| Item | Source checkout | .deb package |
|---|---|---|
| Command | python3 main.py |
atesor-ai |
| Python | your interpreter and packages | the bundled virtualenv in /opt/atesor-ai/venv |
| Application files | the checkout | /opt/atesor-ai/app |
| State home | the checkout root | $XDG_DATA_HOME/atesor-ai, default ~/.local/share/atesor-ai |
First .env search |
the checkout root and its parents | /opt/atesor-ai/app and its parents |
ATESOR_HOME changes the state home for both forms. Refer to Output files and Environment variables.
The package does not contain .github/scripts/batch_test.py. Batch runs need a source checkout. Refer to Batch runs.