百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
Q

qqqa

> AI 编程
开源

为您的 shell 提供快速、无状态的 LLM: qq 回答; qa 运行命令

625 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

为您的 shell 提供快速、无状态的 LLM: qq 回答; qa 运行命令

qqqa

Fast, stateless LLM-powered assistant for your shell: qq answers; qa runs commands

What is qqqa

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

Names and typing speed

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.

Philosophy

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:

  • Simple and focused - Unix philosophy applied to LLM tools.
  • Shell friendly - compose with pipes and files instead of interactive chats.
  • Safe by default - qq is read-only and has access to no tools. qa is built with security in mind and requires confirmation before running tools.

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.

Why I recommend using OpenRouter by default

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.

Codex CLI profile (bring-your-own ChatGPT subscription)

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:

  • Install the Codex CLI via the ChatGPT desktop app (Settings → Labs → Codex) or pip install codex-cli, then ensure codex is on your PATH.
  • Streaming is unavailable; even without --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.
  • If the binary is missing or exits with an error, qqqa surfaces the stderr/stdout so you can fix your environment quickly.

Example ~/.qq/config.json fragment that pins Codex as the default profile:

json
{
  "default_profile": "codex",
  "profiles": {
    "codex": {
      "model_provider": "codex",
      "model": "gpt-5",
      "reasoning_effort": "low"
    }
  }
}

Claude Code CLI profile (bring-your-own Claude desktop subscription)

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:

  • Install Claude Code so the claude binary is on your PATH, then run claude login once.
  • Claude Code streams responses the same way API-based LLMs do.
  • Need to pin a different Claude desktop model? Add "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:

json
{
  "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"
      }
    }
  }
}

Features

  • OpenAI compatible API client with streaming and non streaming calls.
  • Stateless, single shot workflow that plays well with pipes and scripts.
  • Rich but simple formatting using XML like tags rendered to ANSI colors.
  • Config driven providers and profiles with per profile model overrides.
  • Safety rails for file access and command execution.
  • Old-school and SERIOUS? Optional no-emoji mode persisted via --no-fun

Install

Homebrew (macOS/Linux)

bash
brew install qqqa

Linux

Download 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.

Windows

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%.

Configure

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:

bash
# Interactive setup (choose provider and set key)
qq --init
# or
qa --init

If ~/.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:

  • OpenRouter + openai/gpt-4.1-nano (default, fast and inexpensive)
  • Groq + openai/gpt-oss-20b (faster, cheap paid tier)
  • OpenAI + gpt-5-mini (slower, a bit smarter)
  • Anthropic + claude-3-5-sonnet-20241022 (placeholder until their Messages API finalizes)
  • Ollama (runs locally, adjust port if needed)
  • Codex CLI + gpt-5 (wraps the codex exec binary so you can reuse a ChatGPT subscription; no API key needed, buffered output only)
  • Claude Code CLI + claude-haiku-4-5 (wraps the claude binary; qq streams live, qa buffers so it can parse tool calls)
    • Need to force a different desktop model? Add "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 + gemini-3-flash-preview (Google's Gemini via OpenAI-compatible API)
  • Gemini CLI + 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 Groq
  • OPENAI_API_KEY for OpenAI
  • GEMINI_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)
  • No API key is required for the Codex or Claude CLI profiles—their binaries handle auth (codex login / claude login). Gemini CLI accepts Google sign-in or GEMINI_API_KEY.

Defaults written to ~/.qq/config.json:

  • Providers
    • openrouter → base https://openrouter.ai/api/v1, env OPENROUTER_API_KEY, default headers HTTP-Referer=https://github.com/iagooar/qqqa and X-Title=qqqa
    • openai → base https://api.openai.com/v1, env OPENAI_API_KEY
    • groq → base https://api.groq.com/openai/v1, env GROQ_API_KEY
    • ollama → 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_KEY
    • gemini_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 missing
  • Profiles
    • openrouter → model openai/gpt-4.1-nano (default)
    • openai → model gpt-5-mini
    • groq → model openai/gpt-oss-20b
    • ollama → model llama3.1
    • anthropic → model claude-3-5-sonnet-20241022 (inactive placeholder until Anthropic integration lands)
    • gemini → model gemini-3-flash-preview
    • gemini_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)
  • Optional per-profile or global 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".
  • Optional per-profile 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.
  • (discouraged) Optional per-profile 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.
  • (discouraged): you can change the timeout, e.g. "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:

json
{
  "profiles": {
    "openai": {
      "model_provider": "openai",
      "model": "gpt-5-mini",
      "reasoning_effort": "medium"
    }
  }
}
  • Optional flag: no_emoji (unset by default). Set via qq --no-fun or qa --no-fun.
  • Optional auto-copy: 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).
  • Per-run control: --no-stream forces qq to wait for the full response before printing; streaming is the default.

Terminal history

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

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustaiclaudeclicodex

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类AI 编程
定价开源

> 相关工具

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.