CodeWork
Get Started

Quickstart

Install CodeWork, connect a model, and make your first change in a few minutes.

You’ll install the CLI, connect a model, ask CodeWork about your codebase, have it make a small change, and review what it did.

1. Install CodeWork

curl
curl -fsSL https://codework.sh/install | sh
pnpm
pnpm add -g @codeworksh/cli

The curl script installs a standalone binary that needs no Node.js, on macOS (Apple silicon) and Linux (arm64, x64, glibc). The pnpm package needs Node.js 24 or later and works on other platforms too.

Check that it’s on your path:

codework --help

See Installation for updating and uninstalling.

2. Connect a Model

Sign in with a ChatGPT Plus or Pro plan:

codework auth login --openai-codex

Or set an API key. OpenRouter gives you hundreds of models with one key:

export OPENROUTER_API_KEY="..."

Models & Pricing covers every provider, including Copilot, Anthropic, Gemini, and local models.

3. Ask About Your Codebase

From your project folder, pick the provider you connected:

ChatGPT plan
codework run \
  --provider openai-codex \
  --model gpt-5.6-luna \
  "Explain how this repository is structured and how to run its checks."
OpenRouter key
codework run \
  --provider openrouter \
  --model deepseek/deepseek-v4.1-flash \
  "Explain how this repository is structured and how to run its checks."

CodeWork searches the repo, reads the files that matter, and summarizes how the project fits together. It streams its answer as it writes it. It prints the session ID first, and a usage summary with the run’s tokens and cost when it’s done.

Your first CodeWork run

Video: codework run exploring a repository, streaming its answer, then printing the usage summary.

4. Make a Change

Continue the same session with --session, so CodeWork keeps what it already learned:

codework run \
  --session <session-id> \
  "Add a short 'Development' section to the README with the commands you found. Then run the checks."

Good first tasks are small and easy to review: docs, a copy fix, a failing test, one function.

CodeWork doesn’t ask before it edits files or runs commands. Start in a git repository with a clean working tree so every change is easy to see and undo.

5. Review the Result

git diff

Keep what you like, or ask for changes in the same session. Throw everything away with git restore ..

6. Set a Default Model

Save the model in your settings so you can drop the flags:

~/.codework/settings.jsonc
{
	// With a ChatGPT plan: { "provider": "openai-codex", "id": "gpt-5.6-luna" }
	"model": { "provider": "openrouter", "id": "deepseek/deepseek-v4.1-flash" },
}
codework run "Find and fix one flaky test"

Next Steps