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.
Cortex CLI v1.1.25
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
curl -fsSL https://cortex-ide.app/install | bash
irm https://cortex-ide.app/install.ps1 | iex
npm install -g @cortex-ide/cli
Coming soon
bun install -g @cortex-ide/cli
Coming soon
brew install Cortex-AI-IDE/tap/cortex
Coming soon
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
The same habits as Cortex Desktop, sized for a terminal.
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.
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.
Pick a provider, paste its key, and it stays on your computer. Requests go straight to the provider, never through Cortex.
Each command downloads the build made for your system from the latest release. Nothing else needs to be installed first.
Open Terminal and run:
curl -fsSL https://cortex-ide.app/install | bash
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.
Open a terminal and run:
curl -fsSL https://cortex-ide.app/install | bash
cortex in ~/.cortex/cli/bin and adds it to your PATH for bash, zsh or fishWhen 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.
Open PowerShell and run:
irm https://cortex-ide.app/install.ps1 | iex
cortex-windows-x64.exe%USERPROFILE%\.cortex\cli\bin and adds that folder to your user PATHThen open a new PowerShell window and run cortex. On a Windows ARM PC the x64 build runs through Windows' emulation.
Installs the same binary through npm, bun or Homebrew.
npm install -g @cortex-ide/cliComing soonbun install -g @cortex-ide/cliComing soonbrew install Cortex-AI-IDE/tap/cortexComing soonStart it inside the project you want to work on.
$ cd my-app $ cortex
Pick your provider with ↑ ↓ and paste its key. Each provider shows where to get one. The key stays on your computer.
› Add a dark mode toggle to the settings page
Cortex plans the work, shows its task list, edits the files and runs your tests.
cortex is not foundThe 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.
Reload your shell config, or set the PATH for this session:
export PATH="$HOME/.cortex/cli/bin:$PATH"
source ~/.bashrc
source ~/.zshrc; on fish run fish_add_path ~/.cortex/cli/bincortex --version to confirm it resolvesStill not found? Run it by its full path: ~/.cortex/cli/bin/cortex
Reload your shell config, or set the PATH for this session:
export PATH="$HOME/.cortex/cli/bin:$PATH"
source ~/.zshrc
source ~/.bashrc insteadcortex --version to confirm it resolvesStill not found? Run it by its full path: ~/.cortex/cli/bin/cortex
Open a new PowerShell window, or set the PATH for this session:
$env:Path = "$env:USERPROFILE\.cortex\cli\bin;$env:Path"
cortex --version to confirm it resolvesStill 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.
cortex | Open the agent in the current folder |
|---|---|
cortex -p "Explain this repo" | Run one prompt and print the answer, for scripts and CI |
cortex -s latest | Pick up your last session where you left it |
cortex models | List the models your provider offers |
cortex update | Update to the latest release |
cortex uninstall | Remove 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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 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.
Connect any OpenAI-compatible endpoint and its models, for the CLI and Desktop alike.
Read the guide →Modes, memory, the agent loop and tips that apply in the terminal too.
Read the docs →What changed in each Cortex CLI version, with the files for every system.
See releases →Prefer an editor with the agent built in? The same agent, with tabs, diffs and a terminal.
Download Desktop →Think Limitless. Build Beyond.
curl -fsSL https://cortex-ide.app/install | bash
On Windows: irm https://cortex-ide.app/install.ps1 | iex