CLI
Command reference
Every command, flag, file, environment variable and exit code. Where conifer --help says otherwise, --help wins.
Install
One command per platform. The installer verifies the download, installs without sudo, puts conifer on your PATH, and then opens conifer setup. It is safe to run again.
curl -fsSL https://conifer.build/setup | bashCommands take the form conifer <noun> <verb>. Two flags work everywhere: --json for machine-readable output and -q for less of it. A few flags exist only on the macOS and Windows builds, which are the ones that can run a model on the machine itself. They are marked below.
The commands
| Command | What it does |
|---|---|
setup | The guided first run. It signs you in, wires the coding tools you use, and can put an open model on your machine. The installer opens it for you. |
login / logout | Paste your key once and the CLI checks it against the gateway and stores it. login --status shows whether you are signed in without going online. |
login token | Shows which credential the CLI would send with a cloud call and where it came from. --reveal prints the token itself. |
run | Send one task to a model and print the answer. Name a model from the catalog and the gateway serves it. Name a model on your machine and it runs there. |
serve | Open a local endpoint on 127.0.0.1:8080 that speaks the OpenAI and Anthropic wires. Tools point at it once and the gateway does the rest. |
models | Open models on your own machine: search the catalog, pull, import, list, remove. See Get models. |
endpoints | The list of places the CLI can send a request: the gateway, a Conifer host on your network, or a provider you hold your own key for. |
routing | List and manage saved routes. A route lets the gateway pick the model for each request instead of you naming one. |
keys | Your own provider keys, held by the gateway: list, add <provider>, remove <provider>. The key is read from stdin, never the command line. |
usage | What this machine has spent over the last day or week. The console holds the full account history. |
doctor | Checks the install. --probe-cloud confirms your key against the gateway without spending anything. --fix applies safe local repairs. |
update | Self-update. The download is checksum-verified and swapped in atomically, and the old binary is kept so --rollback can restore it. --check only reports. |
privacy | Telemetry on or off, an offline mode that stops all background traffic, and a receipt of what has left the machine. |
host | The supervisor behind serve: status, logs, stop. |
account | account delete removes your cloud account. Files on this machine are left alone. |
completions / man / uninstall / version | Shell completions, man pages, a clean uninstall of the files this install owns, and the version you are running. |
conifer <command> --help lists every flag.
run
conifer run --model claude-sonnet-4-6 "summarize CHANGELOG.md"
git diff | conifer run --model gpt-5.5 "write the commit message"
conifer run --route all "triage this issue"The task comes from the arguments or from stdin. Name a model and that model answers. Name a route and the gateway picks the model.
| Flag | |
|---|---|
--model <id> | The model to use, by its catalog id or its local name. Cannot be combined with --route. |
--route <name> | Use a saved route, or one of the built-in ones (on-device, local, cloud-only, all), instead of naming a model. |
--attach <file> | Attach an image, a WAV file, a PDF or an Office document. Repeatable. Cloud models take images. |
--profile <name> | Load [profiles.<name>] from config.toml. |
--persona / --persona-file | Replace the system prompt for this run only. |
--events | Stream the run as NDJSON. The last line carries token usage and cost. |
--dry-run | Show what would run, then exit. |
--interactive | Open a chat session. macOS and Windows builds only, and implied by a bare conifer run in a terminal. |
--ctx <n> | Set the context window for a local model. macOS and Windows builds only. |
serve
conifer serve # 127.0.0.1:8080, OpenAI and Anthropic wires
conifer serve --detach # the same, in the background| Flag | |
|---|---|
--port <n> | Default 8080. |
--bind loopback|lan | loopback is the default. lan is refused until an access token exists; see Serve an endpoint. |
--model / --route | What a request that does not name a model should get. |
--ttl <s> | Unload a local model after it has sat idle this many seconds. The default, 0, keeps it loaded. |
--max-loaded <n> | How many local models to keep in memory at once. No cap by default. |
--ctx <n> | Context window for local models. macOS and Windows builds only. |
--detach | Run in the background. conifer host stop ends it. |
endpoints, routing, keys
conifer endpoints list
conifer endpoints add remote mac-studio --url http://192.168.1.20:8080
conifer endpoints add byok openai --url https://api.openai.com/v1 --api-key-env OPENAI_API_KEY
conifer routing list
conifer routing create work --reach cloud --policy balanced
printf %s "$OPENAI_API_KEY" | conifer keys add openaiendpoints is where the CLI can send a request. The gateway is always there and cannot be removed. You can add a Conifer host on your network or a provider you hold your own key for. routing lists the built-in routes and any you have saved. keys hands a provider key to the gateway so requests on that provider are billed to you by the provider, and conifer keys --help covers Azure. Secrets never go on the command line. They are read from stdin.
privacy
conifer privacy opt-out # usage telemetry off
conifer privacy offline on # no background traffic of any kind
conifer privacy receipts # which hosts this machine has talked to, and how muchWhere things live
| Path | Holds |
|---|---|
~/Library/Application Support/build.Conifer.conifer/config.toml | Settings and run profiles. On Linux it is ~/.config/conifer/config.toml, on Windows %APPDATA%\Conifer\conifer\config\config.toml. CONIFER_CONFIG_DIR moves it. |
~/.conifer/ | Downloaded models, endpoints.json, and credentials.json, which holds your key and is readable only by you. |
~/Library/Application Support/build.Conifer.conifer/ | Logs, run journals and serving state. On Linux it is ~/.local/share/conifer/. |
Environment variables
| Variable | |
|---|---|
CONIFER_API_KEY | Your key. Every tool recipe and the CLI read this one name. A key in the environment wins over a stored one. |
CONIFER_ENTITLEMENT_TOKEN | A short-lived token for CI. Wins over CONIFER_API_KEY when both are set. |
CONIFER_HOME | Moves the ~/.conifer directory. |
CONIFER_DATA_DIR / CONIFER_CONFIG_DIR | Move the data and config directories. |
CONIFER_SECRETS_BACKEND | Set to keychain to store the key in the OS keychain instead of credentials.json. |
CONIFER_UPDATE_CHECK | off silences the daily update notice. |
CONIFER_NO_SETUP | 1 stops the installer from opening conifer setup. |
Exit codes
| Code | Class |
|---|---|
| 0 | Success |
| 64 | Usage: bad arguments, an unknown name, an unsupported file |
| 65 | The task did not finish |
| 69 | Unavailable: nothing could serve this request |
| 70 | Internal error |
| 74 | I/O failure |
| 75 | External: provider fault, timeout, cancelled |
| 77 | Signed out, or offline mode blocked the call |
| 78 | Config |
Stable, so scripts can branch on them.