Skip to content

`how` is a lightweight, cross-platform command-line tool written in Go that helps you remember shell commands. Just ask it `how` to do something, and it will give you the command you need

License

Notifications You must be signed in to change notification settings

patrykgruszka/how-cli

Repository files navigation

how - Lightweight AI assistant for your CLI

Enter how – the slick, AI-powered sidekick that turns your "WTF do I type?" moments into commands. Built in Go for speed, this cross-platform tool taps OpenRouter.ai's API to generate commands via top LLMs (even free ones!).

Features

  • ⚡ Blazing fast and dependency-free.
  • 🌐 Runs on Linux, macOS, Windows.
  • 💸 Free models by default—no cost to start.

Usage

Ask away:

$ how find all files named docker-compose.yml
find . -type f -name "docker-compose.yml"

$ how check memory usage in a human readable format
free -h

$ how kill process on port 8080
lsof -ti:8080 | xargs kill -9

Pro Tip: Override the model with --model "anthropic/claude-3-haiku" or set a default via how set-model. Defaults to mistralai/mistral-7b-instruct:free.

Install

Download Pre-built Binary (Recommended)

Download the latest release for your platform from GitHub Releases:

  1. Download the archive for your OS/architecture
  2. Extract the binary:
    # Linux/macOS
    tar -xzf how-v*.tar.gz
    
    # Windows
    # Extract the .zip file
  3. Move to your PATH:
    # Linux/macOS
    sudo mv how /usr/local/bin/
    
    # Windows
    # Move how.exe to a directory in your PATH

Arch Linux (AUR)

For Arch Linux users, install via AUR:

yay -S how-cli

Build from Source

  1. Clone the repo:
    git clone https://github.com/patrykgruszka/how-cli.git
    cd how-cli
  2. Run the installer (handles build and PATH):
    chmod +x install.sh
    ./install.sh

Alternatives: Build manually with go build or use make install. For cross-platform binaries, run make cross (outputs to dist/).

Setup

Grab a free API key from openrouter.ai/keys, then:

how setup

Paste your key—it's stored securely in ~/.config/how/config.yaml (or equivalent on Windows).

Config & More

Tweak your config file if needed (e.g., for a custom default model). For dev builds or contributions:

  • make build for local.

About

`how` is a lightweight, cross-platform command-line tool written in Go that helps you remember shell commands. Just ask it `how` to do something, and it will give you the command you need

Resources

License

Stars

Watchers

Forks

Packages

No packages published