Cortex CLI v1.1.25

The Cortex agent,
in your terminal.

It reads your project, edits files, runs commands and checks its own work. The same agent as Cortex Desktop, with your own API key, in any shell.

curl -fsSL https://cortex-ide.app/install | bash

One file in ~/.cortex/cli/bin, checked against its SHA-256. Open source under the MIT licence. Every system, step by stepSource on GitHub

Bring your own key from

  • MiMo
  • DeepSeek
  • Anthropic
  • OpenAI
  • OpenRouter
  • Qwen
  • Google Gemini
  • Radox AI

Works the way you would

The same habits as Cortex Desktop, sized for a terminal.

Plans in the open

A task list sits above the prompt and ticks off as it works, so you always know what it is doing and what is left.

Asks before it guesses

When a choice is yours, it stops and offers the options with what each one changes. Pick with the arrow keys or type your own.

Any model, your key

Pick a provider, paste its key, and it stays on your computer. Requests go straight to the provider, never through Cortex.

Install on your system

Each command downloads the build made for your system from the latest release. Nothing else needs to be installed first.

macOS

Apple Silicon and Intel

Open Terminal and run:

curl -fsSL https://cortex-ide.app/install | bash
  1. Downloads the build for your Mac's chip
  2. Checks it against the release's SHA-256 checksums
  3. Puts cortex in ~/.cortex/cli/bin and adds it to your PATH in your shell config (.zshrc on a standard Mac)

When it finishes it prints Cortex CLI 1.1.25 installed to /Users/you/.cortex/cli/bin/cortex

Then open a new Terminal window and run cortex.

Linux

x64 and arm64, any distribution

Open a terminal and run:

curl -fsSL https://cortex-ide.app/install | bash
  1. Downloads the build for your CPU
  2. Checks it against the release's SHA-256 checksums
  3. Puts cortex in ~/.cortex/cli/bin and adds it to your PATH for bash, zsh or fish

When it finishes it prints Cortex CLI 1.1.25 installed to /home/you/.cortex/cli/bin/cortex

Then open a new terminal and run cortex.

Windows

Windows 10 and 11, 64-bit

Open PowerShell and run:

irm https://cortex-ide.app/install.ps1 | iex
  1. Downloads cortex-windows-x64.exe
  2. Checks it against the release's SHA-256 checksums
  3. Puts it in %USERPROFILE%\.cortex\cli\bin and adds that folder to your user PATH

Then open a new PowerShell window and run cortex. On a Windows ARM PC the x64 build runs through Windows' emulation.

With a package manager

Installs the same binary through npm, bun or Homebrew.

npm Node.js 16 or newer
npm install -g @cortex-ide/cliComing soon
bun
bun install -g @cortex-ide/cliComing soon
Homebrew macOS and Linux
brew install Cortex-AI-IDE/tap/cortexComing soon

Your first run

Start it inside the project you want to work on.

  1. Start Cortex in your project

    $ cd my-app
    $ cortex
  2. Add your API key

    Pick your provider with ↑ ↓ and paste its key. Each provider shows where to get one. The key stays on your computer.

  3. Say what you need

    › Add a dark mode toggle to the settings page

    Cortex plans the work, shows its task list, edits the files and runs your tests.

If cortex is not found

The installer puts cortex in ~/.cortex/cli/bin and adds that folder to your PATH. A terminal that was already open when you installed does not re-read your shell config, so it still does not know the folder exists. Open a new terminal, or reload the config in the one you have, then run cortex again.

Linux

bash, zsh and fish

Reload your shell config, or set the PATH for this session:

export PATH="$HOME/.cortex/cli/bin:$PATH"
source ~/.bashrc
  1. On zsh run source ~/.zshrc; on fish run fish_add_path ~/.cortex/cli/bin
  2. Then run cortex --version to confirm it resolves

Still not found? Run it by its full path: ~/.cortex/cli/bin/cortex

macOS

zsh by default

Reload your shell config, or set the PATH for this session:

export PATH="$HOME/.cortex/cli/bin:$PATH"
source ~/.zshrc
  1. On bash run source ~/.bashrc instead
  2. Then run cortex --version to confirm it resolves

Still not found? Run it by its full path: ~/.cortex/cli/bin/cortex

Windows

PowerShell

Open a new PowerShell window, or set the PATH for this session:

$env:Path = "$env:USERPROFILE\.cortex\cli\bin;$env:Path"
  1. The installer already saved the folder to your user PATH, so a new window normally fixes it
  2. Then run cortex --version to confirm it resolves

Still not found? Run it by its full path: & "$env:USERPROFILE\.cortex\cli\bin\cortex.exe"

The command is cortex on every system. Once it resolves, cortex --help lists everything it can do.

Everyday commands

cortexOpen the agent in the current folder
cortex -p "Explain this repo"Run one prompt and print the answer, for scripts and CI
cortex -s latestPick up your last session where you left it
cortex modelsList the models your provider offers
cortex updateUpdate to the latest release
cortex uninstallRemove Cortex CLI from this computer

Staying up to date: once a day Cortex checks for a new release and shows ↑ Cortex CLI 1.2.0 is available · run cortex update above the prompt. Run cortex update, then restart it. On a version older than 1.1.9, run the install command once more instead.

Install a specific version

curl -fsSL https://cortex-ide.app/install | bash -s -- --version 1.1.25
$env:CORTEX_VERSION="1.1.25"; irm https://cortex-ide.app/install.ps1 | iex

Open source MIT licence

The whole CLI is on GitHub

Everything that runs in your terminal is public: the agent loop, the tools, the terminal UI and both installers. Read it before you run it, build it from source, or change it and send a pull request.

https://github.com/Cortex-AI-IDE/cortex-ide-cortex-cli

Read the code

TypeScript, built with Bun

Nothing in the binary is a black box. Open src/ and follow a prompt from the input box to the tool call it makes, the file it edits and the test it runs.

Browse the repository →

Build it from source

Needs Bun 1.2 or newer:

git clone https://github.com/Cortex-AI-IDE/cortex-ide-cortex-cli.git
cd cortex-ide-cortex-cli && bun install && bun run build

The build lands in dist/index.js. Start it with node dist/index.js.

Report or contribute

Issues and pull requests

If something breaks, or a tool you need is missing, the issue list is where it gets written down and answered. A fix can arrive as a pull request.

Open an issue →

The MIT licence lets you use it, change it and ship it inside your own tool, as long as the copyright and permission notice stay with it.

Questions

Do I need Cortex Desktop to use the CLI?

No. Cortex CLI is a separate program that runs on its own in any terminal. It uses the same model catalog and providers as Cortex Desktop, so a key that works in one works in the other.

Which systems does it run on?

macOS on Apple Silicon and Intel, Linux on x64 and arm64, and 64-bit Windows. Windows on ARM runs the x64 build through Windows' own emulation. Each release ships one standalone binary per system, so nothing else needs to be installed first.

Where is my API key stored?

On your computer, in ~/.cortex/cli/user-settings.json, or in the provider's environment variable if you prefer, for example OPENROUTER_API_KEY. Keys go straight to the provider you chose and are never sent to Cortex servers.

Which shell does the agent use on Windows?

Git Bash when it is installed, otherwise PowerShell. Set CORTEX_SHELL to choose one yourself. The agent is told which shell it has, so it writes PowerShell commands when that is what runs.

How do I update or remove it?

Cortex tells you when a new version is out, with a line above the prompt such as: Cortex CLI 1.2.0 is available, run cortex update. Run cortex update, then restart cortex. On a version older than 1.1.9, run the install command once more instead; from then on cortex update works. Set CORTEX_NO_UPDATE_CHECK=1 to turn the notice off. Run cortex uninstall to remove the binary and, on Windows, its folder from your PATH.

Are Cortex CLI downloads counted?

Yes, and without identifying you. The installers, cortex update and Homebrew fetch the binary through cortex-ide.app, which notes the version, OS, CPU and channel before redirecting to the same file on GitHub. No IP address, account or device id is stored; a salted hash of the IP only keeps one download from being counted twice in an hour. Set CORTEX_DOWNLOAD_BASE=off to download straight from GitHub, or CORTEX_CI=1 in CI so a test download is not counted.

Is Cortex CLI open source?

Yes. The whole CLI is public at https://github.com/Cortex-AI-IDE/cortex-ide-cortex-cli under the MIT licence: the agent loop, the tools, the terminal UI and both installers (install.sh and install.ps1). Read it before you run it, build it from source with Bun, open an issue, or send a change as a pull request. Cortex Desktop is a separate repository under its own licence.

The terminal says cortex: command not found. What now?

The installer adds ~/.cortex/cli/bin to your PATH, but a terminal that was already open when you installed does not re-read your shell config. Open a new terminal, or reload it in the one you have (source ~/.zshrc on macOS, source ~/.bashrc on Linux), then run cortex again. To fix only the current session, run export PATH="$HOME/.cortex/cli/bin:$PATH" on macOS or Linux, or $env:Path = "$env:USERPROFILE\.cortex\cli\bin;$env:Path" in PowerShell. You can always run it by its full path: ~/.cortex/cli/bin/cortex.

Learn more

Think Limitless. Build Beyond.

Try Cortex CLI.

curl -fsSL https://cortex-ide.app/install | bash

On Windows: irm https://cortex-ide.app/install.ps1 | iex