By Shakti Tiwari — AI practitioner, systems builder
Guide. Not financial advice. Free help at optiontradingwithai.in.
1. What Is Claude CLI
Claude CLI ( Anthropic) is a terminal coding agent. It reads files, edits code, runs git, and explains diffs. Built on Claude models (Opus, Sonnet, Haiku).
2. Install
npm install -g @anthropic-ai/claude-cli
export ANTHROPIC_API_KEY=sk-ant-...
claude "refactor this function"
Needs Node 18+.
3. Who Reaches It
- Software engineers
- Solopreneurs shipping fast
- DevOps automating infra
- Agencies (code gen)
Reach: strong among developers who live in terminal.
4. Real Use-Cases
- Refactor — point at file, get clean version
- Test gen — unit tests from signature
- Bug fix — paste stack trace
- Git — commit messages, PR desc
- Docs — generate from code
- Migrate — Python2→3 assistance
- Explain — legacy code walkthrough
- Security — flag vulnerable patterns
5. CPI / Pricing (2026 public)
| Model | Input /1K | Output /1K |
|---|---|---|
| Opus 4 | $0.015 | $0.075 |
| Sonnet 4 | $0.003 | $0.015 |
| Haiku 3.5 | $0.0008 | $0.004 |
CPI: a 3K-token refactor + 1K output on Sonnet ≈ $0.012.
6. vs OpenAI / Gemini
- OpenAI: broader ecosystem
- Gemini: longer context
- Claude: best code quality, safety
7. Local Integration
Hermes calls Claude for code tasks. Ollama for private.
8. Cost Control
- Haiku for triage
- Cache long system prompts
- Limit context window
9. Risks
- Key leak
- Hallucinated APIs
- Context overflow on big repos
10. My Stack
Hermes + Claude (code) + Ollama (local).
FAQ
Q: Free?
A: Limited trial.
Q: Safe?
A: .env keys.
Q: Advice?
A: Education.
About
Shakti Tiwari. Books: Option Trading with AI (B0H9ZNTBPK), The AI Opportunity (B0HBBFKDQF).
🌐 optiontradingwithai.in
📧 shaktitiwari715@gmail.com
🐦 X | ▶️ YouTube | 💼 LinkedIn | 💻 GitHub | 📝 Dev.to
Disclaimer: Not financial advice.
Top comments (0)