60df921dbbf494f16003fe2261e363114928ba4e
- src/term.rs: self-contained module spawning `claude --session-id <uuid>` with ANTHROPIC_BASE_URL pointed at our proxy, inside a portable-pty; wezterm-term models the screen (and answers terminal queries), a small renderer paints cells into the ratatui buffer. - Toggle with alt-c; off by default, hiding keeps the session alive. - Modifier-split input: plain keys go to claude, alt-keys drive the feed (alt-q quit, alt-j/k scroll, alt-f filter, alt-n/p session). - Dynamic pane height: the tap flags AskUserQuestion/ExitPlanMode in the embedded session (matched via --session-id) before Claude Code renders the prompt → pane grows 35%→60%; shrinks when the tool_result echoes back in the next request. - wezterm-term isn't on crates.io: pinned git rev of the monorepo. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude-thinking
A TUI that displays Claude Code's streams token-by-token — thinking, text, and tool calls — by sitting as a pass-through proxy between Claude Code and the Anthropic API.
No extra usage: it never issues requests of its own; it observes the SSE stream of requests Claude Code was already making, forwarding bytes verbatim and unbuffered.
claude ──ANTHROPIC_BASE_URL──▶ claude-thinking (127.0.0.1:8484) ──▶ api.anthropic.com
│
▼
TUI: live token feed
Usage
cargo build --release
./target/release/claude-thinking
Then point Claude Code at the proxy, either per-shell:
export ANTHROPIC_BASE_URL=http://127.0.0.1:8484
claude
or globally in ~/.claude/settings.json:
{ "env": { "ANTHROPIC_BASE_URL": "http://127.0.0.1:8484" } }
Note: with the global setting, Claude Code can't reach the API while the proxy isn't running.
Keys
| key | action |
|---|---|
q / Esc |
quit |
Tab / Shift-Tab |
switch session |
j/k, arrows, PgUp/PgDn |
scroll (disables follow) |
f / G / End |
follow live tail |
g / Home |
jump to top |
Display
- ✻ thinking — dim italic, streamed token-by-token
- text — rendered as markdown (
tui-markdown) - ⚙ tool calls — input JSON pretty-printed on completion, raw fragments while streaming
- meta — message boundaries with model, context size, stop reason, token counts
- errors — API/stream errors in red
Sessions are keyed by the Claude Code session ID found in request metadata; concurrent requests (subagents) tap independently.
--headless runs the proxy without the TUI. CT_PORT overrides the port (default 8484).
Description
Languages
Rust
97.3%
Python
2.7%