Skip to main content

how-tui

A terminal command assistant that uses LLMs to generate shell commands from natural language questions. Ask it how to do something and it will suggest commands for your specific OS and shell.

Features

  • Ask natural-language questions and get relevant terminal command suggestions
  • OS and shell aware — generates commands specific to your environment
  • Pluggable LLM provider system — easily add new providers
  • Authentication credentials stored securely in your OS keyring
  • Selectable models for configured LLM providers

Installation

[!IMPORTANT] Headless environments may require a third party keyring backend. See keyring documentation here.

Install how-tui with uv:

uv tool install how-tui

Requirements

  • Python >= 3.14
  • An API key for a supported LLM provider

Usage

$ how
usage: how [-h] [--list-supported-providers] [--list-configured-providers] [--add-provider]
           [--remove-provider] [--set-default-provider] [--set-model] [--debug] [--provider PROVIDER]
           [--model MODEL]
           [prompt]

positional arguments:
  prompt                Question for the LLM

options:
  -h, --help            show this help message and exit
  --list-supported-providers
                        List all supported LLM providers
  --list-configured-providers
                        List your configured LLM providers
  --add-provider        Setup an LLM provider
  --remove-provider     Remove an LLM provider
  --set-default-provider
                        Set a default LLM provider
  --set-model           Set a default model for a provider
  --debug               Enable debug level logging
  --provider PROVIDER   Specify an LLM provider
  --model MODEL         Specify a model

First-Time Setup

how --add-provider

This will walk you through selecting an LLM provider and authenticating.

Ask a question

how "compress a folder"
how "find all files larger than 100MB"
how "list all running docker containers"
how "rename multiple files at once"

Supported Providers

Provider Status
Google Gemini Supported
Groq Supported

Adding a New LLM Provider

Create a new Python file in src/how_tui/providers/ with a class that subclasses LLMProvider:

class LLMProvider(ABC):
    @staticmethod
    @abstractmethod
    def generate_commands(
        prompt: str,
        model: str,
    ) -> CommandResponse: ...

    """Send request to the LLM to generate commands based on the user question.

    Returns:
        CommandResponse: List of commands.

    Raises:
        GenerateCommandsError: When an issue occurs while generating commands.
    """

    @staticmethod
    @abstractmethod
    def authenticate(console: Console, force: bool = False) -> bool: ...

    """Authenticate the user with the LLM provider.
    
    Returns:
        bool: True for successful authentication, False otherwise.
    """

    @staticmethod
    @abstractmethod
    def unauthenticate() -> None: ...

    """Remove authentication for the LLM provider (ex. delete API key)."""

    @staticmethod
    @abstractmethod
    def get_models() -> list[str]: ...

    """
    Retrieve a list of models supported by the LLM provider.
    
    Returns: 
        list[str]: A list of models supported by the LLM provider.

    Raises:
        FetchModelsError: When an error occurs while fetching models.
    """

License

MIT

Release files for how-tui 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for how-tui 1.0.1
File Size Uploaded
how_tui-1.0.1.tar.gz 49.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for how-tui 1.0.1
File Interpreter ABI Platform
how_tui-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 61.4 kB

Release files / how_tui-1.0.1.tar.gz

Download URL how_tui-1.0.1.tar.gz
Size 49.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1d4c10be6d9dd58d2adee2f80855e3477ad078dda2b9892652bef9687bdc7e9c
BLAKE2b-256 checksum
How to use checksums
b1631c3ca7f2eb8ecd5fed2e7f438501e1fa77de48242b43b412e372950d7d06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / how_tui-1.0.1-py3-none-any.whl

Download URL how_tui-1.0.1-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b78f250b6230d2b90c7631c6f2c4bb4dc1a436125213cba9706cd8f11f357246
BLAKE2b-256 checksum
How to use checksums
3d86da7b781303662a8c17ecf6b03fb579c87188d845f537591e5670e9092e7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

1.0.3

2 release files

1.0.2

2 release files

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page