A lightweight CLI wrapper around Claude Code, written in Zig. Wraps the claude CLI and parses its streaming JSON output to provide a minimal, fast terminal experience. Works with Pro and Max plans.
Claude Code's Node.js runtime uses 300-500MB+ RSS. LCC wraps it in a tiny Zig binary, auto-recycling the underlying process to keep memory in check — ideal for low-memory environments like a Raspberry Pi or small VPS.
- Wraps
claudeCLI — works with any plan (Pro/Max) - Streaming Markdown rendering in terminal
- Full Claude Code flag passthrough (model, tools, sessions, MCP, agents, etc.)
- Auto process recycling on turn count or RSS threshold (memory management)
- Compact mode to hide tool execution details
- Input history with arrow key navigation
- Pipe mode for non-interactive use
- REPL commands (
/cost,/model,/save,/retry,/compact,/recycle) - Reads
preferredLanguagefrom~/.claude/settings.json - Tiny static binary (~1MB)
- Claude Code CLI installed and authenticated (
claudein PATH)
zig build -Doptimize=ReleaseSafe
# Binary at ./zig-out/bin/lcc# Interactive REPL
lcc
# With model selection (short aliases work)
lcc --model opus
lcc -m sonnet
# Resume last session
lcc --continue
# Low-memory mode: compact output + recycle at 512MB RSS
lcc --compact --recycle-rss-mb 512
# Pipe mode
echo "explain this function" | lcc
cat main.zig | lcc --system-prompt "review this code"
# Multiple directories
lcc --add-dir ../lib --add-dir ../api
# Git worktree isolation
lcc --worktree feature-name| Command | Description |
|---|---|
/help, ? |
Show help |
/cost |
Session cost summary |
/session |
Session info (RSS, compact status) |
/model <name> |
Switch model (restarts process) |
/save [file] |
Save last response to file |
/compact |
Toggle compact mode |
/retry |
Retry last message |
/recycle |
Restart claude process (frees memory) |
/clear |
Clear screen |
/version |
Show LCC version |
exit, quit |
Exit |
| Flag | Description |
|---|---|
--recycle-turns <n> |
Restart claude process every N turns (default: 10) |
--recycle-rss-mb <mb> |
Restart when RSS exceeds threshold |
--compact |
Hide tool execution details |
--debug |
Show claude CLI stderr |
-q, --quiet |
Suppress startup banner |
All other flags are passed through to claude CLI directly.
MIT