Q is a slim LLM CLI tool that runs in the terminal, asking questions and debugging errors with session context from a single shell script.
Hacker News · April 29, 2026
AI Summary
•Q is a shell script installed via curl that requires only curl (always present) and jq (auto-installed if missing). It provides one-shot questions, code-only output, and debug mode with recent terminal output as context.
•The tool logs shell commands (skipping vim, fzf, claude, etc.) and supports redacting sensitive values via patterns stored in ~/.config/q/qignore. Session logging can be paused/resumed with q-stop and q-start shell aliases.
•Q supports multiple LLM providers—OpenAI (default), Amazon Nova, Azure, Anthropic, and custom endpoints—via environment variables Q_PROVIDER, Q_MODEL, Q_ENDPOINT, and Q_API_KEY. Configuration is auto-saved to ~/.config/q/config.sh on first run.
•Shell completions are available for zsh, bash, and fish via the q completions subcommand.