selan.ai

Docs · Reference

Reference

Every command, every environment variable, every error message, and what differs on Windows. For how it all fits together, start at the docs.

Commands

CommandWhat it does
selan login Signs you in through the browser, with Google or Microsoft. Over SSH it prints a URL to paste. It does not need a terminal, so selan login > log 2>&1 works.
selan logout Revokes the session server-side, then deletes the local file. If revocation fails it warns and still deletes: an offline user must not be stuck signed in.
selan whoami Who you are signed in as and which company. With a CLI token set, names the token and the address it spends as, showing only its last four characters.
selan claude [args…] The main command. Every argument passes through verbatim, including -p and --resume. Signs you in automatically 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 usage Your company's rate-limit headroom and your own spend budget. The statusline shows the same numbers.
selan version This build, and the latest release on its channel.
selan update Fetches and runs the installer again, replacing the binary in place. Refuses on a local build.
seland [args…] The same binary, launching Claude Code with --dangerously-skip-permissions. No subcommands: every argument belongs to Claude Code. See seland.

selan itself takes --version and --help, and a bare --model is treated as selan claude --model. Everything after claude is Claude Code's.

Environment variables

VariableEffect
SELAN_TOKEN A CLI token minted by an owner. Skips sign-in entirely, so no credential is written to disk. Beats a stored login: with this set, you spend as the token. It is 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. Defaults to /usr/local/bin, or %LOCALAPPDATA%\Programs\selan on Windows.
SELAN_NO_AUTO_UPDATE Stops selan claude installing a newer release before it launches. Counts as set whatever its value, including 0.
SELAN_NO_STATUSLINE Stops Selan installing its statusline. Counts as set whatever its value.
ANTHROPIC_BETAS Not a Selan variable, but it interacts. Selan sets the 1M-context beta unless you have already set this yourself. See the warning below.
Setting ANTHROPIC_BETAS yourself silently costs you the 1M context window. Selan's value is a default, not a merge: any existing value wins outright and you drop to 200k with no warning. If you need another beta, include context-1m-2025-08-07 alongside it.

The window also depends on what serves the request. On a subscription account the 1M beta is removed before the request goes upstream, because the plan does not carry it, so that request runs at 200k whatever you set. An API key does carry it.

When something goes wrong

What you seeWhat it means
no active session Your session expired or was revoked. Run selan login.
spend limit A budget was reached, either yours or the workspace's. The message says which and when it lifts. Retrying does not clear it.
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 You picked a model from /model that your company has since switched off. Pick another and relaunch: the list is only read at startup.
too many concurrent requests You have several Claude Code sessions in flight. Finish or close one.
no capacity Every account is busy or rate-limited right now. Retrying shortly usually works.
could not lease a credential A Selan service is unreachable. It is not a refusal, so retry. If you are on a CLI token, this is also what an identity lookup failure reports.
a malformed SELAN_TOKEN Checked locally before any request, so a typo is reported as a typo and not as a revoked token. A real token starts selanct_.

Errors from a provider are passed through untouched, with one exception. A 529, which means the provider itself is overloaded, is answered as a 503 in our own words: it is the one case where the provider's body is replaced rather than relayed. If the model itself refuses something, you see its words, not ours.

Platform notes

macOS · LinuxWindows
Install curl … install.sh | sh irm … install.ps1 | iex, PowerShell 5.1 or newer
Default location /usr/local/bin %LOCALAPPDATA%\Programs\selan
Session file ~/.selan/credentials.json, mode 0600 %USERPROFILE%\.selan\credentials.json
Also written ~/.selan/version-check.json, usage-cache.json, and claude-settings.json, which carries the same session token so it is not passed on a command line where ps would show it. selan codex writes a fenced block in ~/.codex/config.toml, and your company's connectors are added to ~/.claude.json. 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, which the installer puts beside selan. Running it is selan claude --dangerously-skip-permissions. See seland. How it gets there is the only thing that differs by platform; what it does is identical.

Inside WSL, use the Linux installer: a WSL session is Linux. Claude Code has to be installed inside WSL too.

On Windows, %NAME% inside an argument is expanded. claude is usually a batch file, which cmd.exe parses, and cmd.exe expands environment variables even inside quotes. There is 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 straight back. Prompts are not stored. What Selan records is 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 this automatically) and your company has turned Repository attribution on. Selan consumes the header and never sends it to the model provider.

No Anthropic credential is ever on your machine. The only secret Selan puts there is a revocable session token, and selan logout revokes it.

It works the other way too: if you have your own ANTHROPIC_API_KEY exported, Selan removes it before launching Claude Code. Your personal key is not sent to Selan and then ignored. It never leaves the machine.

See Privacy for the full picture, including what our own processors see.