Skip to content

Release v0.12.1

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Apr 17:25

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_api provider: 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

  1. Run the interactive config wizard: whai --interactive-config and accept the insert-command offer (defaults to Ctrl+G).
  2. On the shell, type a natural-language request, e.g. list largest folders here.
  3. Press Ctrl+G — the line is replaced with a generated shell command (from whai --command-only).
  4. 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_only added so models return a single execute_shell tool 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-dotenv support, pinned LiteLLM to 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-config and accept the keybinding offer.
  • --command-only is 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_api provider in your providers config following your existing provider conventions.