Skip to main content
The Cortex CLI is Cortex Code for the terminal. One binary, cortex, gives you an interactive TUI with a live timeline and approvals, one-shot runs from your own shell, and a headless mode for scripts and CI. It uses the same account and the same Code sessions as the web and desktop apps, runs on the Cloud runtime by default, and never runs the model on your laptop.
Cortex CLI on a macOS desktop: splash, prompt, slash commands, and a Shell tool row

The CLI in a macOS Terminal: splash, a prompt, the slash palette, the model picker, and a Shell tool row. A generated desktop demo of the shipped TUI, not a live recording. The stills on the pages below are headless renders of the same chrome.

Install in one line

InstallQuickstart

Cortex CLI session composer with the pointer hovering over it

The shipped session chrome: the Agent composer with its dual hairline, the model chip Cortex Mini 1 (medium) on the border, and the footer hints. Mouse hover is supported.

What one binary gives you

Guides

Install

Installer, checksums, version pins, channels, cortex upgrade, uninstall.

Sign in

cortex login in a browser, device code for headless machines, API keys for CI, the OS keyring.

Quickstart

First session, AGENTS.md, choosing autonomy.

The TUI

Timeline rows, the composer, status line, queueing follow-ups, interrupting.

Slash commands

Everything after / — model, mode, permissions, plan, goal, sessions, MCP, diagnostics.

Modes and permissions

Agent / Plan / Ask, Spec, approvals, sandbox, the permission table, effort.

Goals

/goal — a persisted long-horizon objective that survives compaction and resume.

Sessions

Resume, rewind, fork, export, import, share, lock, clean up.

Headless runs

cortex exec and cortex run in scripts, GitHub Actions, GitLab CI.

Configuration

config.toml, profiles, environment variables, data locations, hosts.

Extend

MCP servers, skills, agents and subagents, hooks, plugins, themes.

Troubleshooting

Outage copy, hosts that refuse, the agent that will not edit, MCP, quotas.

Conventions on these pages

  • Commands are written cortex …. The installed binary is Cortex; the installer adds cortex and agent symlinks, and both spellings work on case-insensitive filesystems.
  • Everything documented here is backed by the shipped CLI. cortex --help and cortex <command> --help are generated from the same definitions and are always authoritative.
  • The CLI talks to the Cortex API at api.cortex.foundation. Releases are published to software.cortex.foundation.
  • Source and issues: github.com/CortexLM/cli, Apache-2.0.