qqqa: A Blazing-Fast, Stateless AI Assistant for the Terminal
Here is another AI CLI assistant. It is quite similar to cai, which we covered earlier: also written in Rust, also a CLI toolkit focused on speed and efficiency.
What Is qqqa?
qqqa is a command-line AI assistant written in Rust. It consists of two core commands:
qq(Quick Question): For asking quick questions. It keeps no context and only answers the question at hand, which makes it ideal for looking up command usage, code snippets, or concept explanations.qa(Quick Agent): A single-step agent. It can answer questions and also call tools (such as reading files or running commands), which makes it suitable for handling concrete tasks.
As for the naming, the developer's reasoning is that q and a sit next to each other on the keyboard, so they are always within reach, and they also happen to stand for "Quick Question" and "Quick Agent."
A nice little double meaning.

Core Design Philosophy: Stateless and Pipe-Friendly
Unlike a typical chatbot, qqqa is stateless by default. Every run is independent, with no conversation history. The benefits:
- Lower cost: Obvious one. With no conversation history, each API call consumes fewer tokens.
- Simplicity: Easier to implement. This matters to the developer more than to the user.
- Shell-friendly: Drops neatly into pipelines, taking the output of the previous command as the AI's input.
- Reproducibility: The same input (usually) produces similar output, which makes it easy to script.
Scenario 1: Smart Lookups (qq)
When you would otherwise Google a complicated ffmpeg flag or git command:
# Quotes are optional
qq convert mp4 to mp3
# Or ask about a specific system task
qq "how do I kill a process by name on macOS"
qq streams output by default and responds very quickly. If you want to use the result in a subsequent step, combine --no-stream with --copy-command (or --cc for short), and the tool will copy the code block from the answer to your clipboard.
Scenario 2: Context-Aware Piping (|)
This is one of qqqa's most powerful use cases. You can "feed" the output of any command to the AI:
# Analyze git status and suggest the next step
git status | qq "summarize what I should do next"
# Explain a piece of complex code
cat src/main.rs | qq "explain the error handling logic here"
Both of these are basic features. The cai tool mentioned earlier implements them too, in much the same way. What sets qqqa apart is agent support.
Scenario 3: Let an Agent Do the Work (qa)
qa can take actions. It reads files, writes files, or runs shell commands (with user confirmation).
# Generate documentation automatically
qa "read src/lib.rs and write a summary to docs/intro.md"
# Run a task (asks for confirmation first; use -y to auto-approve)
qa "list all Rust files sorted by size"
Flexible Model Support: Pick What Fits Your Budget
qqqa is flexible to configure and supports multiple model backends. Local models, the OpenAI API, and more are all at your fingertips.
1. Works Out of the Box: OpenRouter (Default)
By default, qqqa uses the OpenRouter API and points to openai/gpt-4.1-nano. This model is extremely fast and cheap, which makes it well suited to everyday quick questions. You only need to set the OPENROUTER_API_KEY environment variable.
2. Zero Marginal Cost: Reuse Your ChatGPT or Claude Subscription
This is one of qqqa's most appealing features. If you already subscribe to ChatGPT Plus or Claude Pro, you can use your existing subscription instead of paying extra for API usage.
- Codex CLI profile: By configuring the
codexprofile, qqqa can call the CLI interface of the ChatGPT desktop app (requirescodex-clito be installed). - Claude Code CLI profile: Likewise, it can call Anthropic's
claudecommand-line tool.
In other words, you can use GPT-5 (preview) or Claude 3.5 Sonnet from your terminal "for free."
3. Privacy First: Local Ollama
For sensitive code or offline environments, qqqa has solid Ollama support. Choose Ollama when running qq --init, or configure it manually:
{
"profiles": {
"ollama": {
"model_provider": "ollama",
"model": "llama3.1",
"api_base": "http://127.0.0.1:11434/v1"
}
}
}
Security Design
qqqa imposes strict guardrails here, so you avoid the awkward situation of an AI wiping your system with rm -rf / on your behalf.
- File sandbox: File reads and writes are restricted to your home directory or the current working directory, which prevents path traversal attacks.
- Command allowlist:
qaships with a default list of safe commands (such asls,grep,find, and so on). - Human confirmation: For commands outside the allowlist, or for anything involving pipes or redirects,
qarequires explicit user confirmation. Dangerous commands (such asrm -rf /) are blocked outright. - Read-only mode: The
qqcommand itself is fully read-only and cannot perform any side effects.
Advanced Configuration Tips
After installing, it is a good idea to run qq --init to generate the config file ~/.qq/config.json. Here are some useful advanced options:
- Enable history: Although the tool is stateless by design, you can pass
--historyor set"include_history": truein the config to send the 10 most recentqq/qacommands as context, which gives you a "multi-turn conversation" effect. - Serious mode: If you dislike emoji in AI replies, use
--no-fun(or disable it permanently in the config) and the AI turns into a stern sysadmin. - Enterprise proxies: Supports custom TLS certificate paths, which is handy in corporate intranets that require self-signed certificates.
Conclusion
If you tried cai, which also focuses on AI-driven terminal workflows, and found it lacking, give brew install qqqa a shot. AI CLI tools keep evolving, and there is one out there for everyone.
- GitHub repository: https://github.com/iagooar/qqqa
- Releases: Releases