Back to browse
GitHub Repository

Claude Code rewritten as a bash script. ~1500 lines, zero npm packages. Just curl + jq.

111 starsShell

Claude Code rewritten as a bash script

by rpst·Mar 31, 2026·62 points·19 comments

AI Analysis

●●SolidWizardryBig Brain

1,500 lines of bash replacing 380k TypeScript lines is impressive constraint craft, not a better tool.

Strengths
  • FIFO pipe enables real-time streaming output without Node.js event loop overhead
  • Six core tools with permission prompts and 25 tool calls per turn supported
  • Session save/resume with automatic cost tracking per conversation
Weaknesses
  • Requires Anthropic API key—no offline capability or model flexibility
  • Missing advanced features like MCP integration and file watching from original
Target Audience

Terminal purists, developers curious about Claude Code internals

Similar To

Claude Code · Aider · Open Interpreter

Post Description

Have you ever wondered if Claude Code could be rewritten as a bash script? Me neither, yet here we are. Just for kicks I decided to try and strip down the source, removing all the packages.

Similar Projects