Fast, stateless LLM for your shell: qq answers; qa runs commands
Fast, stateless LLM for your shell: qq answers; qa runs commands
Fast, stateless LLM-powered assistant for your shell: qq answers; qa runs commands
qqqa is a two-in-one, stateless CLI tool that brings LLM assistance to the command line without ceremony.
The two binaries are:
qq - ask a single question, e.g. "qq how can I recursively list all files in this directory" (qq stands for "quick question")qa - a single step agent that can optionally use tools to finish a task: read a file, write a file, or execute a command with confirmation (qa stands for "quick agent")qqqa runs on macOS, Linux, and Windows.
By default the repo includes profiles for OpenRouter (default), OpenAI, Groq, Gemini (API + CLI), a local Ollama runtime, the Codex CLI (piggyback on ChatGPT), and the Claude Code CLI (reuse your Claude subscription). An Anthropic profile stub exists in the config for future work but is not wired up yet.
https://github.com/user-attachments/assets/91e888ad-0279-4d84-924b-ba96c0fe43a0
qq means quick question. qa means quick agent. Both are easy to type rapidly on QWERTY keyboards with minimal finger movement. That makes interacting with LLMs faster and more natural during real work.
qqqa is deliberately stateless. There is no long running session and no hidden conversation memory stored by the tool. Every run is mostly independent and reproducible. For maintaining a lowkey continuity you can use "include_history": true in the config.json (or choose to use history during the qq --init process).
Why stateless is great:
The tools may include transient context you choose to provide:
qq can include the last few terminal commands as hints and piped stdin if present.qa can read files or run a specific command, but only once per invocation and with safety checks.OpenRouter mirrors the OpenAI Chat Completions API, adds generous community-hosted models, and keeps openai/gpt-4.1-nano fast and inexpensive. qqqa talks to https://openrouter.ai/api/v1 out of the box and reads the API key from OPENROUTER_API_KEY, so your first run works as soon as you drop in a key.
If you need even more throughput, the bundled groq profile that targets openai/gpt-oss-20b and openai/gpt-oss-120b remains available, and you can still add any OpenAI-compatible provider by editing ~/.qq/config.json or creating a new profile.
Already paying for ChatGPT? Select the codex profile (during qq --init, via qq --profile codex, or by editing ~/.qq/config.json) and qqqa will shell out to the Codex CLI instead of hitting an HTTP endpoint. That lets you reuse an existing ChatGPT subscription with practically zero marginal cost.
What to know:
pip install codex-cli, then ensure codex is on your PATH.--no-stream, qqqa buffers the Codex response and prints it once.qa still expects JSON tool calls. When you need read_file, write_file, or execute_command, respond with { "tool": string, "arguments": object } the same way you would on OpenRouter.Example ~/.qq/config.json fragment that pins Codex as the default profile:
{
"default_profile": "codex",
"profiles": {
"codex": {
"model_provider": "codex",
"model": "gpt-5",
"reasoning_effort": "low"
}
}
}Have a Claude subscription? Select the claude_cli profile and qqqa will use the claude binary. That keeps usage effectively free if you already pay for Claude for Desktop.
What to know:
claude binary is on your PATH, then run claude login once."model_override": "claude-haiku-4-5" under model_providers.claude_cli.cli in ~/.qq/config.json. That override only applies to the Claude CLI; qq -m/--model still takes precedence per run.Minimal config snippet:
{
"default_profile": "claude_cli",
"profiles": {
"claude_cli": {
"model_provider": "claude_cli",
"model": "claude-haiku-4-5"
}
},
"model_providers": {
"claude_cli": {
"cli": {
"model_override": "claude-haiku-4-5"
}
}
}
}--no-funbrew install qqqaDownload a prebuilt archive from the GitHub Releases page, extract it, and place qq/qa somewhere on your PATH (e.g., /usr/local/bin).
On Arch Linux, /usr/bin/qq may already belong to another package. Install the release binaries to a custom directory (for example ~/bin) and rename them if needed, or use cargo install from this repo.
Download the Windows archive from Releases (choose the architecture that matches your machine), extract qq.exe and qa.exe, and add them to your %PATH%.
On first run qqqa creates a config file with safe permissions. The default path is ~/.qq/config.json. If XDG_CONFIG_HOME is set and no legacy ~/.qq/config.json exists, config is stored at $XDG_CONFIG_HOME/qq/config.json instead.
For a smooth first interaction, run the init flow:
# Interactive setup (choose provider and set key)
qq --init
# or
qa --initIf ~/.qq/config.json already exists, the init command keeps it untouched and explains how to rerun after moving or deleting the file.
The initializer lets you choose the default provider:
openai/gpt-4.1-nano (default, fast and inexpensive)openai/gpt-oss-20b (faster, cheap paid tier)gpt-5-mini (slower, a bit smarter)claude-3-5-sonnet-20241022 (placeholder until their Messages API finalizes)gpt-5 (wraps the codex exec binary so you can reuse a ChatGPT subscription; no API key needed, buffered output only)claude-haiku-4-5 (wraps the claude binary; qq streams live, qa buffers so it can parse tool calls)"model_override" under the provider's cli block (supported for both Codex and Claude). That override wins over the profile default but still yields to the per-run --model flag.gemini-3-flash-preview (Google's Gemini via OpenAI-compatible API)gemini-3-flash-preview (wraps the gemini binary; sign in once or set GEMINI_API_KEY; buffered output only)It also offers to store an API key in the config (optional). If you prefer environment variables, leave it blank and set one of:
OPENROUTER_API_KEY for OpenRouter (default)GROQ_API_KEY for GroqOPENAI_API_KEY for OpenAIGEMINI_API_KEY for Gemini (Google AI Studio)OLLAMA_API_KEY (optional; any non-empty string works—even local—because the Authorization header cannot be blank)codex login / claude login). Gemini CLI accepts Google sign-in or GEMINI_API_KEY.Defaults written to ~/.qq/config.json:
openrouter → base https://openrouter.ai/api/v1, env OPENROUTER_API_KEY, default headers HTTP-Referer=https://github.com/iagooar/qqqa and X-Title=qqqaopenai → base https://api.openai.com/v1, env OPENAI_API_KEYgroq → base https://api.groq.com/openai/v1, env GROQ_API_KEYollama → base http://127.0.0.1:11434/v1, env OLLAMA_API_KEY (qqqa auto-injects a non-empty placeholder if you leave it unset)anthropic → base https://api.anthropic.com/v1, env ANTHROPIC_API_KEY (present in the config schema for future support; not usable yet)gemini → base https://generativelanguage.googleapis.com/v1beta/openai, env GEMINI_API_KEYgemini_cli → mode cli, binary gemini (install @google/gemini-cli; auth via Google sign-in or GEMINI_API_KEY)codex → mode cli, binary codex with base args exec (install Codex CLI; auth handled by codex login). Optional "model_override" in the cli block forces a fallback ChatGPT model if OpenAI retires the default.claude_cli → mode cli, binary claude (install @anthropic-ai/claude-code; auth handled by claude login). Optional "model_override" pins Claude Code’s --model flag without touching your profile’s model.codex → CLI provider, binary codex - fails if the binary is missingopenrouter → model openai/gpt-4.1-nano (default)openai → model gpt-5-minigroq → model openai/gpt-oss-20bollama → model llama3.1anthropic → model claude-3-5-sonnet-20241022 (inactive placeholder until Anthropic integration lands)gemini → model gemini-3-flash-previewgemini_cli → model gemini-3-flash-preview (passed to gemini -m)codex → model label gpt-5 (only used for display; Codex CLI picks the backing ChatGPT model)prompt_suffix text appended to the built-in system prompt (does not replace it). Useful for rules like "assume tools are installed" or "be less chatty".reasoning_effort for GPT-5 family models. If you leave it unset, qqqa sends "reasoning_effort": "minimal" for any gpt-5* model to keep responses fast. Set it to "low", "medium", or "high" when you want deeper reasoning.temperature. Most models default to 0.15 unless you set it in ~/.qq/config.json or pass --temperature for a single run. GPT-5 models ignore custom temperatures; qqqa forces them to 1.0."timeout": "240" under a model profile in ~/.qq/config.json to raise the per-request limit (qq + qa default to 180 s - this is SLOW; faster models are a better fix).Example override in ~/.qq/config.json:
{
"profiles": {
"openai": {
"model_provider": "openai",
"model": "gpt-5-mini",
"reasoning_effort": "medium"
}
}
}no_emoji (unset by default). Set via qq --no-fun or qa --no-fun.copy_first_command (unset/false by default). Enable during qq --init, by running qq --enable-auto-copy, or by editing ~/.qq/config.json so qq copies the first `` block to your clipboard. Turn it off with qq --disable-auto-copy. Override per run with --copy-command/--cc or --no-copy-command/--ncc (also available as -ncc).--no-stream forces qq to wait for the full response before printing; streaming is the default.Terminal history is off by default. During qq --init / qa --init you can opt in to sending the last 10 qq/qa commands along with each request. You can still override per run with --history (force on) or -n/--no-history (force
No open issues yet, or sync has not completed.