Your model. Your call.
Connect an OpenAI-compatible endpoint. Use a hosted provider or point at local Ollama. Set your model and API key in one config file.
A quick question shouldn’t take you out of your terminal. Ask about your code, untangle an error, or check the live web. Then get back to building.
pipx install aolbeam-askOpen source · Bring your own API key · macOS, Linux & Windows
# a small question, right where you are
❯ ask "undo my last commit but keep the changes"
Keep your changes staged with:
git reset --soft HEAD~1This moves the branch back one commit.
Your files and staging area stay intact.
# bring fresh sources into the conversation
❯ ask -w "what changed in Python's latest release?"
searching the web · brave
Illustrative session · responses vary by model
01 / IN YOUR FLOW
Built for the questions between the big tasks.
Use it in your editor’s terminal or your favorite shell.
ask -f app.py:40-90 "explain this function and flag edge cases"WHAT HAPPENS
Only lines 40–90 of app.py are attached to your question. Get a focused explanation without sending the whole file.
Replace app.py with a file in your project. Attached content is sent to your configured model provider.
02 / SMALL BY DESIGN
Python’s standard library, a model endpoint,
and the tools you already know.
Connect an OpenAI-compatible endpoint. Use a hosted provider or point at local Ollama. Set your model and API key in one config file.
Freshness cues and a model self-check can trigger search. Use -w to search first and get numbered sources, or --no-web to skip it.
Resume and name local conversations. Use --no-history for a standalone question that neither reads nor saves a conversation.
Readable terminal formatting, file slices, stdin, and clean Markdown when redirected. Diagnostics stay on stderr; answers stay on stdout.
ask --doctor checks local setup. Add --check-web to test your search connection. Config output masks saved API keys.
03 / UP AND ASKING
One model key gets you started.
Add a search key when you want live web results.
Python 3.8+ and pipx are required. Already installed? Use pipx upgrade aolbeam-ask.
pipx install aolbeam-ask
pipx ensurepathReopen your terminal if ask isn’t found.
Run once with uvx aolbeam-ask "hello", or install with python -m pip install aolbeam-ask. The package name is aolbeam-ask; the command is ask.
The setup and diagnostic flags below require the updated CLI. Until a new package release is published, install from an updated checkout:
git clone https://github.com/sinhaKAN-ra/ask.git
cd ask
pipx install --force .If --setup-search is unrecognized, use the manual config option in step 3.
Create a key at Groq’s console ↗. Replace the placeholder below with your own key.
export GROQ_API_KEY="YOUR_GROQ_KEY"Using another model? Set base_url, model, and api_key_env in ~/.ask-cli/config.json.
Create a Brave Search API account, choose a plan, and create a key in your API dashboard ↗.
export BRAVE_API_KEY="YOUR_BRAVE_KEY"
ask --setup-search braveA Brave browser installation does not provide an API key. Check the provider’s current pricing and request limits.
Add the export lines to ~/.zshrc (zsh) or ~/.bashrc (bash), then open a new terminal. Treat that file as private: it contains your keys. Never commit keys to your project.
Run ask --config once to create the config. Merge these settings into ~/.ask-cli/config.json (%USERPROFILE%\.ask-cli\config.json on Windows), keeping your model settings:
{
"search_provider": "brave",
"search_api_key": "",
"search_api_key_env": "BRAVE_API_KEY",
"web_fallback": true
}Set the environment variable above, then run ask -w "latest Python release; cite sources". Older versions may display saved keys in --config; keep that output private.
Check local configuration, test a real search, and get your first sourced answer.
ask --doctor
ask --doctor --check-web
ask -w "What changed in the latest Python release? Cite sources."What success looks like
Doctor reports a live search result count from brave. Your answer includes numbered source URLs.
The local check verifies key presence. The live check sends a test query and may consume search credits. Your question also uses your model provider.
04 / KEEP THIS HANDY
ask "explain git rebase"A quick question, in your current conversation.
ask -w "latest Node.js LTS release"Search first, then answer using retrieved sources.
ask -f "src/*.py" "review these files"Attach matching files as context.
git diff | ask "write a commit message"Bring your existing command output along.
ask --no-history --no-web "explain DNS"A standalone answer, with no saved conversation.
ask --format md "explain TCP" > notes.mdSave the answer as Markdown.
ask --listFind conversations; resume one with --select N.
ask --setup-search tavilySave your preferred search provider.
A FEW GOOD QUESTIONS
You need a model provider key for hosted models. DuckDuckGo search needs no additional key; Brave, Tavily, and Serper each need their own search key. Local Ollama can use a placeholder model key.
No. It reads files you attach, accepts piped input, calls your chosen model, and retrieves search results when enabled. It prints suggestions; it does not execute generated commands or edit your code.
Questions, attached content, and recent conversation history go to your model provider. Web searches send the question to your search provider. Sessions are saved locally under ~/.ask-cli/sessions. Use --no-history to skip reading and saving sessions; this still calls your configured providers.
Check that you selected the matching provider and set the variable in the same terminal. Use ask --doctor, then ask --doctor --check-web. An HTTP 401 or 403 suggests a key or plan issue; 429 indicates a rate or quota limit. Check the provider dashboard.
No. The model’s self-check can miss a need for fresh information, and retrieved sources can be incomplete. Use -w when freshness matters and open the cited sources to verify important claims. Forced search fails visibly when no usable results are available.