Home Docs Examples Blog Changelog Star on GitHub
Reference

Documentation

CLI version: 0.1.4
License: Apache-2.0
See examples →

Installation

Quick install (macOS / Linux)

$ curl -fsSL https://getyaak.ai/install.sh | bash

Downloads the latest release binary, verifies the SHA256 checksum, and installs to ~/.local/bin.

Pin a specific version or change the install directory:

$ YAAK_VERSION=v0.0.8 curl -fsSL https://getyaak.ai/install.sh | bash
$ YAAK_INSTALL_DIR=/usr/local/bin curl -fsSL https://getyaak.ai/install.sh | bash

Homebrew (macOS / Linux)

$ brew install hanneshapke/yaak/yaak

Arch Linux (AUR)

Two packages are available on the AUR: yaak-cli builds from source and yaak-cli-bin installs the upstream prebuilt binary.

$ yay -S yaak-cli
$ yay -S yaak-cli-bin

Nix / NixOS

yaak ships a flake under packaging/nix. On any flake-enabled system:

$ nix profile install github:hanneshapke/yaak
$ nix run github:hanneshapke/yaak -- --help

Debian / Ubuntu (.deb)

A .deb package is attached to each GitHub release. Download and install directly:

$ curl -LO https://github.com/hanneshapke/yaak/releases/latest/download/yaak_0.1.3_amd64.deb
$ sudo dpkg -i yaak_0.1.3_amd64.deb

Includes bash, zsh and fish shell completions.

Scoop (Windows)

$ scoop bucket add yaak https://github.com/hanneshapke/scoop-yaak
$ scoop install yaak

Cargo

$ cargo install yaak

Prebuilt binaries and .deb packages are also available on the GitHub Releases page for Linux (x86_64), macOS (x86_64, aarch64), and Windows (x86_64).

Configuration

yaak resolves settings in this priority order: CLI flags → environment variables → config file → defaults.

Interactive wizard

The fastest way to get started. Run yaak --config to pick a language, provider, model, and enter your API key.

$ yaak --config

Config file

Stored at ~/.config/yaak/config.toml. On macOS, ~/Library/Application Support/yaak/config.toml is also checked.

# ~/.config/yaak/config.toml
api_base = "https://api.openai.com/v1"
api_key = "sk-..."
model = "gpt-4o-mini"
language = "en" # en, de, es, fr, pt, zh, ja, ko

Environment variables

$ export YAAK_API_BASE="https://api.openai.com/v1"
$ export YAAK_API_KEY="sk-..."
$ export YAAK_MODEL="gpt-4o-mini"
$ export YAAK_LANGUAGE="en" # optional: en, de, es, fr, pt, zh, ja, ko

Usage

Describe what you want in plain English. yaak sends it to your LLM, shows you the generated command, and lets you execute, copy, or abort.

$ yaak find all rust files modified this week
Thinking ....
Command: find . -name "*.rs" -mtime -7
? What next?: Execute / Refine / Copy / Abort

Reverse / Explain mode

Pass --reverse or --explain to get a detailed, token-by-token breakdown of any command.

$ yaak --explain 'find . -name "*.log" -mtime +30 -delete'

Copy to clipboard

Use --copy to send the generated command straight to your clipboard without executing.

$ yaak --copy compress all png files in this directory

Command history

yaak saves every generated command. Browse, search, or re-run from history.

$ yaak --history # show recent commands
$ yaak --last # re-execute the last command
$ yaak --search "docker" # search by keyword

Shell completions

$ yaak --completions bash > ~/.bash_completion.d/yaak
$ yaak --completions zsh > ~/.zfunc/_yaak
$ yaak --completions fish > ~/.config/fish/completions/yaak.fish

All flags

FlagShortDescription
--config-cInteractive configuration wizard
--api-base-uAPI base URL
--api-key-kAPI key
--model-mModel name
--yes-ySkip confirmation prompt
--reverse-rExplain a command instead of generating
--explain-eAlias for --reverse
--copy-CCopy generated command to clipboard
--contextInclude project type and file listing in prompt
--cacheReuse cached result (exact or BM25 fuzzy match)
--no-cacheForce fresh API call, ignore cache
--history-HShow recent command history
--last-lRe-execute the most recent command
--search-sSearch command history by keyword
--language-LUI language: en, de, es, fr, pt, zh, ja, ko
--version-vPrint version number
--update-UUpdate yaak to the latest version
--feedbackOpen the feedback page in your browser
--completionsGenerate shell completions (bash/zsh/fish)
--limitNumber of history entries to show (default: 20)

Multi-language support

yaak supports 8 languages for all UI elements — prompts, error messages, menus, and labels. The configuration wizard includes a language selection step, or you can set it directly.

CodeLanguage
enEnglish
deDeutsch
esEspañol
frFrançais
ptPortuguês
zh中文 (Chinese)
ja日本語 (Japanese)
ko한국어 (Korean)

Setting the language

Language is resolved in priority order: CLI flag → environment variable → config file → system locale → English.

# CLI flag
$ yaak -L de list files in current directory

# Environment variable
$ export YAAK_LANGUAGE=fr

# Config file (~/.config/yaak/config.toml)
language = "es"

# Or select during setup
$ yaak --config

LLM explanations

When a non-English language is active, yaak also instructs the LLM to write explanations, summaries, and cautions in that language (used with --explain mode). The structured output format is preserved for correct parsing.

Context mode

yaak always includes your current working directory in the system prompt. For richer context, pass --context to also include:

Project type detection — Cargo.toml, package.json, go.mod, Makefile, Dockerfile, and 15+ other markers.

Git branch — if you're in a git repository.

File listing — top-level non-hidden files (up to 30).

# Without --context: LLM guesses how to build
$ yaak build the project

# With --context: LLM knows it's a Rust project
$ yaak --context build the project
Command: cargo build --release

Context is opt-in to avoid leaking sensitive filenames to the LLM provider.

Cache mode

Every generated command is saved to ~/.config/yaak/cache.json, keyed by model and description. Use --cache to skip the API call when a matching entry exists.

yaak tries an exact match first. If none is found, it falls back to BM25 fuzzy matching — a term-frequency ranking algorithm that finds similar cached descriptions even when the wording differs. Stop words are stripped and terms are scored by relevance across all cached entries for the same model.

# First call hits the API
$ yaak list all docker containers

# Exact match — returns instantly
$ yaak --cache list all docker containers
(cached)
Command: docker ps -a

# Fuzzy match — similar wording also hits the cache
$ yaak --cache show docker containers
(cached) (similar: "list all docker containers")
Command: docker ps -a

Use --no-cache to force a fresh API call and skip saving the result.

Safety

yaak blocks destructive commands before execution. The following patterns are detected and rejected, including privilege-escalation variants (sudo, doas, pkexec — with flags, env wrappers, etc.) and piped/chained sequences:

rm  •  rmdir  •  mkfs  •  dd  •  shred  •  wipefs
> /dev/  •  chmod 000  •  :(){ :|:& };:

If a destructive command is detected, yaak prints a warning and asks for confirmation before executing.

$ yaak delete all files in this directory
Command: rm -rf ./*
blocked: Destructive command blocked: `rm` is not allowed.

Privilege escalation

Commands using sudo, doas, or pkexec that are not destructive trigger a separate confirmation prompt warning about elevated privileges. This applies even when flags or env wrappers are used (e.g. sudo -u root, sudo env VAR=val).

$ yaak restart nginx
Command: sudo systemctl restart nginx
warning: ⚠ This command requires elevated privileges (sudo/doas/pkexec)
Run with elevated privileges? [y/N]

Compatible providers

yaak auto-detects the provider from the API base URL and uses the appropriate request format.

Anthropic (native Messages API)

Detected when the API base contains anthropic.com. Uses the Messages API with streaming.

$ yaak -u https://api.anthropic.com/v1 -k sk-ant-... find large log files

Google Gemini (native Gemini API)

Detected when the API base contains generativelanguage.googleapis.com. Uses the Gemini streaming API with SSE.

$ yaak -u https://generativelanguage.googleapis.com/v1beta -k AIza... find large log files

OpenAI-compatible

All other providers use the /v1/chat/completions endpoint with streaming.

ProviderAPI baseKey required
OpenAIhttps://api.openai.com/v1Yes
Ollamahttp://localhost:11434/v1No
Groqhttps://api.groq.com/openai/v1Yes
Together AIhttps://api.together.xyz/v1Yes
OpenRouterhttps://openrouter.ai/api/v1Yes
Doublewordhttps://api.doubleword.ai/v1Yes
LM Studiohttp://localhost:1234/v1No
vLLMhttp://localhost:8000/v1No
LocalAIhttp://localhost:8080/v1No

Troubleshooting

zsh: no matches found: it?

zsh treats ?, *, and other characters as glob wildcards. When you type yaak what time is it?, zsh tries to expand it? as a file pattern and fails.

Quick fix — quote your description:

$ yaak "what time is it?"

Permanent fix — add a noglob alias to your ~/.zshrc:

$ echo 'alias yaak="noglob yaak"' >> ~/.zshrc
$ source ~/.zshrc

The noglob prefix tells zsh to skip glob expansion for yaak, so ?, *, and other special characters just work without quoting.

bash: similar issues

bash does not expand ? if no matching files exist, so this is usually only a problem in zsh. If you do hit issues in bash, quote your description the same way.