A terminal AI that knows when to search the web.

Instant answers for what the model knows. Automatic, cited web search for what it doesn't — because it tells you when it's not sure.

pipx install aolbeam-ask
Now available on PyPI v0.1.0 GitHub Homebrew tap
zsh — ask
❯ ask "explain git rebase vs merge in 3 lines"
Git merge joins two histories with a new commit, keeping both branches.
Git rebase replays your commits onto another branch for a linear history.
Use merge to preserve context; use rebase for a clean log.

❯ ask "latest stable version of Rust"
[ask] searching the web (tavily) — model self-assessed: version may have changed
Rust 1.98.1 [1]

Sources:
  [1] Announcing Rust 1.98.1 | Rust Blog
      https://blog.rust-lang.org/...

Why I built this

A quick question should cost a quick command — not a running process.

I wanted lightweight LLM access from the terminal, the place I already live as a developer. But every option made me stop and open something heavy first — a browser tab, a desktop app idling in the background, an Electron client eating hundreds of MB of RAM, or an assistant locked inside the editor. Just to ask "what's the flag for this?" I had to break focus and leave a resource-hungry tool running.

That felt backwards. So ask is built on one rule: spawn, answer, exit. Each call runs for a second or two, prints the answer, and is gone — a single stdlib-only Python file, zero idle memory, no daemon, no background app. You get the answer in your flow, and your machine goes right back to doing nothing.

Why it's different

Most terminal AI tools pick one extreme. ask fills the empty middle.

🐢

Never search

Fast, but confidently wrong on anything after the model's training cutoff.

🔁

Always search

Accurate on fresh facts, but slow and heavy on every single query.

🎯

ask: search when stale

The model self-assesses its own answer and only searches when it admits it might be out of date.

How it works

A simple, reliable mechanism — model self-reporting, not fragile phrase-matching.

01

Answer

The model answers your question normally.

02

Self-assess

It appends a hidden line: NEEDS_WEB: yes/no + a reason.

03

Decide

ask reads that line, strips it from view, and searches only if flagged.

04

Ground & cite

Re-asks grounded in results, prints the answer with numbered sources.

Features

Everything you'd want from a terminal companion — and nothing resident when idle.

🪶

Zero idle memory

No daemon, no server. Each call spawns, runs ~1–2s, prints, and exits.

🔌

Any OpenAI-compatible API

Groq, Gemini, OpenRouter, Cerebras, or a fully local Ollama.

📄

File & line context

ask -f big.py:50-120 "..." — send only the lines you need.

📥

Stdin piping

cat error.log | ask "what broke?"

🔎

Pluggable search

Keyless DuckDuckGo by default; Tavily, Serper, or Brave with a key.

💬

Conversation memory

Readable sessions you can list, resume, and rename.

Install

The package is aolbeam-ask; the command is ask.

pipx (recommended)

pipx install aolbeam-ask

pip

pip install aolbeam-ask

Homebrew

brew install sinhaKAN-ra/tap/ask

One-line script

curl -fsSL https://raw.githubusercontent.com/sinhaKAN-ra/ask/main/install.sh | bash

Run without installing

uvx aolbeam-ask "your question"

Then get a free key at console.groq.com/keys, export GROQ_API_KEY="gsk_...", and run ask "hello". Full docs in the README.