Skip to content

Claude Code Rust

A native Rust terminal interface for Claude Code. Drop-in replacement for Anthropic's stock Node.js/React Ink TUI, built for performance and a better user experience.

Version CI Docs License

About

Claude Code Rust replaces the stock Claude Code terminal interface with a native Rust binary built on Ratatui. It connects to the same Claude API through a local Agent SDK bridge. Core Claude Code functionality works unchanged, including tool calls, file editing, terminal commands, and permissions.

Claude Code Rust explaining the terminal problems its native Rust interface solves

Prerequisite

Install the Claude Code CLI and keep claude on PATH for some functionality not yet supported by the Anthropic SDK. See the dependency and feature overview for details.

Install

Install script (recommended, v0.14.0+)

macOS/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"
Already have Node.js 24+? Use npm instead
npm install -g claude-code-rust

The package ships prebuilt platform binaries and its own Bun runtime for the Agent SDK bridge, so no Rust toolchain, Bun install, or postinstall script is needed. Node.js 24+ is still required to run the claude-rs launcher.

See the installation guide for release pinning, custom install locations, switching install methods, uninstall, and troubleshooting.

Usage

claude-rs
claude-rs --model opus --permission-mode plan "Review this project"
claude-rs --continue

See Usage for startup flags, shell completion setup, and man pages.

Full documentation is available at srothgan.github.io/claude-code-rust.

Note — Agent SDK billing unchanged. Anthropic has paused the previously announced Agent SDK credit change. For now nothing changes: Claude Agent SDK usage (including claude -p and third-party apps like this one) still draws from your normal Claude subscription limits. See Use the Claude Agent SDK with your Claude plan.

Why

The stock Claude Code TUI runs on Node.js with React Ink, which renders by redrawing full frames over raw ANSI escape codes. Users widely report the following problems with it:

  • Flickering: The whole view is redrawn on every status update, causing constant flicker (bad enough to crash editors' integrated terminals during long sessions)
  • CPU: Sustained high CPU even when idle, and runaway loops that spawn multiple background processes
  • Memory: 200-400MB baseline (and climbing with conversation length) vs ~20-50MB for a native binary
  • Resize: Window resizing leaves duplicated frames in scrollback, loses lines when shrinking, and can garble the display
  • Input latency: Keystrokes echo with visible delay as context fills up, and noticeably worse on Windows
  • Scrollback: Hijacks the terminal's native scrollback, erasing history you can no longer scroll back to
  • Paste: Large pastes can flood stdout and freeze the terminal

Claude Code Rust addresses these with a native terminal UI that uses diffed, direct terminal control via Crossterm and Ratatui, with no full-frame redraws and no React Ink rendering loop. There is no benchmark against the stock interface yet, so the improvements are based on daily use, not on measurements.

Documentation

The manual covers installation with scripts and npm, plus help, slash commands, keyboard shortcuts, settings, diagnostics, troubleshooting, building from source, architecture, and the changelog:

For the design history, including the move from fullscreen to inline rendering in 0.12.0, see I rebuilt Claude Code's terminal UI in Rust. Then I deleted 12,000 lines of it.

Status

This project is pre-1.0 and under active development. See CONTRIBUTING.md for how to get involved.

Development follows new Agent SDK releases and problems found in daily use. The weekly Dependency Monitor tracks SDK updates. There is no fixed feature roadmap or date for 1.0.

Limitations

Startup is still constrained by the upstream Claude Agent SDK runtime that this TUI wraps. The Rust interface itself is fast, but end-to-end readiness can still take noticeable time before a session is fully available. Improving that remains an active area of work.

License

This project is licensed under the Apache License 2.0. Apache-2.0 was chosen to keep usage and redistribution straightforward for individual users, downstream packagers, and commercial adopters.

Disclaimer and Legal Notice

This project is not affiliated with, endorsed by, or supported by Anthropic.

A quick note on where this project stands, since I know people worry about this kind of thing: claude-code-rust is a terminal UI that I wrote 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.

Releases

Sponsor this project

Packages

Used by

Contributors

Languages