selan.ai
Reference

Docs · Reference

selan CLI reference

Commands, environment variables, error messages and platform differences. Start at the docs for how it fits together.

Which commands does selan have?

CommandWhat it does
selan login Signs you in through the browser, with Google or Microsoft. Over SSH it prints a URL to paste; it needs no terminal, so selan login > log 2>&1 works. The latest login is your default company; the one before it is kept. See Several companies.
selan logout [company] Revokes the session server-side, then deletes the local file; if revocation fails it warns and still deletes. With no company named, it signs out of the one a launch from here would use. selan logout unconfirmed forgets every sign-in whose company was never confirmed.
selan whoami Who you are signed in as and which company for this folder, with a pinned: line when a folder's .selanrc.json chose it. With an API token set, names the token (last four characters only) and the address it spends as.
selan account [use company] Lists every company you are signed in to and marks the default and this folder's. use makes one the default.
selan project [set company name | unset company] Shows which company a launch from this folder spends as and the file that decides it. set company name pins this folder and every folder below it; unset company removes the pin.
selan claude [args…] Every argument passes through verbatim, including -p and --resume. Signs you in if you have no session.
selan claude --model provider:model Runs the session on your company's own provider key. A value with no colon is Claude Code's own flag and passes through untouched.
selan run name Launches a name declared in .selanrc.json at the repository root. Bare, it lists what the file declares. See Declared launches.
selan codex [args…] Launches Codex on the company's connection. Every argument passes through, codex exec included. Codex must be installed. See Codex.
selan codex --model provider:model Pins that session to one provider's copy of the model. Without a provider in front, the name means the model itself and Selan falls through your company's accounts in order.
selan opencode [args…] Launches OpenCode with the company's models, connectors and plugin skills and only Selan's provider enabled. Every argument but --model goes to OpenCode as typed, so selan opencode run "fix the tests" runs one prompt; upgrade and service … are refused (use plain opencode). Nothing is written into OpenCode's config. OpenCode 2 must be installed. See OpenCode.
selan opencode --model provider:model Starts OpenCode on a model your company serves, checked before OpenCode starts. A model your company does not serve is refused with the reason.
selan cursor [args…] Launches Cursor's agent in the terminal on the company's models, with no Cursor account. Every argument goes to the agent as typed. The first launch downloads the agent's local build into ~/.selan/cursor/versions (about 150 MB) and keeps it current. Settings and chats stay in ~/.selan/cursor/config; the company's connectors are added to ~/.cursor/mcp.json as selan-name. selan cursor mcp login selan-name signs in to one that asks. See Cursor.
selan grok [args…] Launches xAI's Grok Build on the company's models, with no xAI account. Every argument goes to Grok as typed. Grok Build must be installed. Settings, sign-in and sessions stay in ~/.selan/grok rather than ~/.grok, its xAI-only tools and usage reports are off, and the company's connectors are written into ~/.selan/grok/config.toml. See Grok Build.
selan app [list | name [args…]] Lists the public catalog of agent apps, or installs and runs one (Hermes, Paperclip, OpenHands, OpenClaw) on the company's accounts. It prints the scripts and asks [y/N] first. macOS and Linux. See Apps.
selan teleport machine [session] Moves a Claude Code session to another machine you reach with ssh (a Host in ~/.ssh/config, or user@host) and resumes it there in the same terminal. Quit the session, then run it in the folder it ran in; it takes the session last written there, or the one whose id you give. The session continues in the same folder under that machine's home. The repository goes by git push over ssh: the branch is checked out at the session's commit, with uncommitted work back on top. Ignored files such as .env stay behind, and a copy there with changes of its own is refused, as is a session Claude Code still has open. The other machine (macOS or Linux) needs selan 1.34 or later, signed in, and Claude Code; --json, which Herdr's teleport uses, needs 1.36. A session launched with seland continues with permission prompts off once you confirm. This machine's session and files stay as they were.
selan install jetbrains [--force] Installs Anthropic's Claude Code plugin in the newest version of each JetBrains IDE on this machine, Android Studio included, and sets its Claude command to selan claude. A running IDE is skipped until you quit it; a command you set yourself is kept unless --force. See JetBrains IDEs.
selan uninstall jetbrains Puts the plugin's Claude command back to claude wherever Selan set it, and leaves the plugin installed.
selan usage Your company's rate-limit headroom and your own spend budget. The statusline shows the same numbers.
selan reactor questions [--json] The questions your Reactor agents are waiting on you for, across every workspace you reach, newest first: the question, the agent, its workspace, how long it has waited and the question's id. --json prints one JSON object with each question's details. See Questions.
selan reactor runs [--json] What your Reactor agents are doing: runs going now (queued, starting or running), and those started in the last 24 hours that went wrong or finished with a warning. A run went wrong if it failed, timed out, lost its machine, never started, or its agent said so when it finished; a cancelled run did not. A warning is its agent saying something was left, often for a person. Each run shows its agent, state, how long ago it started and its id, and for one that finished, the agent's own account. A run going for more than 24 hours is not listed. --json prints one JSON object with the runs in running, wentWrong and warnings, each with a link to its page in Reactor.
selan reactor answer id [text] [--json] Answers one question as Resume does in Reactor: the agent's run starts again with your answer, which can take a few minutes. Every word after the id is the answer, up to 2,000 characters; none tells the agent done. After more than five minutes the answer may still have landed: check the agent's runs before answering again. --json prints the new run's id, or the error.
selan feature [enable|disable name] Turns a feature on or off for this machine from your next session; this machine's choice outranks your company's setting. Bare, it lists each feature and what this machine asks for: context-editing drops old tool output, context-editing-inputs drops the arguments of old tool calls, and tool-search loads MCP tool definitions only when a session uses them. tool-search has no company setting: it is on unless this machine turns it off, and an ENABLE_TOOL_SEARCH you export wins either way.
selan version This build, and the latest release on its channel.
selan doctor Checks, a line each, what a launch needs: this build and any newer one, the account and company, where your models are served (Selan, or your company's own proxy) and whether your sign-in works there, the connectors' gateway, and the Claude Code and Codex installed. A problem line says what to do, and the command exits 1.
selan update Runs the installer again, replacing the binary in place and refreshing the man page and tab completion. Refuses on a local build.
selan help [command] One command's whole page. Bare, the overview. selan command --help says the same, except after claude, codex, opencode, cursor and grok, which hand --help to that tool, and after feature, whose page is its help.
selan completion zsh|bash|fish|powershell Prints a tab-completion script for that shell, completing commands, flags, your companies, and a repository's declared names and agents. See Install for the line to add.
selan man The same help as a man page. On macOS and Linux the installer writes it to share/man/man1 beside the install directory (/usr/local/share/man/man1/selan.1 by default), where man selan finds it. Elsewhere: selan man > selan.1 && man ./selan.1.
seland [args…] The same binary, launching Claude Code with --dangerously-skip-permissions after one enter to confirm, skipped when piped or in CI. Only claude, codex and run are read as subcommands; every other argument belongs to the agent. See seland.
seland codex [args…] The same for Codex: approval prompts and sandbox both off, same confirmation. -s keeps the sandbox you name and turns off only the prompts; -a skips nothing. See running without prompts.

selan takes --version (-v) and --help (-h), and a bare --model is selan claude --model. Everything after claude, codex, cursor or grok belongs to that tool, and after opencode too except --model, upgrade and service. run is Selan's under both names, so a prompt cannot begin with it.

Every selan claude launch turns Claude Code's co-author trailer and its “Generated with Claude Code” line off, and no company setting changes that. A hook also refuses a commit, tag, note, merge request, pull request, issue or release, from Bash or an MCP tool, whose text carries them, and Claude writes it again without. A --settings of your own replaces Selan's, hook included.

How do I save a launch for a repository?

Put a repository's launches in .selanrc.json at its root and they come with the checkout.

{
  "agents": {
    "reviews": {
      "agent": "code-review"
    },
    "oncall": {
      "agent": "incident-triage",
      "ask": false
    }
  }
}
selan run reviews
# → selan claude --agent code-review

selan run oncall
# → selan claude --agent incident-triage --disallowedTools AskUserQuestion

selan run
# lists what the file declares, and launches nothing

The file says which agent; .claude/agents/ defines it, so there is no model field. Anything you type after the name is kept, last, so selan run reviews --model openrouter:… works.

A field it does not recognise is refused, so a misspelt key says so at the terminal.

"ask": false takes Claude Code's AskUserQuestion tool away, so the agent cannot stop to ask you; it says in its final answer what it could not decide. Permission prompts still come, which is what seland is for.

A name whose agent does not exist is refused before launching. Both .claude/agents/ directories, beside the file and under your home directory, are checked, matched on the frontmatter's name:.

seland run reviews is the same launch with permission checks off. The file has no field for this on purpose: it widens what the session may do, so it is decided at the terminal.

How do I use selan for several companies?

Sign in once per company. selan keeps every session; the latest selan login is your default.

selan login                # Acme, picked in the browser
selan login                # Globex: the new default, Acme kept
selan account              # both, and which one is the default
selan account use Acme     # make Acme the default again

Only selan login and selan account use change the default. A sign-in a launch asks for leaves it where it is.

A folder can pin its company. selan project set company Acme writes it into the folder's own .selanrc.json, and the pin covers every folder below it:

{
  "account": "Acme"
}

selan claude, selan codex and selan agent-run below that folder spend as Acme, elsewhere as your default. selan project unset company removes the pin.

If teammates may run an older selan, pin in a parent folder's .selanrc.json, not a repository's committed one: an older selan refuses the unknown field.

A pinned folder whose company you are not signed in to asks:

This folder is pinned to Acme (~/work/acme/.selanrc.json), and you're not signed in to it.
  [l] sign in to Acme   [c] continue as sam@globex.example (Globex)   [q] quit

The next launch asks again. With no terminal, and always under agent-run, it refuses.

Each company keeps its own Claude Code state. The company you used ~/.claude with before your second sign-in keeps it. Every other company gets a profile under ~/.selan/profiles/, named by selan whoami on a profile: line, so MCP servers and their sign-ins stay with their company. A profile starts empty, so the first launch shows Claude Code's onboarding once. Every profile reads your ~/.claude/CLAUDE.md, and auto memory is shared between companies for a repository whose path is plain ASCII. A profile outlives selan logout; delete it yourself. A CLAUDE_CONFIG_DIR you export wins.

Every profile sets CLAUDE_CONFIG_DIR itself, and Claude Code does not use its background-session service when it is set, so claude --bg sessions started from a profile stop about a minute after the last Claude Code window closes. Launches in ~/.claude are unaffected.

Which environment variables does selan read?

VariableEffect
SELAN_TOKEN An API token minted by an owner. Skips sign-in, so no credential is written to disk. Beats a stored login: you spend as the token. Not a no-write mode: selan still keeps its update check and usage cache under ~/.selan, and still updates itself. In CI, set SELAN_NO_AUTO_UPDATE too. See Running unattended.
SELAN_INSTALL_DIR Where the installer puts the binary: ~/.local/bin (/usr/local/bin as root), or %LOCALAPPDATA%\Programs\selan on Windows. selan update reinstalls beside the running binary.
SELAN_NO_AUTO_UPDATE Stops selan claude installing a newer release before it launches. Set means set, including 0.
SELAN_NO_STATUSLINE Stops Selan installing its statusline. Counts as set whatever its value.
SELAN_NO_VOICE Starts selan claude without dictation, even when your company has it on. Counts as set whatever its value.
ANTHROPIC_BETAS Selan sets the 1M-context beta unless you have set this. See the warning below.
Setting ANTHROPIC_BETAS yourself costs you the 1M context window. Selan's value is a default, not a merge: yours wins and you drop to 200k with no warning. To add a beta, include context-1m-2025-08-07 alongside it.

On a subscription account the 1M beta is removed before the request goes upstream, so it runs at 200k whatever you set. An API key carries it.

What does this error message mean?

What you seeWhat it means
.selanrc.json: json: unknown field … A key the file's format does not have, named in the message.
.selanrc.json: … names the agent … The agent an entry names has no definition in either .claude/agents/ directory. See Declared launches.
.selanrc.json declares no … That name is not in the file. selan run with no name lists what is.
codex not found on PATH Codex is not installed. See Codex.
warning: Claude Code … is older than 2.1.283 Your Claude Code is too old for everything Selan sets up to take effect. Claude Code launches anyway. Run claude update.
no active session Your session expired or was revoked. Run selan login.
spend limit Your budget or the workspace's was reached. The message says which and when it lifts.
not an available … model The provider does not offer that model, or your company has not enabled it. The message lists what is available.
your company has not connected … You named a provider your company has no key for. Drop the --model prefix, or ask an owner to connect it.
model_not_allowed A model from /model that your company has since switched off. Pick another and relaunch.
too many concurrent requests You have several Claude Code sessions in flight. Finish or close one.
no capacity Nothing in your company's pool could take the request. If every account is busy, retry shortly. If every subscription seat has used up its 5-hour or weekly window and no API key serves the model, nothing frees until a window resets; selan usage and the statusline say when. Until then, pick a model on another provider, or ask an owner to connect an API key.
could not lease a credential A Selan service is unreachable. Retry. On an API token it also reports an identity lookup failure.
a malformed SELAN_TOKEN Checked locally before any request. A real token starts selanct_.

Provider errors pass through untouched, except that a 529 (provider overloaded) is answered as a 503 in our own words. Before a provider 500, 502, 503, 504 or 529 reaches you, the request is tried once on another connected provider that serves the same model, and only the last failure is relayed (see What happens when Anthropic is down?).

What differs on Windows, macOS and Linux?

macOS · LinuxWindows
Install curl … install.sh | sh irm … install.ps1 | iex, PowerShell 5.1 or newer
Default location ~/.local/bin, or /usr/local/bin as root %LOCALAPPDATA%\Programs\selan
Session file ~/.selan/credentials.json, mode 0600, for your default company; other companies' sessions are in ~/.selan/accounts/ %USERPROFILE%\.selan\credentials.json, and accounts\
Also written ~/.selan/version-check.json, apps/name for each app run with selan app, a usage cache per company, and, per company, a claude-settings-…json and a claude-mcp-config-…json, which carry that company's session token so it is not on a command line where ps would show it; a launch deletes any untouched for a week. selan codex writes a fenced provider block in ~/.codex/config.toml, and a connectors block when your company uses connectors on its own OAuth client, which selan logout removes. Your company's connectors are added to ~/.claude.json and removed when the company switches them off; an MCP server you added is left alone. selan install jetbrains adds the plugin to each IDE's plugins/ folder and writes its Claude command into options/claude-code-plugin-settings.xml, keeping the other settings. selan opencode writes nothing into OpenCode's config; it fetches your company's plugin marketplaces with git into ~/.selan/. Each company after the first gets a Claude Code profile under ~/.selan/profiles/, which selan logout leaves; see Several companies. The same files under %USERPROFILE%
seland A symlink to the same binary seland.exe, a copy of the binary (a symlink needs Developer Mode)
Exit code Claude Code's, inherited Claude Code's, passed through

seland is the same binary under a second name, put beside selan by the installer: selan claude --dangerously-skip-permissions. See seland.

Inside WSL, use the Linux installer, and install Claude Code inside WSL too.

On Windows, %NAME% inside an argument is expanded. claude is usually a batch file, and cmd.exe expands environment variables even inside quotes, with no escape for a literal %. If a prompt needs one, put it in a file and point Claude Code at the file.

What reaches Selan?

Requests go to the Selan proxy, which leases one of your company's credentials per request and streams the response back. Prompts are not stored. Selan records metering: token counts, model, cost and who made the request. A repository slug is recorded only when the caller supplies x-selan-repo (the Selan CLI does) and your company has turned Repository attribution on; the header is never sent to the model provider.

No Anthropic credential is ever on your machine; the only secret is a revocable session token, and selan logout revokes it. If you have your own ANTHROPIC_API_KEY exported, Selan removes it before launching Claude Code, and it never leaves the machine.

See Privacy for what our own processors see.