# Codewhale

> An open-source terminal coding agent in Rust, with the model provider left up to you

- Category: AI Coding / Autonomous Coding Agents
- Language: Rust
- Licence: MIT
- Repository: https://github.com/codewhale-hq/Codewhale
- Website: https://codewhale.net
- Canonical page: https://ai-tldr.dev/tools/codewhale/
- Updated: 2026-05-03

## In short

Codewhale is an open-source coding agent that runs in your terminal. It reads your repository, edits files, runs commands, inspects the results and keeps working toward a goal — either through its TUI or as a one-shot command. It sits in the Autonomous Coding Agents category of the AI Coding tools and is open-source, written in Rust and licensed MIT.

## Overview

Codewhale is an open-source coding agent that runs in your terminal. It reads your repository, edits files, runs commands, inspects the results and keeps working toward a goal — either through its TUI or as a one-shot command. It is written in Rust and distributed through npm, Cargo, Docker, Nix, Scoop, prebuilt archives, Android/Termux and a CNB mirror.

The project's distinguishing choice is provider neutrality. You can connect hosted model providers or point it at local models served through Ollama, vLLM or SGLang, and swap provider and model mid-session with the `/model` command. Codewhale began life as `deepseek-tui` and still keeps that configuration and session compatibility, but it is now provider-neutral and independently maintained, and states it is not affiliated with any model provider.

Control over what the agent may do is explicit rather than implicit. Plan mode is read-only; Ask, Auto-Review and Full Access make approval behaviour visible; `/undo` reverts the last turn and `/restore` returns the workspace to an earlier snapshot. Optional OS sandboxing adds a stronger execution boundary where the platform supports it. For longer work, sessions can be saved, a durable `/goal` set, and workflows reviewed before they run. The agent is extensible through MCP servers, skills, hooks and agent roles kept as readable files in project or personal settings.

## What it does

- Provider-neutral: hosted providers or local models through Ollama, vLLM or SGLang, switchable in-session with `/model`
- Graded approval modes — Plan (read-only), Ask, Auto-Review and Full Access — plus optional OS sandboxing
- `/undo` reverts the last turn and `/restore` rolls the workspace back to an earlier snapshot
- Non-interactive `codewhale exec "…"` for scripting a task without opening the TUI
- Extensible via MCP servers, skills, hooks and agent roles stored as readable files
- Saved sessions, a durable `/goal`, and reviewable workflows for long-running work
- Shell completions for bash, zsh, fish, PowerShell and elvish

## Getting started

The quickest route is the npm package; the first run walks you through connecting a provider or staying offline. All commands below come from the project README.

1. Install and launch

   Install globally with npm, then start the TUI.

```bash
npm install -g codewhale
codewhale
```

2. Talk to it like a teammate

   Inside the TUI you describe the task in plain language.

```text
Fix the failing tests and explain what changed.
```

3. Or run a single task without the TUI

   Use `exec` when you want one task done from a script or CI step.

```bash
codewhale exec "fix the failing tests and explain what changed"
```

4. Add shell completion

   One command per shell — bash, zsh, fish, powershell or elvish.

```bash
codewhale completion zsh
```

5. Explore commands and switch models

   Run `/help` in the TUI for the command list and keyboard shortcuts, and `/model` to change provider or model.

```text
/help
/model
```

## When to use it

- Reach for it when you want a terminal coding agent that is not tied to one model vendor
- Reach for it when work has to stay local — point it at Ollama, vLLM or SGLang instead of a hosted API
- Reach for it when you need explicit approval boundaries, with an undo and a workspace snapshot to fall back on
- Reach for it to script a one-off repository change from CI with `codewhale exec`

## Version history

- 2026-05-03 v0.8.7: Covered by AI/TLDR under the project’s former name, DeepSeek-TUI: a single-binary Rust terminal coding agent wiring DeepSeek V4 Pro and Flash into the terminal, with parallel sub-agents, thinking-mode streaming and MCP servers, and no Node or Python runtime.
