SARION

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 just sarion, 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 N and --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 whoami shows the signed-in account, the profile and the credential expiry.
  • sarion models lists the models your plan lets you use. Use --model auto, or one of the identifiers it prints.
  • sarion usage shows the usage and balance that the server reports for your account. Run it before and after an agent request to see what the request used.
  • sarion account list|use <id> and sarion tenant list|use <id> list and switch between the accounts and workspaces you may use.
  • sarion login, sarion logout and 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 init creates 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 status prints the folder, its workspace identifier and how many files are visible to SARION.
  • sarion project files lists those files, sarion project search <text> finds text in them, and sarion project read <path> prints one file. Example: sarion project search hello prints 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> and sarion session delete <id> manage your saved sessions.
  • sarion checkpoint list and sarion 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> and sarion config set <key> <value> read and change local settings. Example: sarion config set verbosity quiet prints Saved. A key that does not exist prints null.
  • sarion policy shows the protected policy that applies, and sarion audit [count] shows what the program did on this machine.
  • sarion sandbox doctor reports 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>|doctor manages the server profiles. Most people never need it, because the profile named cloud is built in.

Options that work on every command

  • --profile name chooses a server profile and --project path chooses the folder.
  • --format text|json|ndjson chooses the output format. text is for reading. json prints one result object, and ndjson prints a stream with one JSON object per line. Use them in scripts.
  • --verbosity quiet|normal|verbose chooses how much is printed.
  • --non-interactive never asks a question, so a script fails instead of waiting. --timeout seconds stops a command that takes too long.
  • --encrypted-store unlocks 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.