Quick start

Configure a model and run cortex in under a minute.

The fastest possible start

cortex needs one thing before it can start: a model. Two environment variables are enough:

export LLM_MODEL=gpt-4o
export LLM_API_KEY=sk-...
cortex

Interactive mode

Run cortex with no arguments to start an interactive session in your current directory:

cortex                                   # interactive
cortex --prompt "summarize the TODOs"    # one turn, then exit
cortex --config reviewer.yaml            # a specific config, no cascade
cortex --version

Non-interactive mode

--prompt writes the assistant's answer to stdout and everything else — tool activity, notices, errors — to stderr, so it composes:

cortex --prompt "list every exported function in internal/ui" > api.txt

See Non-interactive mode for the full picture.

A config file for repeat use

If you don't want to pass env vars every time, write a config file:

# ~/.config/cortex/config.yaml
model:
  provider: openrouter
  name: deepseek/deepseek-v3.2
  api_key: $OPENROUTER_API_KEY

The $ prefix reads the value from an environment variable at startup, so you never commit the key itself. See Configurationfor the full three-layer cascade.

Onboarding

If cortex starts without a model configured, it prints an onboarding message explaining the three places a model can come from — it does not guess or default.

💡
Tip: The transcript is committed to your terminal's own scrollback, not held in an alternate screen. A finished session stays scrollable and copyable after cortex exits.