Skip to content

metolius25/ask

Repository files navigation

Ask - AI CLI Client

A beautiful, lightweight CLI tool for querying AI models directly from your terminal

License: MIT Go Version GitHub Release Build

Features

  • 🚀 Simple Usage - Just type ask [your question]
  • 🎨 Beautiful Output - Markdown rendering with syntax highlighting
  • 🤖 Multi-Provider - Gemini, Claude, ChatGPT, DeepSeek, Mistral, Qwen
  • 🔄 Smart Detection - Auto-detects provider from model name
  • 📋 Profiles - Save favorite configs with -P fast
  • 💬 Interactive Sessions - Multi-turn conversations with -s
  • Short Flags - -m, -p, -s, -P for quick usage

Quick Start

# Clone and build
git clone https://github.com/metolius25/ask
cd ask && go build -o ask

# First run - interactive setup
./ask

# Or manually configure
cp config.yaml.example ~/.config/ask/config.yaml
# Edit and add your API key

# Start using!
ask What is the meaning of life?

Usage

# Basic query
ask What is quantum computing?

# Use a specific model (auto-detects provider)
ask -m gpt-4o Explain neural networks

# Use provider/model syntax
ask -m claude/claude-3-opus Write a poem

# Use a profile
ask -P fast Quick summary of relativity

# Interactive session
ask -s

# List available models
ask --list-models

# Configure defaults
ask --config

Flags

Flag Short Description
-model -m Model to use (e.g., gpt-4o, gemini/gemini-2.5-pro)
-provider -p Provider (gemini, claude, chatgpt, deepseek, mistral, qwen)
-profile -P Use a named profile from config
-session -s Start interactive session mode
-version -v Show version
--list-models List available models
--config Configure API keys (--config or --config qwen)

Configuration

Config file: ~/.config/ask/config.yaml

default_provider: gemini

providers:
  gemini:
    api_key: YOUR_API_KEY
    model: gemini-2.5-flash  # optional default
  claude:
    api_key: YOUR_API_KEY

# Optional: quick-switch profiles
profiles:
  fast: gemini/gemini-2.5-flash
  smart: claude/claude-3-opus-20240229
  cheap: deepseek/deepseek-chat

Getting API Keys

Session Mode

Start an interactive session:

ask -s

Session commands:

  • /model <name> - Switch model (e.g., /model gpt-4o)
  • /clear - Clear conversation
  • /help - Show commands
  • /exit - Exit session

Troubleshooting

"Provider not configured" - Add API key to config.yaml

"Model not found" - Run ask --list-models to see available models

First time? - Just run ask and follow the interactive setup

License

MIT - See LICENSE file for details.

About

CLI tool for talking to your AI models directly from your terminal with syntax highlighting

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages