Skip to content

CLI

Cortex CLI

Use Cortex from an interactive terminal, scripts and CI while keeping sessions connected across clients.

Cortex CLI is the first-party terminal client for Cortex. It supports an interactive full-screen or inline experience and structured automation for scripts and CI. It connects terminal work to Cortex conversations, project context, governed workflows and managed Cloud execution.

Download the signed installer for macOS, Windows or Debian Linux from the authenticated Console → Downloads page. Cortex CLI is distributed privately; do not install similarly named packages from a public registry.

After installation:

Terminal window
cortex --version
cortex doctor
cortex auth login
cortex

The first cortex command also starts browser sign-in when no credential is available. Credentials are stored in the operating-system credential store.

The interactive client supports a full-screen terminal interface and an inline mode. A workspace, selected files and the current conversation provide context for explanations, investigations and code work. Streaming responses and visible tool requests keep the task progress available in the terminal.

Durable sessions support continuing work instead of beginning every invocation from scratch. The --continue option resumes the newest chat bound to the workspace, while session commands provide explicit control over saved work. See sessions and workflows.

Automation provides text, JSON and JSONL output, command approval controls and exit codes suitable for scripts. This lets a pipeline distinguish a completed task from a failure or an operation awaiting the required authority. Structured output is useful for collecting results without parsing a terminal display.

Configure the available tools, approvals and execution scope for the job before running it. The automation guide describes the supported invocation and result contract.

The CLI includes commands for governed workflows, evidence workspaces, research and recipes. A research task can preserve supporting sources for a later implementation; a recipe describes repeatable work with parameters and completion checks. Scheduled automation commands expose eligible schedules and their recent runs, including pause, resume and run controls.

These features connect a terminal request to a task with inspectable progress and a reviewable outcome. See research and recipes and conversational work.

Local execution uses the authorized workspace and installed tools. Cortex Cloud provides a managed target for eligible work, with handoff, progress, validation and release evidence commands. Choose the target based on project availability, tool requirements and organization policy.

Cloud results remain tied to the task and validated project revision. The Cloud and evidence guide explains how to inspect the outcome and export eligible evidence.

Use Cortex CLI when the repository and its tools are already available in a local terminal, remote shell or approved development environment. Typical objectives include understanding an unfamiliar project, diagnosing a failing test, preparing a focused implementation, reviewing a patch and researching current technical guidance.

The important unit of work is the outcome, not a generated shell command. Describe the behavior to change, constraints to preserve and checks that would prove completion. Cortex can use the permitted project context, propose work and report the observed result. A plausible patch is not proof that the build or tests passed.

Two interaction styles, one connected task

Section titled “Two interaction styles, one connected task”

The full-screen interface is suited to focused work with conversation, task state and review controls. Inline mode fits ordinary shells and more constrained remote sessions. Automation provides a separate machine-readable contract for jobs that need a stable result rather than an interactive display.

Saved sessions let you return to an existing objective near the affected project. For longer tasks, a governed workflow can retain progress, evidence and outstanding decisions across interruption. Resuming a conversation and resuming an execution workflow are related but distinct operations; inspect task state before starting work again.

Reading context, changing a file, executing a command and publishing an outcome have different consequences. The CLI presents permitted project and terminal actions for review according to the configured approval policy. Repository guidance can inform the task but cannot grant itself new authority.

Non-interactive use does not invent a user’s approval. Configure an explicitly bounded job and handle a result that requires additional authority. A CI task should not silently broaden its permissions because its next step would be convenient. See automation for output and exit behavior.

Diffs, test results, command outcomes and project state can support the final conclusion. Review what was actually checked, which revision it refers to and what remains incomplete. Preserve a failing check when it explains a defect; changing the test merely to obtain a pass does not establish the requested behavior.

An objective can begin in Discover during documentation research, continue in the CLI for implementation and use Cortex Cloud for eligible managed validation. Cortex Connect keeps supported progress available to other clients while each environment retains its own permissions and execution boundary.

Profiles, configuration provenance, model selection and repository trust help adapt the CLI to an approved environment. Repository instructions, skills, hooks and MCP connections are governed by the applicable permissions. The generated manual and shell completions make command discovery available from the terminal.

Signed updates, rollback and diagnostic commands support maintaining the installed client. Opt-in telemetry has separate status and enable/disable controls. See customization and updates and diagnostics for the user settings.

Through Cortex Connect, the CLI joins Discover, Developer Tools, Browser Extensions and Mobile around a shared objective and supported session continuity. The connected service enforces workflow state, approvals and organization policy across those clients.