Kagi open sourced Ask: a bash script for quick AI queries in the shell (github.com)

🤖 AI Summary
Kagi has open sourced Ask, a tiny bash utility that lets you query LLMs via the OpenRouter API directly from the shell. Installable as a single executable, Ask is tuned for producing ready-to-run outputs (commands, snippets, one-line fixes) and supports streaming, piping, and chained commands. It ships with convenient shorthand flags for models (default Mercury Coder for code, plus Gemini 2.5 Flash, Claude Sonnet 4, Kimi K2, Qwen 235B), a -m option for any model name, provider-order fallback, custom system prompts or raw-model mode, and an install script. Under the hood it relies on common CLI tools (curl, jq, bc) and requires an OPENROUTER_API_KEY; it’s released under the MIT license. For AI/ML practitioners and devs this is notable because it brings model interactions into standard shell workflows with minimal friction: generate and run commands, review code, perform quick data lookups, or stream long outputs without leaving the terminal. The ability to pipe files into prompts, set provider fallbacks, and select models on the fly makes Ask a practical automation and prototyping tool for devops, data scientists, and engineers. One important caveat: outputs are often executable, so validate or sandbox generated commands before running them to avoid accidental destructive operations.
Loading comments...
loading comments...