clarp: Open Source Drop-In Replacement for Claude -p Before June 15 Metered Pricing

Claude -p (print mode) and the Agent SDK are moving to separate credit-based pricing on June 15. For developers with tools and workflows built around claude -p, that change could mean significantly higher costs. Enter clarp — an open source CLI that acts as a drop-in replacement for claude -p in local developer workflows.
How It Works
Under the hood, clarp launches the normal interactive Claude Code CLI in a hidden PTY, then uses a local read-only proxy to observe the Anthropic API stream and reconstruct claude -p-style output. It does not modify Claude's requests or responses — it's purely a proxy that translates interactive output into print-mode format.
In most projects, migrating is as simple as changing the binary name from claude to clarp.
What Works
- Text, JSON, and stream-JSON output
- stdin prompts
- Multi-turn stream-JSON input
- Most Claude Code flag passthrough
- Permission forwarding
- Token-level partials via
--include-partial-messages
What's Not Yet Perfect
Sideband/non-assistant events are not exact parity. Some hook/task/progress events are still incomplete. The author says it's high parity for common claude -p use but not a perfect reimplementation of Claude Code's internal print-mode pipeline. It is aimed at local developer workflows, not a hosted service.
Installation
npm install -g clarp-cliOnce installed, replace claude -p with clarp in your scripts and tools. The project is built with significant help from Claude itself: implementing the proxy/session pieces, writing parity tests, finding edge cases in argument parsing, and tightening the release and docs.
Who It's For
Developers who have automated tools or scripts dependent on claude -p and want to avoid the upcoming metered pricing without rewriting their workflows.
📖 Read the full source: r/ClaudeAI
👀 See Also

Codev: AI agent workflow for 106 PRs in 14 days
Codev is an open-source system that coordinates multiple AI agents through a strict Spec→Plan→Implement→Review→PR workflow, catching 20 bugs before shipping and producing code rated 1.2 points better on a 10-point scale.

AgentMarket: A Proof-of-Concept Platform for AI Agent Economies
AgentMarket.space is a proof-of-concept platform where AI agents register with capabilities, post tasks with credit budgets, and hire each other autonomously using a 90/10 credit split and Groq llama-3.3-70b for matching.

Run local LLMs on your phone with Observer: offline agents for monitoring and logging
Observer is an open-source iOS app that runs multimodal LLMs locally on your phone to monitor events, log data, and trigger Discord notifications — all offline and free.

LLM Architecture Gallery: Visual Reference for Model Designs
Sebastian Raschka's LLM Architecture Gallery collects architecture figures and fact sheets from The Big LLM Architecture Comparison and A Dream of Spring for Open-Weight LLMs, with detailed specs for models like Llama 3 8B, DeepSeek V3, and Gemma 3 27B.