Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

info

Ask questions in natural language and get concise, formatted responses directly in your terminal.

Read blog post

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.

Installation

npm install -g @frycz/info

Prerequisites

You 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)

Claude API key

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.

Usage

info <question>

Simply type your question after info. All arguments are joined into a single query.

Examples

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 --decorate

Options

info -h, --help     Show help
info -v, --version  Show version

Configuration

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 -

Examples

# 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=mistral

How It Works

The 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

License

MIT

About

Ask questions in natural language and get concise, formatted responses directly in your terminal.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages