Skip to content

A terminal helper for querying LLM

License

Notifications You must be signed in to change notification settings

antonmedv/howto

Repository files navigation

howto


walk demo

Howto is a terminal helper which queries LLM and inserts the result into the current terminal input.

Supports OpenAI, DeepSeek, and Gemini.

Simply press ctrl+g to call howto. Howto replaces your command with a correct command from LLM.

Install

go install github.com/antonmedv/howto@latest

Or download prebuild binaries.

Setup

Add a key binding to .zshrc or a similar config:

Zsh
bindkey -s "\C-g" "\C-ahowto \C-j"

Configuration

Set one of the following API keys (provider is detected automatically):

Variable Provider Default Model Get API Key
OPENAI_API_KEY OpenAI gpt-4o platform.openai.com
GEMINI_API_KEY Gemini gemini-2.0-flash aistudio.google.com
DEEPSEEK_API_KEY DeepSeek deepseek-chat platform.deepseek.com

All providers use OpenAI-compatible API format (OpenAI, DeepSeek, Gemini).

If multiple keys are set, priority is: OpenAI → Gemini → DeepSeek.

Optionally override the model:

export HOWTO_MODEL="gpt-4o-mini"

Usage

Write a command in terminal and press ctrl+g to send current command to LLM. LLM response will be inserted into the current input. You can modify the returned command, before executing it.

Recall previous command from history and to adjust the prompt.

Examples

Use howto to list all container's hostnames:

howto example

Use howto to convert a movie to mp4:

howto example

Related

  • walk – terminal file manager
  • fx – terminal JSON viewer
  • countdown – terminal countdown timer

License

MIT

About

A terminal helper for querying LLM

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Contributors 2

  •  
  •  

Languages