Use any LLM in Unix pipelines. Zero config.
Already have Claude Code? Install pipe-ai and it works immediately — no API key needed, your Max/Pro subscription powers it.
# macOS (Homebrew)
brew install pipe-ai
# Linux / macOS (direct)
curl -fsSL https://pipe-ai.dev/install.sh | sh
# Go
go install github.com/pipe-ai/pipe-ai@latestpipe-ai auto-detects the best available LLM on your machine and uses it. No configuration required.
| Provider | Setup | Cost |
|---|---|---|
| Claude Code (default if installed) | Already done — claude --version |
Your subscription |
| Ollama (local, private) | brew install ollama && ollama pull llama3.2 && ollama serve |
Free |
| Anthropic API | export ANTHROPIC_API_KEY=sk-ant-... |
Pay-per-use |
| OpenAI API | export OPENAI_API_KEY=sk-... |
Pay-per-use |
| Groq API | export GROQ_API_KEY=gsk_... |
Pay-per-use |
pipe-ai tries providers in this exact order until one works:
- Ollama running on localhost:11434 (local, private, free)
claudeCLI binary authenticated (Claude Code OAuth)ANTHROPIC_API_KEY→ claude-haiku-4-5OPENAI_API_KEY→ gpt-4o-miniGROQ_API_KEY→ llama3-70b-8192
Claude Code users: If you also have
ANTHROPIC_API_KEYset in your environment, theclaudebinary will use it instead of OAuth, charging at API rates rather than your subscription. To force OAuth:ai "prompt" --model claude-cliTo check which auth is active:claude /status
# Translate
echo "hello world" | ai "translate to French"
# Analyze logs
cat server.log | ai "are there any errors or anomalies"
# Generate changelog from recent commits
git diff HEAD | ai "write a changelog entry" >> CHANGELOG.md
# Find memory hog
ps aux | ai "what process is using the most memory and why is that a problem"
# Extract structured data and pipe to jq
cat api-response.json | ai "extract all user emails" --json | jq '.[]'
# Process a huge log file in chunks
cat massive.log | ai "summarize all errors" --chunk
# See what would be sent to the model (no API call)
cat code.py | ai "find bugs" --dry| Flag | Description |
|---|---|
--model |
Override model resolution (e.g. ollama/llama3.2, anthropic/claude-haiku-4-5, claude-cli) |
--json |
Output as valid JSON (validated, retried once if invalid) |
--csv |
Output as RFC 4180 CSV with header row |
--raw |
Plain text output (default — same as no flag) |
--dry |
Print full prompt to stderr, make zero API calls |
--chunk |
Split oversized input into chunks, synthesize results |
--force |
Truncate input exceeding context window without warning |
--models |
List all available models across configured providers |
pipe-ai never silently truncates your input.
| Input size | Behavior |
|---|---|
| < 70% of limit | Process normally |
| 70–95% of limit | Warning on stderr, process normally |
| > 95% of limit | Error — use --chunk or --force |
# Process a 50K-line codebase
find . -name '*.py' | xargs cat | ai "find security vulnerabilities" --chunkClaude Code users are already authenticated via OAuth. pipe-ai shells out to the
claude binary as a subprocess — it never touches your credentials, never reads
your keychain, and respects your subscription tier automatically.
# This is all you need if you have Claude Code:
brew install pipe-ai
echo "test" | ai "hello"git clone https://github.com/pipe-ai/pipe-ai
cd pipe-ai
go build -o ai .
codesign -s - ./ai # macOS only
echo "hello" | ./ai "translate to Spanish"PRs welcome. Keep changes focused on making the pipe more useful — not turning it into a platform.
MIT — see LICENSE


