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
| Command | What 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 claude connect [args…] |
The same launch, reachable from Slack. Opens a private channel for the checkout and takes replies there as if typed at the terminal. See Connect. |
selan claude connect --cid name |
Names the connection rather than the checkout, so the same name returns to the same channel from any directory. One live session per name; a second is refused. The flag is taken off argv and does not reach Claude Code, so Claude Code's own flags work beside it: --agent and the rest reach it as typed. |
selan claude disconnect |
Forgets the paired workspace, so another can be connected. Launches nothing. |
selan run name |
Launches a name declared in .selanrc.json at the repository root, expanded to the words it stands for before anything else reads them. Bare, it lists what the file declares and launches nothing. See Connect. |
selan codex [args…] |
Launches Codex on the company's connection rather than your own ChatGPT. Every argument passes through, codex exec included. Codex itself 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 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 after one enter to confirm, skipped when piped or in CI. Only claude, codex, connect, disconnect and run are read as subcommands; every other argument belongs to the agent. See seland. |
seland codex [args…] |
The same for Codex: its approval prompts off, after the same enter, skipped when piped or in CI. The sandbox stays — pass Codex's own --dangerously-bypass-approvals-and-sandbox to drop it. See running without prompts. |
selan itself takes --version and --help, and
a bare --model is treated as selan claude --model.
Everything after claude is Claude Code's, except connect,
disconnect and --cid, which Selan reads itself.
run is Selan's under both names, so a prompt cannot begin with it. Everything
after codex is Codex's.
Environment variables
| Variable | Effect |
|---|---|
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. |
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 see | What it means |
|---|---|
.selanrc.json: json: unknown field … |
A key the file's format does not have, named in the message. Refused rather than ignored, because a launch that quietly is not what it reads like is worse than one that will not start. |
.selanrc.json: … names the agent … |
The agent an entry names has no definition beside the checkout or under your home directory. Both .claude/agents/ directories are searched, matched on the frontmatter's name:. See Connect. |
.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 itself is not installed. Selan launches it, it does not bundle it. See Codex. |
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 · Linux | Windows | |
|---|---|---|
| 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.
%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.