Skip to main content

uhh

PyPI Python versions Status License Publish

i forgor 💀 — ask your local LLM for the command you forgot, then run it.

uhh is a tiny CLI that asks a local Ollama instance for the command-line answer to a natural-language question, prints it, and optionally runs it. Cross-platform, zero runtime dependencies.

Demo

$ uhh how do i scp test.txt to mhills@172.16.0.1
$ scp test.txt mhills@172.16.0.1:~/
  # Copies test.txt to the remote host's home directory.

Run it? [y/N] y
test.txt    100%   12B  ...

It reads safe local context — your username, hostname, current directory, names of ~/.ssh/*.pub keys, ssh config Host aliases — so the suggested command uses your real values instead of placeholders.

If you ask about a different OS than your current one (e.g. you're on Linux but ask "how do I unlock the keychain on mac"), uhh produces the right command but skips the run prompt for safety.

Quoting your question

uhh reads your question from argv, so your shell parses it before uhh ever sees it. Two characters will trip you up if left bare:

  • Apostrophes (') — uhh how do I keep my mac from sleeping when I don't want it to will leave your shell sitting on a continuation prompt waiting for the closing '. Wrap the question in double quotes, escape the apostrophe, or just rewrite without the contraction.
  • Shell metacharacters (|, >, <, &, ;, $, backticks) — these get interpreted by the shell. Quote the question if you're including any of them.
# bad — shell hangs on the apostrophe:
uhh how do I stop my mac sleeping when I don't want it to

# good — any of these works:
uhh "how do I stop my mac sleeping when I don't want it to"
uhh how do I stop my mac sleeping when I don\'t want it to
uhh how do I stop my mac sleeping when I do not want it to

Install

pip install uhh

Or with pipx for an isolated install:

pipx install uhh

You also need Ollama running somewhere reachable, plus at least one chat model. The first-run wizard walks you through this.

First run

Any first invocation triggers a one-time setup wizard:

$ uhh how do i list listening ports

It looks like this is the first time uhh has run —
you need to configure a few things.

Ollama host [http://localhost:11434]:
  ✓ reachable, 8 model(s) installed

Recommended for command lookup:
  [1] qwen2.5-coder:14b-instruct-q4_K_M  ✓ installed   best for shell commands
  [2] qwen3:14b                          ✓ installed   newer general-purpose
  [3] llama3.1:8b                        ✓ installed   fast, solid all-rounder
  [4] qwen2.5-coder:7b                   pull (4.4 GB) smaller coder model
  [5] llama3.2:3b                        pull (2.0 GB) tiny + very fast

Pick a default model [1]:

After picking a model (and pulling it if needed), your original question is answered. To re-run setup later, delete the config file and run uhh ... again.

Configuration

Config lives at:

  • Linux / macOS: ~/.config/uhh/config.toml
  • Windows: %APPDATA%\uhh\config.toml

Configure multiple Ollama instances ("profiles") and switch between them:

default_profile = "local"

[profiles.local]
host  = "http://localhost:11434"
model = "qwen2.5-coder:14b-instruct-q4_K_M"

[profiles.homelab]
host  = "http://homelab.lan:11434"
model = "qwen3:14b"
# api_key = "..."   # optional bearer token if Ollama is behind a proxy

Then:

uhh --profile homelab "rotate this nginx cert"

Override hierarchy (highest wins): --host / --model / --profile flags → UHH_HOST / UHH_MODEL / UHH_PROFILE env vars → config file.

Useful flags

Flag Purpose
--no-run Print the command but skip the y/N prompt
-y, --yes Run without asking (only for same-OS commands)
--show-context Print the system facts being sent to the model
--no-context Don't send any system facts
--shell SHELL Override shell-dialect detection (bash/zsh/fish/powershell)
--list-profiles List configured profiles
--config Print the config file path

What gets sent to the model

A small, read-only snapshot of your machine is included in the prompt by default so suggestions use your real values:

  • Hostname, username, OS, current working directory
  • Filenames of public keys in ~/.ssh/ (e.g. id_ed25519.pub) — never key contents
  • Host alias names from ~/.ssh/config — never destination hostnames

Nothing is sent to a third party — only to the Ollama instance you configured. Disable entirely with --no-context.

Development

Install the latest unreleased code from the develop branch:

pip install git+https://github.com/mattintech/uhh.git@develop

Or with pipx:

pipx install git+https://github.com/mattintech/uhh.git@develop

Re-install from a different branch (e.g. a feature branch) — pipx upgrade won't switch refs, so use --force:

pipx install --force git+https://github.com/mattintech/uhh.git@feature/pypiready

For pip, add --force-reinstall:

pip install --force-reinstall git+https://github.com/mattintech/uhh.git@feature/pypiready

Check the installed version anytime with uhh --version.

Branches:

  • main — tracks released versions; tag a release here to publish to PyPI
  • develop — integration branch for in-progress work; install from here to try unreleased changes

Releasing: bump nothing — versions come from git tags via hatch-vcs. Merge develop → main, then GitHub UI → Releases → Draft → tag vX.Y.Z → Publish. The publish.yml workflow ships it to PyPI.

Requirements

  • Python 3.11+ (uses stdlib tomllib)
  • Ollama reachable locally or remotely
  • A chat-tuned model (the wizard helps install one)

Reporting bugs

Run uhh --bug and your browser will open a pre-filled GitHub issue form with your uhh version, OS, Python version, shell, model, and a localhost-vs-remote indicator for your Ollama host. Add what you ran, what you expected, and what you got — then submit. (No GitHub auth happens from uhh; it just opens the URL.)

You can also pass the prompt that broke to pre-fill the "what you ran" field:

uhh --bug "show me lines tagged [api] in app.log"

License

MIT

Metadata

Release files for uhh 0.1.3

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

Source distribution (sdist)

Source distribution for uhh 0.1.3
File Size Uploaded Provenance Actions
uhh-0.1.3.tar.gz 16.3 kB With provenance Details for uhh-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for uhh 0.1.3
File Interpreter ABI Platform Actions
uhh-0.1.3-py3-none-any.whl Python 3 none any Details for uhh-0.1.3-py3-none-any.whl

Total release size: 31.5 kB

Release files / uhh-0.1.3.tar.gz

Download URL uhh-0.1.3.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f2e6f143567f0a057e066c10343bd92796ec079bfcfb4184100c41c2f42a5370
BLAKE2b-256 checksum
How to use checksums
664fc5cc6348af27efb07bf5bac712242e9807ce3eb94b8b43309f37668a138d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 26, 2026.

Transparency log

Release files / uhh-0.1.3-py3-none-any.whl

Download URL uhh-0.1.3-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
807e7b94f5d73b0fe54f5e51fd0d44e3a7f2ed0affd6c8940c157110442ec984
BLAKE2b-256 checksum
How to use checksums
5d33ec8deabc2dea59c8f8a3dee78b2da571d2afb61b9095ea628b5ddb32f4ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 26, 2026.

Transparency log

Security for uhh 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for uhh-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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