← all repositories
kardolus/chatgpt-cli

A terminal Swiss Army knife for LLMs that actually plans before it acts

One Go binary talks to OpenAI, Azure, Perplexity, and LLaMA—then optionally goes agentic with budget guards and a sandbox.

930 stars Go Coding AssistantsAgents
chatgpt-cli
Velocity · 7d
+0.8
★ / day
Trend
steady
star history

What it does

ChatGPT CLI is a single Go binary that wraps multiple LLM providers (OpenAI, Azure, Perplexity, LLaMA, 302 AI) behind a unified command-line interface. You can fire off one-shot queries, hold threaded conversations with sliding-window history, pipe in images or audio, generate or edit images, and even run multi-step agent workflows. It also speaks MCP (Model Context Protocol) to call external tools over HTTP or stdio.

The interesting bit

The agent mode isn’t just “let the LLM run bash and pray.” It offers two architectures—iterative ReAct loops and a Plan/Execute mode that drafts a roadmap first—then enforces hard budget limits (iterations, wall time, tokens) and policy rules (allowed tools, denied shell commands, working-directory sandboxing). When the agent trips a policy, it logs a kind=path_escape denial rather than silently escaping. That’s the kind of paranoia you want in automation.

Key highlights

  • Multi-provider with --target switching; layered config via YAML, env vars, and flags
  • Agent mode with ReAct and Plan/Execute strategies, plus automatic timestamped execution logs
  • MCP client with session management: calls tools, injects results as [MCP: <tool>] context, then continues the conversation
  • Media I/O: image upload/URL/generation/editing, audio Q&A, transcription, text-to-speech with optional afplay chaining
  • Prompt files via --prompt flag, so git diff | chatgpt --prompt write_pull-request.md becomes a review workflow

Caveats

  • Agent mode is explicitly labeled experimental
  • Image, audio, and transcription support varies by model; some formats are narrowly restricted (e.g., .mp3/.wav only for audio Q&A)
  • Web search requires gpt-5+ or similarly compatible models

Verdict

Worth a look if you live in a terminal and want one tool that spans chat, scripting, and cautious automation. Skip it if you need a polished GUI or guaranteed production-grade agent reliability—the experimental label is earned.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.