skip to content
CLI reference

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.

terminal
curl -fsSL https://conifer.build/setup | bash

Commands 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

CommandWhat it does
setupThe 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 / logoutPaste 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 tokenShows which credential the CLI would send with a cloud call and where it came from. --reveal prints the token itself.
runSend 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.
serveOpen 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.
modelsOpen models on your own machine: search the catalog, pull, import, list, remove. See Get models.
endpointsThe 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.
routingList and manage saved routes. A route lets the gateway pick the model for each request instead of you naming one.
keysYour own provider keys, held by the gateway: list, add <provider>, remove <provider>. The key is read from stdin, never the command line.
usageWhat this machine has spent over the last day or week. The console holds the full account history.
doctorChecks the install. --probe-cloud confirms your key against the gateway without spending anything. --fix applies safe local repairs.
updateSelf-update. The download is checksum-verified and swapped in atomically, and the old binary is kept so --rollback can restore it. --check only reports.
privacyTelemetry on or off, an offline mode that stops all background traffic, and a receipt of what has left the machine.
hostThe supervisor behind serve: status, logs, stop.
accountaccount delete removes your cloud account. Files on this machine are left alone.
completions / man / uninstall / versionShell 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

terminal
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-fileReplace the system prompt for this run only.
--eventsStream the run as NDJSON. The last line carries token usage and cost.
--dry-runShow what would run, then exit.
--interactiveOpen 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

terminal
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|lanloopback is the default. lan is refused until an access token exists; see Serve an endpoint.
--model / --routeWhat 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.
--detachRun in the background. conifer host stop ends it.

endpoints, routing, keys

terminal
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 openai

endpoints 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

terminal
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 much

Where things live

PathHolds
~/Library/Application Support/build.Conifer.conifer/config.tomlSettings 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_KEYYour key. Every tool recipe and the CLI read this one name. A key in the environment wins over a stored one.
CONIFER_ENTITLEMENT_TOKENA short-lived token for CI. Wins over CONIFER_API_KEY when both are set.
CONIFER_HOMEMoves the ~/.conifer directory.
CONIFER_DATA_DIR / CONIFER_CONFIG_DIRMove the data and config directories.
CONIFER_SECRETS_BACKENDSet to keychain to store the key in the OS keychain instead of credentials.json.
CONIFER_UPDATE_CHECKoff silences the daily update notice.
CONIFER_NO_SETUP1 stops the installer from opening conifer setup.

Exit codes

CodeClass
0Success
64Usage: bad arguments, an unknown name, an unsupported file
65The task did not finish
69Unavailable: nothing could serve this request
70Internal error
74I/O failure
75External: provider fault, timeout, cancelled
77Signed out, or offline mode blocked the call
78Config

Stable, so scripts can branch on them.