A native Rust terminal interface for Claude Code.
Ayush's fork of srothgan/claude-code-rust.
Note
This is a fork. The original project is Claude Code Rust by Simon Rothgang. This fork keeps the upstream architecture, follows upstream releases, and adds the changes listed under What this fork adds. Fork releases come from this repository's releases; npm install -g claude-code-rust and the upstream install scripts install the upstream build, not this fork. Report fork-specific problems here and upstream problems upstream.
GitHub shows the dark or the light pictures to match your own theme. They are made with demo data by recordings/showcase.sh.
Claude Code Rust replaces the stock Claude Code terminal interface with a native Rust binary built on Ratatui. It talks to Claude through a local bridge to Anthropic's public Agent SDK. The SDK owns session behavior; the Rust application owns everything you see. Tool calls, file edits, terminal commands and permissions work as they do in Claude Code, with your existing Claude account.
The stock interface runs on Node.js with React Ink, which redraws whole frames over raw ANSI escape codes. Users widely report flicker, high idle CPU, a 200-400 MB memory baseline, garbled resizes, input lag as context grows, lost scrollback and freezes on large pastes. Claude Code Rust draws with diffed, direct terminal control through Crossterm and Ratatui, with no full-frame redraws and no React render loop. These improvements come from daily use, not from a benchmark against the stock interface; none exists yet.
The additions below are measured against upstream commit 26f9b12 (v0.15.2); ordinary upstream features are not listed. The changelog has the details of each release.
| Change | What it does |
|---|---|
| One agent inspector (#40, #34) | The full-screen /agents view is the inspector the footer shelf and Ctrl+T lead to: Enter on an agent in the Ctrl+T list, Left Arrow on an empty composer or /agents opens it. Beside or below the list it shows the selected agent's model, usage, activity, recent tools and prompt; Enter reads its saved transcript, including tool calls, and s stops it, showing stopping until the session reports it stopped. |
| Change | What it does |
|---|---|
| Accessible palette (#36) | One semantic palette after Apple's Human Interface Guidelines replaces named ANSI colors, which terminal themes remap. Every text color reaches 4.5:1 contrast against the terminal background and the app's own fills, and tests enforce it. Status badges are tinted, with Apple's meanings for green, yellow, blue, gray and red. |
| Light and dark appearance | The palette, code blocks and file previews follow the terminal's appearance. See Appearance. |
| New crab | The welcome crab is pixel art drawn in block elements. It looks around and scuttles while connecting, and snaps its claws once when it connects. |
| Dependencies | Agent SDK 0.3.300, Rust 1.98 toolchain, refreshed Cargo and npm lockfiles. |
- Responsive footer and agent shelf. The footer adapts to the terminal width and keeps session facts in one place. While Claude delegates, a bounded shelf shows each agent's model, activity, usage and elapsed time.
- Agent inspector. Ctrl+T selects an agent, and Enter opens its model choice, recent tools, prompt and saved messages.
| Change | What it does |
|---|---|
| Upstream sync (#28) | Upstream main at a187e1c, including upstream #444. |
| Slash ranking and trust prompt (#29) | Prefix matches rank before substring matches, and the trust prompt names the directory. |
| Welcome animation (#30) | The crab animates while connecting, greets once, then rests. Nothing moves at idle, and prefersReducedMotion keeps it still. |
/export naming (#31) |
Default names export-<session-id>-<UTC>.md, with -2, -3 suffixes on collision. |
| Command-line surface (#32) | Refuses to start without a terminal (exit 25), checks --dir and --bridge-script early, scopes session flags to interactive launches, guards subcommand typos and documents exit status. |
| Change | What it does |
|---|---|
| Launch and session flags (#11) | --name, --fork-session, repeatable --add-dir, file or inline --settings and --mcp-config, --strict-mcp-config, and replacement or appended system prompts from text or files. |
| Hook visibility (#12) | Progress and completion notices, per-hook duration, slow-hook summaries and startup milestones in Status. Hook output is sanitized and redacted before it is kept. |
/reload and /export (#13) |
Reload skills without restarting the session; export saved history as Markdown without overwriting a file. |
Native /diff (#15) |
Working-tree changes, including untracked files and repositories without a first commit, beside the session's tool diffs. |
/agents panel (#18) |
SDK subagent history and current task state; only a matching running task can be stopped. |
| Transcript search (#19) | /search and Ctrl+F over kept user, assistant and visible tool text, with Unicode-aware matching. |
| Session management (#21, #22) | Tags and confirmed deletion in the picker, exact-title resume with ambiguity reporting, session sizes and a compact-first option for large sessions. |
| Session accents (#23) | A stable color per session; /color applies only after the SDK confirms it. |
| Input ergonomics (#24) | Backslash-Enter newline, Ctrl+G external editor, Esc Esc rewind, Ctrl+D and /exit, Ctrl+O transcript detail, Ctrl+T tasks, remappable shortcuts and paste-safe input. |
| Composer and footer (#25) | filled or rules composer, a footer with context, session, rate windows, agents and permissions, the latest plan, and a user-level statusLine command. |
| Session fixes (#16) | Symlinked settings are read but never written through; model, mode and effort survive rewind; SDK titles are restored while explicit launch names win. |
| Tooling (#7-#10, #17) | Portable bridge test discovery, a local check runner and Nix shell, a live end-to-end harness, a render corpus with revision-to-revision benchmarks, and CI that compares against the pull request's recorded base. |
- SDK local-command replies. Replies to
/rename,/color,/contextand/usageappear in the transcript even when the SDK does not stream them, and streamed replies are not printed twice (upstream #444). - Live session names. Status, the rename dialog and title generation use the SDK's current session title (upstream #445).
- Fork releases. GitHub releases carry platform archives, a release bundle and SHA-256 checksums under fork version numbers, without publishing to the upstream npm package.
A stock-style memory-file picker, a native remote-control start/stop/share flow, shell input mode, Vim keymaps and general MCP resource attachments wait on operations the public Agent SDK does not expose yet. /memory opens the Memory settings instead.
Install the Claude Code CLI first and keep claude on PATH; some features still go through it (details).
Download the archive for your platform from this fork's latest release and check it against the release's SHA256SUMS. Keep the extracted layout whole: it includes the bridge and its runtime.
To run unreleased changes, clone https://github.com/ayush5harma/claude-code-rust.git and follow CONTRIBUTING.md.
These install Simon Rothgang's distribution, not this fork:
# macOS and Linux
curl -fsSL https://raw.githubusercontent.com/srothgan/claude-code-rust/main/scripts/install/install.sh | sh# Windows PowerShell
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm 'https://raw.githubusercontent.com/srothgan/claude-code-rust/main/scripts/install/install.ps1' | iex"# Node.js 24+
npm install -g claude-code-rustThe installation guide covers pinning, install locations, switching methods, uninstalling and troubleshooting.
claude-rs
claude-rs --model opus --permission-mode plan "Review this project"
claude-rs --continueUsage lists the startup flags, shell completions and man pages.
Agent SDK billing is unchanged. Anthropic has paused the previously announced Agent SDK credit change. Agent SDK usage, including
claude -pand third-party apps like this one, still draws from your normal Claude subscription limits. See Use the Claude Agent SDK with your Claude plan.
The palette has a dark and a light variant. At startup, claude-rs picks one in this order:
CLAUDE_RS_APPEARANCE=lightordark, if set.- The background color the terminal reports (an OSC 11 query, answered by Ghostty, iTerm2, kitty, WezTerm, Terminal.app and most others).
- Claude Code's own
themesetting, if the terminal does not answer and the theme is a light or dark one (light,dark-daltonizedand so on). - Dark.
The colors are Apple's system colors from the Human Interface Guidelines. Where the default variant fell short of the contrast floor, the increased-contrast variant is used. Body text uses the terminal's own foreground color. States carry a label or an icon as well as a color, so nothing depends on telling hues apart. Set prefersReducedMotion in Claude Code to keep the crab still.
The upstream manual covers installation, usage, help, slash commands, settings, troubleshooting and development. Fork additions are documented here and in the changelog.
For the design history, including the move from fullscreen to inline rendering in 0.12.0, see Simon Rothgang's I rebuilt Claude Code's terminal UI in Rust. Then I deleted 12,000 lines of it.
CONTRIBUTING.md has the build, test and verification commands. To refresh the screenshots above after a UI change, run recordings/showcase.sh. It needs VHS and Node.js, and it drives the app with the test suite's fake bridge, so no login is needed.
The project is pre-1.0 and under active development. It follows new Agent SDK releases and problems found in daily use, and has no fixed roadmap or 1.0 date.
Startup is bounded by the Agent SDK runtime that the interface wraps. The Rust interface is fast, but a session can still take noticeable time to become available.
Apache License 2.0, as upstream.
This project is not affiliated with, endorsed by, or supported by Anthropic.
The original author's clarification applies to this fork: claude-code-rust is a terminal UI written from scratch in Rust. It is not a fork, copy or port of the latest Claude Code source leak. It talks to Anthropic's official Agent SDK as a runtime dependency instead, the same way any other third-party tool would. No Anthropic source code was read or used as reference at any point during development.
The project authenticates through your existing Claude Code account via the Agent SDK, and the Agent SDK's terms allow building on top of it. Billing, credits, limits, and overage behavior are controlled by Anthropic, including any future changes Anthropic may make to how Agent SDK usage is metered. Other community projects do the same. As far as I can tell, using this project is fine, but I am a single maintainer, not a lawyer. If anything changes on Anthropic's end, I will update this section and adjust the project accordingly.
This project's source code is licensed under Apache-2.0. The Agent SDK itself is proprietary and governed by Anthropic's Commercial Terms of Service.
For official Claude documentation, see https://claude.ai/docs.