Local coding agent CLI.
Read, write, edit files, run bash, and manage sessions — privately, on your machine.

curl -fsSL https://zene.sh/install.sh | sh

Or download pre-built binaries from GitHub Releases (Linux & macOS).

zene — local coding agent zene --tui [zene] session started id: b8f1d3c0-9a4f-4b0e profile: full (read & write) mcp: connected (mcp__filesystem) Refactor error handling in turn.rs to use anyhow [step 1] calling tools... [tool] Edit(crates/core/src/turn.rs) ✓ Unified diff generated (1 matches replaced) [step 2] calling tools... [tool] Bash(cargo test) ✓ cargo test passed (1.2s) ✓ Refactoring complete. All tests passed successfully.

What is Zene?

Zene is a local-first AI coding agent CLI written in Rust. It runs entirely in your project directory, parses workspace contexts, edits files with high precision, runs test suites, and orchestrates tasks locally on your machine.

Zene prioritizes safety, speed, and reliability. It is fully configurable and supports stdio-based MCP servers and lifecycle hooks.

Local Sandbox Safety

Zene protects your machine's environment. File read/write and command execution are constrained by a path isolation policy. Sensitive folders like .git/ and node_modules/ are protected by hard denylist policies.

# Start with manual approval (asks y/n on Write/Edit/Bash)
zene

# Start in YOLO mode (auto-approves changes)
zene --yolo

Context Compaction (v2)

Say goodbye to context window exhaustion. Zene automatically calculates model Token load before every step and utilizes an efficient three-stage compaction pipeline:

1. Truncate: Local truncation of oversized tool outputs.
2. Slice Keep: Drops middle-tier history while preserving system instructions and history summaries.
3. LLM Summarize: Collapses old dialog turns into a concise structural summary.

Steerable Control (Human-in-the-loop)

Keep the agent on track without waiting for a turn to complete. The steer buffer allows you to queue follow-up instructions mid-step. Use /steer <msg> in REPL to inject guidance between tools or assistant steps.

# Inside a session, when Zene is running:
/steer check if compiling before running tests

Planning Mode

For complex restructurings, toggle planning mode. In /plan mode, Zene's actuators are locked to read-only tools. It explores the workspace and generates a proposed plan file. Moving back to coding mode requires explicit user confirmation.

# Enter plan mode inside the CLI
/plan

Extensible with MCP & Skills

Zene integrates with Model Context Protocol (MCP) servers and local Skill folders. Define custom stdio MCP servers to register new tools dynamically. Add skill instruction files under .agents/skills/ to teach Zene target guidelines.

# ~/.zene/config.toml
# Register MCP servers globally
[[mcp_servers]]
name = "my_database"
command = "npx"
args = [
  "-y",
  "@modelcontextprotocol/server-postgres",
  "postgresql://localhost"
]

Commands

CommandDescription
zeneLaunch Zene interactive REPL in the current directory
--tuiLaunch the beautiful Ratatui-based terminal UI
--yoloLaunch in auto-approve mode, skipping permission gates
sessionsList saved conversation sessions in the current directory
--session <id>Resume a previous conversation session by ID

Configure

Configure Zene globally in ~/.zene/config.toml or override settings locally per-project in .zene/config.toml. Set provider keys directly or via environment variables.

# ~/.zene/config.toml
provider = "openai"     # "openai" or "anthropic"
model = "gpt-4o"
include_workspace_context = true

[compaction]
trigger_ratio = 0.85
min_keep_messages = 20