Skip to main content
Open-source AI CLI

Build apps with AI from your terminal

The Codebase CLI brings the AI app builder to your shell: a local coding agent, headless automation, browser OAuth, and hosted builds streamed to your terminal. The CLI is open source and your generated projects stay portable.

macOS / Linux

curl -fsSL https://codebase.design/install.sh | sh

npm

npm i -g codebase-cli

Windows PowerShell

irm https://codebase.design/install.ps1 | iex

Launch Codebase

codebase

Run it from the project directory you want to work in. Requires Node.js 20 or newer. First launch offers Codebase OAuth or your own provider key. Package metadata is on npm.

How the CLI workflow works

Sign in with browser OAuth

On first launch, choose Codebase OAuth. The CLI opens codebase.design, completes a PKCE callback on localhost, and returns to your terminal automatically — no API key copying.

Work in a real repository

Run codebase in any project. The agent reads and edits files, streams tool calls and diffs, runs commands and tests, keeps a task list, and supports hosted credits, BYOK, local OpenAI-compatible endpoints, or codebase auto "..." for a trusted one-shot build.

Hand builds to the web

Use headless runs, project pulls, SSH targets, MCP tools, web-build handoff, and the public REST API to move between local coding, CI, and hosted Codebase projects.

Connected product surfaces

Public REST API

The API the CLI is built on is live now: hosted builds, project files, status, and account usage, authenticated with API keys or OAuth bearer tokens.

Read the API docs

Platform login

Browser OAuth with PKCE is live on codebase.design, with scoped tokens, refresh, revocation, local credentials, API keys, and dashboard workflows.

Manage API keys

Web build handoff

The web workspace and CLI use the same projects, build turns, and account credits, so you can move between local work and hosted previews.

Open the workspace

Frequently asked questions

What is the Codebase CLI?

An open-source command-line coding agent for building and changing apps from your terminal. You sign in with browser OAuth, describe a task, and the agent edits your local project while staying connected to the same Codebase account and API surface.

Is the CLI available now?

Yes. Install it with the shell, npm, or PowerShell command on this page. The package includes the interactive coding agent, headless automation, browser OAuth, project management, and hosted web builds.

Will the CLI be open source?

It already is. The CLI source, issue tracker, tests, and release history are public in the Codebase Foundation GitHub repository. The hosted web service is a managed product.

How does CLI login work?

The CLI starts an OAuth 2.0 authorization-code flow with PKCE, opens codebase.design in your browser, listens for a localhost callback, and stores scoped tokens tied to your account. You can also bring your own provider key directly.

What model does the CLI use by default?

Signed-in CLI sessions use Codebase Auto by default: the codebase/d4f route, served through Codebase inference. You can switch models in the terminal with /model.

What can I automate today without the CLI?

The public API supports authenticated builds, project access, and account usage. Generate a key in settings or use an OAuth bearer token, then call the documented endpoints from CI or your own tooling.

Start in your terminal

Install the agent, open a project, and choose browser OAuth on first launch. You can switch providers or pull a hosted build whenever the job calls for it.

Install with npm

npm i -g codebase-cli