What is Whet?
Whet is an open-source terminal coding agent in the same category as Claude Code and similar tools. It lives in your terminal, understands your codebase, and writes code for you using any LLM.
What makes it different:
- Open source (MIT) — you own the code, the data, and the workflow
- Provider-agnostic — Ollama, llama.cpp, Anthropic Claude, Google Gemini, or any OpenAI-compatible API
- Single binary —
cargo installand you're done, no Node.js, no Python, no Docker - Offline-capable — pair with a local LLM and nothing ever leaves your machine
Quick Start
# 1. Install (from source)
&&
# 2. Pull a local model (or configure a cloud provider)
# 3. Start coding
Or use with a cloud provider:
Demo
$ whet
whet v0.1.0
Model: qwen3:8b
Permission: default
Type Ctrl+D to exit.
you> Find all deprecation warnings and fix them
[tool: grep] {"pattern": "deprecated", "path": "."}
I found 3 deprecation warnings. Let me fix them one by one.
[tool: read_file] {"path": "src/main.rs"}
[tool: edit_file] {"path": "src/main.rs", ...}
Tool 'edit_file' wants to execute:
path: src/main.rs
old_text: use old_module::deprecated_fn;
new_text: use new_module::updated_fn;
Allow? [y/N/a(lways)] y
Done! Fixed all 3 deprecation warnings.
(2.3s)
Key Features
Project Instructions (WHET.md)
Like CLAUDE.md for Claude Code — place a WHET.md (or .whet.md) in your project root to give Whet project-specific context. It is automatically loaded and injected into the system prompt.
Use /init to generate a starter template.
11 Built-in Tools
| Tool | Category | Description |
|---|---|---|
read_file |
File | Read file contents |
write_file |
File | Create or overwrite a file |
edit_file |
File | Replace an exact text match in a file |
apply_diff |
File | Apply a unified diff patch (multi-hunk supported) |
list_dir |
File | List directory contents (recursive option) |
grep |
Search | Search for regex patterns recursively |
repo_map |
Search | Show project structure with definitions |
shell |
System | Execute a shell command |
git |
System | Git commands with safety tiers |
web_fetch |
Web | Fetch and extract text from a URL |
web_search |
Web | Search the web via DuckDuckGo |
Web tools are disabled by default. Enable with
web_enabled = truein config.
Git Safety Tiers
| Tier | Commands | Behavior |
|---|---|---|
| Always allowed | status, diff, log, show, branch, stash |
No approval needed |
| Approval required | add, commit, checkout, switch, pull, fetch, push, merge, tag, cherry-pick, remote, reset |
User must approve |
| Always blocked | reset --hard, clean, push --force, rebase |
Blocked for safety |
MCP Extension
Extend Whet with external tools via MCP (Model Context Protocol) servers:
[[]]
= "filesystem"
= "npx"
= ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
Permission System
| Mode | File reads | File writes | Shell / Git |
|---|---|---|---|
default |
Auto | Ask | Ask |
accept_edits |
Auto | Auto | Ask |
yolo |
Auto | Auto | Auto |
Session Management
Conversations are saved per working directory and can be resumed later.
| Flag | Short | Description |
|---|---|---|
--resume |
-r |
Interactive session picker for the current directory |
--resume <id> |
-r <id> |
Resume a specific session by ID |
--continue |
-c |
Resume the most recent session in the current directory |
When resuming, previous user/assistant messages are displayed so you can see the conversation context at a glance.
Context Compression
Automatic conversation summarization prevents unbounded memory growth. Use /compact for manual compression.
Commands
| Command | Description |
|---|---|
/model <name> |
Switch LLM model at runtime |
/mode <mode> |
Change permission mode (default / accept_edits / yolo) |
/plan |
Toggle plan mode (read-only analysis) |
/test [cmd] |
Auto test-fix loop (default: cargo test, max 5 rounds) |
/init |
Generate WHET.md template in current directory |
/compact [msg] |
Compress conversation context (optional custom instruction) |
/skills |
List loaded skill files |
/clear |
Clear conversation and start fresh |
/help |
Show all commands |
Ctrl+D |
Exit |
LLM Providers
| Provider | Network | API Key | Config provider |
|---|---|---|---|
| Ollama | Local | Not required | "ollama" |
| OpenAI-compatible (llama.cpp, LM Studio, vLLM) | Local / Remote | Optional | "openai_compat" |
| Anthropic Claude | Cloud | Required (ANTHROPIC_API_KEY) |
"anthropic" |
| Google Gemini | Cloud | Required (GEMINI_API_KEY) |
"gemini" |
Configuration
Config file: ~/.whet/config.toml
[]
= "ollama"
= "qwen3:8b"
= "http://localhost:11434"
# api_key = "sk-..."
# streaming = true
[]
= 10
# permission_mode = "default"
# web_enabled = false
# context_compression = true
# skills_dir = "~/.whet/skills"
[]
= "~/.whet/memory.db"
[]
= "anthropic"
= "claude-sonnet-4-5-20250929"
# api_key = "sk-ant-..." # or set ANTHROPIC_API_KEY env var
[]
= "gemini"
= "gemini-2.0-flash"
# api_key = "..." # or set GEMINI_API_KEY env var
[]
= "openai_compat"
= "your-model-name"
= "http://localhost:8080"
= "sk-..."
Skills
Custom prompt templates loaded from ~/.whet/skills/:
Skills are injected into the system prompt automatically. Use /skills to list them.
CLI
vs Claude Code
| Whet | Claude Code | |
|---|---|---|
| License | MIT (open source) | Proprietary |
| LLM providers | Any (Ollama, Anthropic, Gemini, OpenAI-compat) | Anthropic only |
| Offline mode | Yes (with local LLM) | No |
| Runtime | Single Rust binary | Node.js |
| Project instructions | WHET.md |
CLAUDE.md |
| MCP support | Yes | Yes |
| Permission system | 3 modes | Yes |
| Session management | --resume / --continue |
--resume / --continue |
| Context compression | Yes (auto + manual) | Yes |
Architecture
whet (single binary)
Terminal (REPL) <--> Agent Loop
|
+-- LLM Provider
| Ollama / OpenAI / Anthropic / Gemini
|
+-- Tool Executor
| 11 built-in + MCP + Skills
|
+-- Security Layer
| Path safety, Permissions, Git safety tiers
|
+-- SQLite Memory
Chat history, Resume, Compression
Development
All pull requests are checked by GitHub Actions: format, clippy, test, and build.
Contributing
Contributions are welcome!
- Issues — Use GitHub Issues for bug reports and feature requests
- Pull Requests — Fork, create a feature branch, ensure all checks pass, and submit a clear PR
- Commits — Use imperative mood with prefix:
feat:,fix:,docs:,refactor:,test:,chore: