askq
A friendly native pop-up for AI coding agents to ask you a question.
When an agent needs a decision — "Which framework? Ship it or hold? Pick a
migration strategy" — askq pops a small native window with the choices,
waits for you to answer, and hands the answer back. No more squinting at a
numbered list buried in terminal scrollback: a real window you can answer from
any pane, even when the terminal isn't focused (or isn't a terminal at all).
It's a tiny Wails (Go + the system WebView) desktop binary.
Feed it questions as JSON, the user clicks, it prints the answers as JSON and
exits — like code --wait, but for multiple-choice questions.
┌─────────────────────────────────────────┐
│ Which migration strategy? │
│ │
│ 1 ▸ Rewrite at once │
│ 2 ▸ Run both in parallel ← selected │
│ 3 ▸ Stay put │
│ │
│ [ Cancel ] [ Submit ⌘↵ ] │
└─────────────────────────────────────────┘
Quick start
Install the CLI globally (the right prebuilt binary for your platform is pulled
in automatically — macOS arm64, Linux x64/arm64):
npm install -g askq-cli # installs the `askq` command
No install needed for a one-off — npx -y askq-cli works too.
Pipe in a question, answer it in the window, read the answer from stdout:
echo '{"questions":[{"question":"Pick one","header":"Demo","multiSelect":false,
"options":[{"label":"A","description":"first"},{"label":"B"}]}]}' | askq
# => {"questions":[...],"answers":{"Pick one":"A"}}
That's the whole contract: JSON in → a window → JSON out. Exit code 0 means
answered, 1 means cancelled.
askq --help # the full input/output schema (LLM-friendly)
askq version # print the version
Five ways to use it, one binary
| Surface | What it is |
|---|
| CLI | askq reads questions JSON (stdin or --file), prints answers. |
| MCP server | askq mcp exposes an ask_user_question tool over stdio JSON-RPC — works with any MCP client (Claude Code, Cursor, Codex, Gemini, …). |
| Claude Code hook | A PreToolUse hook intercepts the native AskUserQuestion and answers it through the window instead. |
| Skill | A skill doc that teaches the agent when and how to ask. |
| Feishu card | askq feishu-daemon sends interactive cards to a Feishu group chat. GUI and Feishu race: whichever answers first wins. |
The last four are bundled in a Claude Code plugin (see Plugin below).
The contract
Input
A JSON object { "questions": [ … ] } on stdin or via --file <path>. A bare
array [ {question…} ] is accepted too. Each question:
{
"question": "Which framework?", // shown to the user — also the KEY in answers (required)
"header": "Framework", // short chip label (optional)
"type": "choice", // "choice" (default) or "text" (a free-text box)
"multiSelect": false, // choice only: allow several picks
"render": "text", // "markdown" renders text/descriptions/previews as sanitized Markdown
"default": "React", // used on timeout (see --timeout)
"options": [
{ "label": "React", "description": "…", "preview": "optional monospace side-pane text" },
{ "label": "Vue", "description": "…" }
],
// text-question extras:
"placeholder": "Type here…", // text only
"multiline": true // text only, default true
}
Output
A single line of JSON on stdout, exit 0:
{ "questions": [ …echoed unchanged… ],
"answers": { "Which framework?": "React" } }
answers maps question text → chosen label.
- Multi-select joins the picked labels with
", " → "React, Vue".
- "Other" (free text) → the answer is the string you typed.
type:"text" → the answer is the typed string.
- Cancel (window closed / Esc / Cancel button) → exit
1, nothing on stdout.
Keep it to 1–4 focused questions; each label should be a distinct,
mutually-exclusive choice.
Options & environment
--file <path> read questions JSON from a file instead of stdin
--title <text> banner title shown above the questions
--context <text> banner subtitle, e.g. "project · session" (also the OS window title)
--recent <json> JSON array [{"role","text"}] of recent turns, shown as a
scrollable conversation panel so you can tell windows apart
--timeout <secs> auto-resolve after N seconds: the window shows a countdown and,
on expiry, answers each question from its "default" (exit 0,
output marked "timedOut") — or cancels if any lacks a default