asq is a blazingly fast CLI tool to ask questions to Large Language Models (LLMs) right from your terminal.
It's like having ChatGPT in your command line – but cooler, because it's written in Rust 🦀.
- Get quick answers from LLMs without leaving the terminal.
- Manage multiple LLM providers (OpenAI, Gemini, DeepSeek, NVidia, any OpenAI-compatible endpoint).
- Use smart prompts with built-in pipe operators like
input,fileto fetch data, edit text, pick files, and more. - Keep your conversations with chat history and long-term memory (yes, it remembers stuff!). Just ask your LLM to remember something and It will.
- Perfect for developers who want to integrate LLM queries into scripts or workflows.
| Technology | Description |
|---|---|
| Rust 🦀 | Systems programming language, compiled for speed |
| clap | CLI argument parsing with derive macros |
| reqwest | HTTP client for talking to LLM APIs (blocking + socks proxy support) |
| dialoguer | Interactive CLI prompts (fuzzy select, input, editor, password) |
| dom_smoothie | Extracts readable content from HTML (useful for web article summarization) |
| serde / serde_json | JSON serialization for config and API responses |
| spinners | Show a spinner while waiting for the LLM to respond |
| urlencoding | URL encoding for queries |
| ignore | File walking with gitignore patterns |
| marcli | Render Markdown output in terminal |
asq onboardThis will ask you for:
- LLM providers you want to add (OpenAI, DeepSeek, Gemini, etc.)
- Your API token (stored as an environment variable via config)
- A path to your prompts directory
asqWithout any subcommand, asq will:
- Let you select a provider (or use the last one)
- Open a file picker to choose a prompt template (
.mdfile) - Fill in any prompts via input, file contents, fetch URLs, etc.
- Send the prompt to the LLM and show the answer
asq -c
# or
asq --continueKeeps the previous chat history, so you can ask follow-up questions.
asq -o plain # Just plain text
asq -o markdown # Rendered Markdown (default)asq providers list
asq providers add
asq providers deleteasq memories list
asq memories add
asq memories deleteasq operators list- List installed skills:
asq skills list- Install a new skill from a URL:
asq skills install --name skill_name https://skill-url.com/skill/SKILL.md- Delete an existing skill (interactive selection):
asq skills deleteUse {{ ... }} to embed dynamic content or pipe operators:
Here are the project files:
{{ "Select files" | file_picker }}
Now, please explain the architecture.
Also, check this URL: {{ "https://example.com" | fetch | htm2text }}Available operators: input, editor, file, fetch, select, multiselect, password, file_picker, htm2text, now.
asq can generate shell completion scripts for supported shells.
To enable completions, add the following line to your shell startup file:
source <(asq completions -s SHELL)Replace SHELL with one of the supported shells:
bashzshfishelvishpowershell
Add this line to ~/.bashrc:
source <(asq completions -s bash)Add this line to ~/.zshrc:
source <(asq completions -s zsh)Add this line to your Fish config file, usually ~/.config/fish/config.fish:
source (asq completions -s fish | psub)Add this line to your Elvish config file, usually ~/.config/elvish/rc.elv:
eval (asq completions -s elvish | slurp)Add the generated script to your PowerShell profile:
asq completions -s powershell | Out-String | Invoke-ExpressionYou can place this command in your PowerShell profile file so that completions are loaded automatically in every session.
This project is licensed under the MIT License. Feel free to use, modify, and share it – just don't blame us if your AI goes rogue 🤖.