Commands and examples
Every command of the SARION command line with its syntax, an example, the output formats and the options that work on every command.
Where to find it Terminal, sarion --help
How the commands are written
sarion --help prints the full list. In the syntax below, <value> is required, [value] is optional, and a|b means choose one. The command line has no separate help page for each command: sarion <command> --help prints the same overall list. The examples were checked on SARION CLI v2 2.0.0-preview.2. Commands that talk to your account need you to be signed in first (see Sign in from the command line), and ask, agent and chat use credit.
Ask, agent and chat
sarion ask <prompt> [--attach path] [--stdin] [--format json|ndjson]sends one question and prints the answer. Attach only what you choose:sarion ask 'Explain this file' --attach src/main.ts. To pipe text in, add--stdin:git diff | sarion ask 'Review this patch' --stdin.sarion agent <task> [--permission-mode mode] [--share-context] [--model auto|id] [--resume id]lets SARION work on your project folder within the permission mode you choose. First request, read only:sarion agent 'Summarize this project without changing files' --model auto --permission-mode read-only --share-context.sarion chat [--resume [id]] [--model auto|id], or justsarion, starts a conversation in the terminal. Continue an earlier one with--resume SESSION_ID.- Limits for one run:
--max-steps N,--max-tool-calls N,--max-output-tokens Nand--max-context-tokens N.
--share-context is your explicit consent to send selected project data to SARION. Sensitive paths, ignored files and links are left out, but do not rely on that in a folder full of secrets. Scripts that run without a person at the keyboard must give this consent and the required permissions themselves.
Account, models and credit
sarion whoamishows the signed-in account, the profile and the credential expiry.sarion modelslists the models your plan lets you use. Use--model auto, or one of the identifiers it prints.sarion usageshows the usage and balance that the server reports for your account. Run it before and after anagentrequest to see what the request used.sarion account list|use <id>andsarion tenant list|use <id>list and switch between the accounts and workspaces you may use.sarion login,sarion logoutand their options are explained in Sign in from the command line.
Projects
These commands work on the folder you are in, or the one given with --project path, and need no sign-in:
sarion project initcreates the project settings. Interactively it asks first; in a script add--permission-mode workspace-write. If the project is already set up it says so and does nothing.sarion project statusprints the folder, its workspace identifier and how many files are visible to SARION.sarion project fileslists those files,sarion project search <text>finds text in them, andsarion project read <path>prints one file. Example:sarion project search helloprints each match as{"path":"README.md","line":2,"text":"hello world"}.
Put guidance for SARION in a file named AGENTS.md or SARION.md in the folder. It is advice only and never grants a permission.
Sessions, checkpoints and recovery
sarion session list,sarion session show <id>,sarion session history <id>andsarion session delete <id>manage your saved sessions.sarion checkpoint listandsarion checkpoint restore <id>list and restore saved states of your files.sarion recover <session-id> [--abandon <command-id>]inspects a session that stopped while a change was uncertain. See Permissions, recovery and credits.
Settings, policy and checks
sarion config list,sarion config get <key>andsarion config set <key> <value>read and change local settings. Example:sarion config set verbosity quietprintsSaved. A key that does not exist printsnull.sarion policyshows the protected policy that applies, andsarion audit [count]shows what the program did on this machine.sarion sandbox doctorreports whether programs can be run safely here. On a supported Linux machine it prints a short report with"available": true, the profile and whether network access is allowed.sarion endpoint list|add <name> --url URL --boundary cloud|use <name>|doctormanages the server profiles. Most people never need it, because the profile named cloud is built in.
Options that work on every command
--profile namechooses a server profile and--project pathchooses the folder.--format text|json|ndjsonchooses the output format.textis for reading.jsonprints one result object, andndjsonprints a stream with one JSON object per line. Use them in scripts.--verbosity quiet|normal|verbosechooses how much is printed.--non-interactivenever asks a question, so a script fails instead of waiting.--timeout secondsstops a command that takes too long.--encrypted-storeunlocks the encrypted login store (see Sign in from the command line).
In --format json, an error looks like {"state":"error","error":{"code":"UNAUTHENTICATED","message":"Run sarion login first"},"recoveryRequired":false}. Test the exit code (see Troubleshooting the command line).
Common questions
Which command do I use for a quick question?
sarion ask 'your question'. Add --attach path to include a file.
How do I use it in a script?
Add --non-interactive --format json, give the permission mode and --share-context explicitly, and check the exit code.
Is there an automatic yes?
No. There is no --yes option. Every change is limited by the permission mode you choose.