🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman
Native Rust terminal UI for Claude Code
This project swaps Claude Code’s stock terminal interface for a native Rust TUI. It keeps Claude Code’s core behavior while using Ratatui and Crossterm to reduce flicker, CPU use, memory use, and resize problems.
Builders who use Claude Code in a terminal and want a native replacement for the default interface.
You can run Claude Code in a faster terminal UI with less flicker and lower overhead.
What it does
Native Rust terminal UI
Uses Ratatui and Crossterm instead of the stock Node.js/React Ink interface.
Claude Agent SDK bridge
Connects to Claude through the local Agent SDK so core Claude Code actions still work.
Drop-in Claude Code replacement
Supports tool calls, file editing, terminal commands, and permissions with the same Claude workflow.
Installer scripts
Provides macOS/Linux and Windows install scripts under `scripts/install/`.
Documentation and tests
Includes docs in `docs/` and contract and integration tests in `tests/`.
How to get it
- 1macOS/Linux
curl -fsSL https://raw.githubusercontent.com/srothgan/claude-code-rust/main/scripts/install/install.sh | sh
- 2Windows PowerShell
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm 'https://raw.githubusercontent.com/srothgan/claude-code-rust/main/scripts/install/install.ps1' | iex"
- 3Run
npm install -g claude-code-rust
- 4Run
claude-rs
README
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.
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.
Prerequisite
- The Claude Code CLI must be installed as fallback for some SDK-unsupported features.
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"
npm (global)
npm install -g claude-code-rust
See the installation guide for release pinning, custom install locations, switching install methods, uninstall, and troubleshooting.
Usage
claude-rs
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 -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.
Why
The stock Claude Code TUI runs on Node.js with React Ink, which renders by redrawing full frames over raw ANSI escape codes. This causes real, widely-reported problems:
- 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.
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:
Status
This project is pre-1.0 and under active development. See CONTRIBUTING.md for how to get involved.
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.
Files in the repo
- .cargo
- .github
- agent-sdk
- assets
- bin
- docs
- recordings
- scripts
- src
- tests
- .gitattributes
- .gitignore
- .jscpd.json
- Cargo.lock
- Cargo.toml
- CHANGELOG.md
- clippy.toml
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- deny.toml
- LICENSE
- package-lock.json
- package.json
- README.md
- rust-toolchain.toml
- rustfmt.toml
- SECURITY.md
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More tools
The best-benchmarked open-source AI memory system. And it's free.
Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io
Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.