Quick start
1. Install
Section titled “1. Install”curl -fsSL https://raw.githubusercontent.com/muthuishere/askx/main/install.sh | shcurl -fsSL https://raw.githubusercontent.com/muthuishere/askx/main/install.cmd -o install.cmd && install.cmdnpm install -g @muthuishere/askxgo install github.com/muthuishere/askx/cmd/askx@v0.1.02. Discover backends
Section titled “2. Discover backends”askx init probes local Ollama (127.0.0.1:11434), local OpenAI-compatible servers, installed coding CLIs (claude, devin, opencode, copilot, gemini), and standard API key env vars. It writes key_env names — never raw secrets — to ~/.config/askx/profiles.yaml (0600).
askx initaskx doctor3. Run completions
Section titled “3. Run completions”# Simple promptaskx "what is the difference between a mutex and a channel in Go?"
# Pipe stdin or attach filesgit diff | askx "write a 1-line commit message"askx "summarize in 3 bullets" -f README.md
# Pick a specific profileaskx -p claude-cli "review this diff for race conditions" -f diff.patch4. Validated JSON Schema (--schema)
Section titled “4. Validated JSON Schema (--schema)”Enforce a JSON Schema across any backend (OpenAI, Anthropic, Ollama, ACP, or CLI). If the model emits invalid JSON or misses required fields, askx runs an automatic repair loop before returning.
askx --schema '{"type":"object","properties":{"severity":{"enum":["low","medium","high"]},"summary":{"type":"string"}},"required":["severity","summary"]}' \ "classify this error log" -f error.log5. Streaming (--stream and --stream-json)
Section titled “5. Streaming (--stream and --stream-json)”# Clean plain-text deltas on stdout (zero ANSI escape codes)askx --stream -p ollama "explain Go escape analysis"
# Typed NDJSON events for CI pipelines and orchestratorsaskx --stream-json -p ollama "summarize README.md" -f README.md--stream-json emits one JSON object per line with types text, tool_call, tool_result, denied, and done.
6. Multimodal attachments (-f)
Section titled “6. Multimodal attachments (-f)”Attach .png, .jpg, .jpeg, .webp, .gif, or .pdf files with -f. Binary attachments are sent as structured multimodal parts (including native ACP blocks) and base64 payloads are scrubbed from audit logs.
askx -p ollama -f screenshot.png "what error is shown on this screen?"askx -p hosted -f invoice.pdf "extract invoice number and total as JSON"