Skip to content

Guide · Open source

How to use Codewhale: install, run tasks and review changes

Updated · written with AI from the project's own documentation and checked against our catalogue data

Codewhale is an open-source coding agent you run in a terminal. You give it a task, and it reads your git repository, edits files and runs commands until the task is done or it needs your input. This guide shows you how to install it, connect a model provider, run your first task and check what the agent changed.

Codewhalecodewhale-hq/Codewhale · ★ 41.2k · MIT

Quick start

  1. 1Install Codewhale. Run the install script for macOS or Linux, or use npm or Cargo. Make sure Git is available.
  2. 2Open a git repository. Commit or stash your work, then change into the repository root.
  3. 3Start Codewhale. Run the codewhale command from that directory.
  4. 4Set up a provider. Run /provider, pick a provider, paste its API key or choose a local runtime, and select a model.
  5. 5Give it a task. Type a task in plain language and answer any approval prompts for shell commands.
  6. 6Review the changes. Run /receipts to see the files changed and commands run, and use /undo if you want to revert.

Install Codewhale on macOS, Linux or Windows

On macOS and Linux, run the install script from the README. It places the codewhale command and its short alias codew in ~/.local/bin. If your shell then reports command not found, run the PATH line the installer prints. Codewhale can be updated later with codewhale update.

On Windows, the README lists winget, Scoop and the installer from GitHub Releases. npm and Cargo work on any platform that has them. Use only one install method per machine, because two copies on PATH cause confusion.

  • Prerequisite: Git, since the agent is meant to run from a git repository.
  • Prerequisite: an API key for a provider you choose, or a local runtime such as Ollama.
curl -fsSL https://codewhale.net/install.sh | sh

Connect a model provider

Start Codewhale from the root of a git repository with the codewhale command. Then run /provider, or press F3, pick a provider, paste its API key and choose a model. DeepSeek is the default provider. If you want to use a local model instead, pick a local runtime.

If no provider is configured and Ollama is already serving a chat model, Codewhale uses it automatically. From version 0.10.2 it offers Ollama when you send your first message. Codewhale supports more than 40 built-in providers, and any OpenAI-compatible endpoint works.

  • Use /model to switch models between turns.
  • Use /model auto to pick a model for each turn.

Run your first task

Commit or stash your work first. Codewhale applies file edits in your repository without asking by default and shows you the diff. Describe the task in plain language in the message box.

Read-only commands run straight away. For any other shell command, Codewhale asks first. Answer y to run it once, a to allow similar commands for the rest of the conversation, or n to refuse. Use /undo to take back your last request and its file changes, and /help to list commands and keys.

Fix the failing tests and explain what changed.

Choose a mode and permission level

A fresh install starts in Work mode with the Ask permission. Press Tab when the input is empty, or use /mode, to change mode. Plan mode reads and searches but changes nothing. Work mode edits files and runs commands. Operate mode has the same access as Work and keeps going until the goal is verified or it needs your input.

Press Shift+Tab to change permission. Ask applies edits in your repository and asks before non-read-only shell commands. Auto-Review lets rules and a reviewer model approve routine calls. Full Access never asks and turns off Codewhale's sandbox, so use it with care. The modes and permissions guide in the docs has the details.

  • Plan: reads and searches only.
  • Work: edits files and runs commands.
  • Operate: works toward a goal until verified or blocked.
  • Ask: the default permission, with approval for shell commands.
  • Full Access: no prompts and no sandbox.

Review what the agent changed with /receipts

The /receipts command lists the files changed, the commands run, the web and MCP calls made, the agents started, approvals and who gave them, and any failures. After you quit, run codewhale receipts --last to see the same record.

Use /undo to revert your last request and its file changes in one step. /restore rolls the whole workspace back to an earlier snapshot, but it overwrites later edits, so it needs /trust on or Full Access.

codewhale receipts --last

Run a task in scripts or CI with codewhale exec

codewhale exec runs one task without the interface, which suits scripts and CI. By default, --auto uses Full Access: tools run without asking, shell commands have no Codewhale sandbox, and trust mode lets file tools write outside the workspace. To keep the shell sandbox and workspace restrictions, add --sandbox workspace-write, which also keeps trust mode off.

  • Answer-only and --json runs are saved to receipts only when resuming or when conversation compaction starts. Use --output-format stream-json to always save them.
codewhale exec --auto --sandbox workspace-write "fix the failing tests and explain what changed"

What people use it for

  • Fixing failing tests in a git repository and reviewing the resulting diff.
  • Switching between providers such as DeepSeek or Anthropic to compare results on the same task.
  • Running a local model through Ollama when you do not want to send code to a hosted provider.
  • Running a single task from a CI script with codewhale exec and keeping a receipt of what changed.

Frequently asked questions

Is Codewhale free?

Codewhale is released under the MIT licence, as stated in the README. Using a model provider may still require an API key from that provider, and the README does not describe provider pricing.

What do I need to install Codewhale?

The README lists Git, since the agent is meant to run from a git repository, plus an API key for a chosen provider or a local runtime such as Ollama. Install with the macOS and Linux script, npm, or Cargo.

Can I use Codewhale with a local model?

Yes. The README says models running on your own machine work, including local models through Ollama, vLLM or SGLang. If Ollama is already serving a chat model, Codewhale can use it automatically when no provider is configured.

How is Codewhale different from Aider or Cline?

The README does not compare Codewhale with other tools, so this guide cannot rank it against them. Comparable projects named in the directory include Aider, OpenCode, Cline and Goose. Check each tool's own documentation for differences.

Is it safe to let Codewhale run commands?

The default Ask permission applies file edits and asks before shell commands that are not read-only. Full Access never asks and turns off the sandbox, so review diffs and approve commands if you care about control.

How do I undo what Codewhale changed?

Use /undo to take back your last request and the file changes it made, in one step. Use /restore to roll the whole workspace back to an earlier snapshot, which needs /trust on or Full Access.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Codewhale suits developers who want an agent inside a terminal and git repository, who want to switch providers or use a local model, or who want a record of what the agent changed. It is a command-line tool, so people who want a point-and-click app should look elsewhere. Anyone who cannot review diffs or approve shell commands should also be cautious, because the default settings apply edits without asking and Full Access turns off the sandbox.

Install options & downloads