v0.12.1 — Insert-command keybinding
A focused release whose primary feature is an interactive “turn this line into a command” keybinding. Supporting additions: the --command-only flag (built for that flow), a generic OpenAI-compatible provider, and reliability/test cleanups.
Highlights
- Insert-command keybinding (primary): enable a shell binding (default Ctrl+G) that replaces the current typed line with a proposed shell command you can edit and run.
--command-only: prints exactly one shell command to stdout (intended for the insert-command snippet/widget).openai_apiprovider: generic OpenAI-compatible provider for local/remote endpoints (e.g.llama.cpp, vLLM).- Wizard improvements: bash/zsh detection, idempotent snippet insertion, clear explanation + sourcing reminder.
Insert-command
- Run the interactive config wizard:
whai --interactive-configand accept the insert-command offer (defaults to Ctrl+G). - On the shell, type a natural-language request, e.g.
list largest folders here. - Press Ctrl+G — the line is replaced with a generated shell command (from
whai --command-only). - Edit the proposed command if needed, then press Enter to run it.
Fixes & improvements
- Read prompts from stdin when no free-form query is provided (enables piping from widgets/snippets).
system_prompt_command_onlyadded so models return a singleexecute_shelltool call (no explanatory text) for command-only flows.- Improved integration test reliability and removed unused imports/vars across tests.
- Small CLI / core cleanups: dead code removed and duplicated logic simplified.
- Tests & infra:
python-dotenvsupport, pinnedLiteLLMto 1.79.0 (security), more reliable tmux/MCP tests, and general test-suite cleanups. - Code health: removed dead and duplicated code across CLI, context capture, UI, and execution paths.
Upgrade & notes
- To enable insert-command: run
whai --interactive-configand accept the keybinding offer. --command-onlyis additive and exists primarily to support the shell snippet/widget, it will print exactly one command and no Rich UI.- To use self-hosted OpenAI-compatible servers, add an
openai_apiprovider in yourprovidersconfig following your existing provider conventions.