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

✍️ OpenClawRadar📅 Published: May 22, 2026🔗 Source
clarp: Open Source Drop-In Replacement for Claude -p Before June 15 Metered Pricing
Ad

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
Ad

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-cli

Once 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

Ad

👀 See Also

MemAware benchmark shows RAG-based agent memory fails on implicit context retrieval
Tools

MemAware benchmark shows RAG-based agent memory fails on implicit context retrieval

The MemAware benchmark tests whether AI agents can surface relevant past context when users don't explicitly ask for it, revealing that current memory systems score only 2.8% accuracy on hard implicit queries versus 0.8% with no memory.

OpenClawRadar
Running NemoClaw with Local vLLM: Setup Notes and Agent Engineering Observations
Tools

Running NemoClaw with Local vLLM: Setup Notes and Agent Engineering Observations

A developer documented running NVIDIA's NemoClaw sandboxed AI agent platform with a local Nemotron 9B v2 model via vLLM on WSL2. Key findings include inference routing details, parser compatibility issues, and observations about the agent engineering gap.

OpenClawRadar
Krasis: Hybrid CPU/GPU Runtime for Large MoE Models Achieves 3,324 tok/s Prefill on RTX 5080
Tools

Krasis: Hybrid CPU/GPU Runtime for Large MoE Models Achieves 3,324 tok/s Prefill on RTX 5080

Krasis is a hybrid CPU/GPU runtime that runs large MoE models by handling prefill on GPU and decode on CPU, achieving 3,324 tokens/second prefill on an RTX 5080 with Qwen3-Coder-Next 80B Q4. It requires ~2.5x model size in system RAM but enables running models too large for VRAM.

OpenClawRadar
AgentMail Founder Details Agent-Native Onboarding After OpenClaw Exposed CAPTCHA Block
Tools

AgentMail Founder Details Agent-Native Onboarding After OpenClaw Exposed CAPTCHA Block

AgentMail, an email API for AI agents, rebuilt its onboarding flow after its own OpenClaw agent failed at a Cloudflare CAPTCHA. The new system offers a single REST endpoint for programmatic account creation while keeping humans in the loop for verification.

OpenClawRadar