smithersai

smithersai / claude-p

Public

Drop-in replacement for `claude -p` that drives the interactive Claude Code TUI inside an in-process zmux PTY session.

57
4
69% credibility
Found May 14, 2026 at 208 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Zig
AI Summary

claude-p is a user-friendly command-line wrapper that lets you run quick prompts with the Claude AI tool by automating its interactive interface in the background, matching the output of its non-interactive mode.

How It Works

1
📰 Discover claude-p

You hear about claude-p from a developer friend—it's a handy way to get quick, smart answers from Claude AI without opening the full chat window every time.

2
✅ Get ready with Claude

You check that the Claude helper tool is already installed on your computer, just like having a magic genie app ready to go.

3
💬 Ask your question

You type a simple phrase like 'explain this idea' right in your command line, and hit enter—feels as easy as texting a friend.

4
✨ Magic happens

Behind the scenes, it runs the full Claude chat quietly and pulls out just the perfect answer for you in seconds.

5
🔧 Customize if you want

Pick a smarter AI brain, change the answer style to list or details, or feed in a whole file—makes it fit your needs perfectly.

🎉 Smart help anytime

You now have instant AI wisdom for summaries, explanations, or audits, speeding up your day without any fuss.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 208 to 57 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is claude-p?

claude-p is a Zig tool acting as a drop-in replacement for `claude -p`, driving the full interactive Claude Code TUI inside an in-process zmux PTY session. Run it via `npx claude-p "your prompt"` or pipe inputs like `claude-p --output-format json "audit src/" < diff`, getting byte-for-byte matching output in text, JSON, or stream-JSON formats. It solves scripting the Claude CLI without UI hangs, handling claude pro limits or claude pricing via TUI hooks for models like Opus.

Why is it gaining traction?

Unlike screen-scrapers, it forwards all flags verbatim to claude, supports resuming sessions, max-turns, and tools without config tweaks—true drop in replacement definition. Devs hook it for precise control over transcripts and usage stats, enabling pipelines that feel native. With 57 stars, it appeals to claude-plugins-official seekers dodging API instability.

Who should use this?

Scripting devs automating code reviews or claude powerpoint generation in CI/CD. Backend engineers piping diffs for audits, bypassing claude-peers or permission prompts. Zig fans building drop down in github workflows around Claude outputs.

Verdict

Grab it if you script Claude on macOS/Linux—npx-ready, robust flags, MIT-licensed with strong tests. Early at 57 stars and 0.7% credibility score, but docs shine; PTY reliance means Claude CLI updates could break it.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.