Claude Better Cli

by reason-machines2384a003145aNo license83 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 3 months ago

Compatibility-first Claude CLI reimplementation with faster startup, lower memory, and drop-in command compatibility

Instructions onlySoftware Development
AI-generated overview

Describes a compatibility-first Claude CLI reimplementation with faster startup and lower memory, available only on request.

What it does
This skill documents claude-better, a drop-in reimplementation of the Claude CLI that claims faster cold starts, lower resident memory and command-level compatibility. It covers installation by placing the binary earlier in PATH or aliasing it, key commands, configuration via existing Claude CLI environment variables and config directory, performance figures, scripting patterns and troubleshooting. It produces guidance and shell snippets rather than files or code of its own.
When to use it
Use it when you want to understand, install or evaluate claude-better as a replacement for the standard Claude CLI. It suits situations involving CLI startup performance, memory usage on constrained machines, or checking drop-in command compatibility. Access to the binary is restricted, so it is mainly useful to those who already have it.
Requirements
Requires the claude-better binary, which the document says is provided only to selected customers on request; no scripts ship with the skill. It also assumes an existing Claude CLI setup, an ANTHROPIC_API_KEY and the ~/.claude config directory, plus a shell for the PATH or alias changes.

claude-better

Skill by ara.so — Daily 2026 Skills collection.

claude-better is a compatibility-first reimplementation of the Claude CLI focused on aggressive performance improvements: up to 73% faster startup and up to 80% lower resident memory, while maintaining 100% command-level compatibility with the original Claude CLI.

What It Does

  • Faster cold starts: --help goes from 182ms → 49ms; chat session bootstrap from 311ms → 102ms
  • Lower memory: sustained interactive sessions drop from ~412MB → ~83MB RSS
  • Drop-in compatible: 100% pass rate on primary command forms, 100% exit-code match, 98.7% byte-for-byte output parity
  • Zero migration cost: existing scripts, aliases, and muscle memory continue to work unchanged

Availability

⚠️ Source code is provided for selected high-profile customers only and available upon request. Contact the maintainer at krzyzanowskim/claude-better for access.

If you have access, install as described in your onboarding materials. The binary is a drop-in replacement — substitute it wherever you invoke claude.

Installation (Once You Have Access)

bash
# Typical binary drop-in replacement pattern# Place the claude-better binary in your PATH before the original claudeexport PATH="/path/to/claude-better/bin:$PATH"
# Verify it's being picked upwhich claudeclaude --version
bash
# Or alias it explicitly without touching PATHalias claude='/path/to/claude-better/bin/claude-better'

Key Commands

claude-better mirrors the Claude CLI surface exactly. All commands you know work as-is:

bash
# Show help (cold start: ~49ms vs 182ms baseline)claude --help
# Check auth status (warm start: ~58ms vs 146ms baseline)claude auth status
# Start an interactive chat session (~102ms bootstrap vs 311ms baseline)claude chat
# One-shot non-interactive command (~131ms vs 428ms baseline)claude -p "Summarize this file" < input.txt
# All standard flags pass through unchangedclaude --model claude-opus-4-5 chatclaude --output-format json -p "List 3 facts about Rust"

Configuration

claude-better reads the same configuration as the original Claude CLI. No new config format is required.

bash
# Standard Claude CLI env vars are respectedexport ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY
# The tool reads ~/.claude/ config directory as normal# No migration of config files needed

Performance Characteristics

ScenarioBaselineclaude-betterImprovement
--help cold start182ms49ms73% faster
auth status warm146ms58ms60% faster
chat bootstrap311ms102ms67% faster
One-shot command428ms131ms69% faster
RSS after 30min session412MB83MB80% less
Streaming jitter p9591ms24ms74% lower

Scripting Patterns

Since compatibility is 100%, all existing scripting patterns work unchanged:

bash
#!/usr/bin/env bash# Existing Claude CLI scripts work without modification
# Non-interactive pipeline usageecho "Explain this error:" | cat - error.log | claude -p /dev/stdin
# Exit code handling (100% compatible)if claude auth status; then  echo "Authenticated"else  echo "Not authenticated — run: claude auth login"  exit 1fi
# JSON output parsingclaude --output-format json -p "What is 2+2?" | jq '.content'
bash
#!/usr/bin/env bash# Long-lived interactive session — memory pressure is significantly reduced# Useful on memory-constrained machines (laptops, CI runners)claude chat

Compatibility Notes

  • CLI surface: 100% compatible with targeted Claude CLI command forms
  • Exit codes: 100% match on documented exit-code behavior
  • Output parity: 98.7% byte-for-byte; 100% semantic parity after whitespace/timestamp/terminal-width normalization
  • Tested environments: macOS (Apple Silicon), Linux, containerized CI
  • Tested against: 1,200 synthetic invocations, 87 flag combinations, 42 interactive flows, 14 failure-mode scenarios

Troubleshooting

Binary not found after install

bash
# Ensure claude-better/bin is earlier in PATH than original claudeecho $PATH | tr ':' '\n' | grep -n claudewhich claude  # should point to claude-better

Unexpected output differences

bash
# 1.3% of outputs differ before normalization (timestamps, whitespace, terminal width)# If a script breaks on exact output matching, add normalization:claude -p "..." | tr -s ' ' | sed 's/[[:space:]]*$//'

Auth not recognized

bash
# claude-better reads the same auth store as the original CLI# If auth fails, re-authenticate via the standard flow:claude auth login

Falling back to original CLI

bash
# If you hit an edge case, unset the alias/PATH change to revert instantlyunalias claude# orexport PATH="<original-path-without-claude-better>"

Architecture Notes (For Contributors / Evaluators)

The performance gains come from specific implementation choices documented in the README:

  • Zero-copy streaming pipeline for token output (reduces streaming jitter)
  • Precomputed command registry instead of dynamic startup discovery (cuts cold-start time)
  • Aggressively bounded allocation for session state (drives memory reduction)
  • Lazy subsystem initialization — only the active command path pays startup cost
  • Compatibility shim layer that preserves flags/behavior without carrying the full original stack

Source and attribution

Source:reason-machines/trending-skillsinskills/claude-better-cliat commit2384a00

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal