Ask questions in natural language and get concise, formatted responses directly in your terminal.
info comes in handy when you want a quick lookup without changing the context. No need to run AI cli or switching to an UI-based tool. Just type info git log print nicely and you get git log --oneline --graph --decorate.
npm install -g @frycz/infoYou need at least one of the supported AI CLI tools installed and authenticated:
| Tool | Install | Authentication |
|---|---|---|
| Claude CLI (default) | npm install -g @anthropic-ai/claude-code |
ANTHROPIC_API_KEY must be set |
| Gemini CLI | npm install -g @google/gemini-cli |
GEMINI_API_KEY (or run gemini once and sign in with Google) |
| Ollama | see ollama.ai | none - but the daemon must be running and the model pulled (ollama pull llama3.2) |
| ShellGPT | pip install shell-gpt |
OPENAI_API_KEY (asked for on first run, stored in ~/.config/shell_gpt/.sgptrc) |
info runs the Claude CLI non-interactively (claude -p), which requires an API key in the
environment - an interactive claude login session is not enough:
export ANTHROPIC_API_KEY=sk-ant-...Add it to your ~/.zshrc / ~/.bashrc to make it permanent. Get a key at
console.anthropic.com.
info <question>Simply type your question after info. All arguments are joined into a single query.
info number of countries in the world
# 193
info capital of australia
# canberra
info mass of the sun in kg
# 1.989e30
info git log print nicely
# git log --oneline --graph --decorateinfo -h, --help Show help
info -v, --version Show version
Configure via environment variables:
| Variable | Description | Default |
|---|---|---|
INFO_AI_TOOL |
AI tool to use (claude, gemini, ollama, sgpt) |
claude |
INFO_OLLAMA_MODEL |
Model to use with Ollama | llama3.2 |
ANTHROPIC_API_KEY |
API key for the Claude CLI | - |
GEMINI_API_KEY |
API key for the Gemini CLI | - |
OPENAI_API_KEY |
API key used by ShellGPT | - |
# Use Claude (default)
export ANTHROPIC_API_KEY=sk-ant-...
# Use Gemini instead of Claude
export INFO_AI_TOOL=gemini
export GEMINI_API_KEY=...
# Use Ollama with a specific model (no API key needed)
export INFO_AI_TOOL=ollama
export INFO_OLLAMA_MODEL=mistralThe tool sends your question to an AI with a specialized system prompt that instructs it to:
- Respond with the shortest possible answer
- Use lowercase text only
- Return numbers without units (unless requested)
- Assume the most probable context for vague questions
- Return
ERR: <reason>for unanswerable questions
MIT