A fast, minimal CLI to ask questions to any LLM from your terminal.
aisk ge31lite "explain monads in Haskell"- Streaming responses — tokens appear as they arrive
- Reasoning support — shows thinking tokens for models like o4-mini, DeepSeek-R1
- Model aliases — short names for long model IDs (
ge31lite→google/gemini-3.1-flash-lite-preview) - Pass-through models — use any model directly:
aisk perplexity/sonar "query" - Quiet mode —
-qstrips all decoration, perfect for piping - Buffered mode —
-Sprints the full response at the end instead of streaming - Stdin support —
echo "explain this" | aisk cls46 - OpenAI-compatible — works with OpenRouter (default), or any OpenAI-compatible endpoint
- Zero config — just set your API key and go
# One-liner (installs uv if needed, upgrades if already installed)
curl -fsSL https://raw.githubusercontent.com/Ymx1ZQ/aisk/main/install.sh | bashOr manually:
# From GitHub
uv tool install git+ssh://git@github.com/Ymx1ZQ/aisk.git
# From local clone
git clone git@github.com:Ymx1ZQ/aisk.git
cd aisk
uv tool install .No explicit setup needed. On first run, aisk detects the missing configuration and launches the setup wizard automatically:
aisk ge31lite "hello world"
# → First run detected — launching setup wizard...
# → Asks for endpoint and API key, then runs your queryTo reconfigure later:
aisk initThe wizard will:
- Ask for the API endpoint (default: OpenRouter, press Enter to accept)
- Ask for your API key
- If config already exists, ask whether to overwrite
~/.aisk/.env — API key (loaded automatically):
AISK_API_KEY=sk-or-...
~/.aisk/conf.toml — endpoint and model aliases:
[api]
endpoint = "https://openrouter.ai/api/v1/chat/completions"
[aliases]
ge31lite = "google/gemini-3.1-flash-lite-preview"
cls46 = "anthropic/claude-sonnet-4.6"
# ... add your own# Ask a question (verbose mode, default)
aisk ge31lite "what is the CAP theorem?"
# No quotes needed — all words after the model are joined automatically
aisk ge31lite what is the CAP theorem
# Use quotes if your message contains shell special characters: () ! > | &
aisk glm51 "what is f(x) = x^2 + (x-1)?"
# Use single quotes for backticks
aisk ge31lite 'explain the `ls -la` command'
# Quiet mode — only the LLM response, no decoration
aisk -q cls46 "translate to English: buongiorno"
# Buffered mode — print full response at the end (no progressive streaming)
aisk -S ge31lite "explain monads"
# Combine: quiet + buffered — ideal for scripts
aisk -q -S cls46 "translate to English: buongiorno" | wc -w
# Pipe from stdin
echo "summarize this" | aisk gpt5mini
# Search with Perplexity
aisk s what is the mass of the sun
aisk sps "latest news on Rust 2026"
# Use a full model name directly (no alias needed)
aisk perplexity/sonar "latest news on Rust 2026"
# List available aliases (grouped by provider)
aisk models
# Show version
aisk --version──────────────────────────────────────────────────────────────────────────────────────────────────
Model: google/gemini-3.1-flash-lite-preview | User: what is the CAP theorem?
──────────────────────────────────────────────────────────────────────────────────────────────────
► ANSWER
The CAP theorem states that a distributed system can only guarantee
two of three properties simultaneously: Consistency, Availability,
and Partition tolerance...
──────────────────────────────────────────────────────────────────────────────────────────────────
Tokens: In 12 | Out 234 (Reasoning: 0) | Cost: $0.000456
──────────────────────────────────────────────────────────────────────────────────────────────────
The CAP theorem states that a distributed system can only guarantee
two of three properties simultaneously: Consistency, Availability,
and Partition tolerance...
Define short shell functions that call aisk with a specific model. Configure them in ~/.aisk/conf.toml:
[shortcuts]
ds = "dsv4f"
sps = "sps"
# gpt = "gpt55"
# cl = "cls46"
# ge = "ge25flash"Each shortcut becomes a shell function (e.g. ds "question" → aisk dsv4f "question"), loaded automatically via eval "$(aisk completions bash)".
# See generated functions
aisk shortcuts
# Use directly
ds what is the CAP theorem
sps latest news on Rust 2026Tab-completion for model aliases and subcommands. Installed automatically by install.sh.
# Install manually (appends to ~/.bashrc or ~/.zshrc)
aisk completions install
# Refresh after changing aliases/shortcuts in conf.toml
eval "$(aisk completions refresh)"Or add manually to your shell rc file:
# Bash — add to ~/.bashrc
eval "$(aisk completions bash)"
# Zsh — add to ~/.zshrc
eval "$(aisk completions zsh)"Minimal by design:
httpx— streaming HTTPpython-dotenv— loads.envtomli— TOML parser (Python <3.11 only; 3.11+ uses stdlibtomllib)
MIT