Skip to main content

Find and run shell commands using natural language, powered by your shell history and local AI

Project description

shix

Find and run shell commands using natural language — powered by your own shell history.

shix searches your shell history to suggest relevant commands based on what you describe. No cloud, no API keys, just your local history.

Install

pip install git+https://github.com/nicla97/shix.git

Or clone and install locally:

git clone https://github.com/nicla97/shix.git
cd shix
pip install -e .

Usage

# Describe what you want to do
shix ask "docker compose restart"
shix ask "git push"
shix ask "activate virtual environment"

# Show more results
shix ask "git" --top 15

# Use a local AI model via Ollama (optional)
shix ask "find all large files" --local

An interactive TUI opens where you can:

  • Arrow keys to navigate between suggestions
  • Enter or click to copy a command to clipboard
  • Mouse hover to highlight a suggestion
  • Scroll through many results
  • Esc or q to quit

Modes

Offline (default)

Fuzzy keyword search on your shell history. Instant results, no dependencies beyond Python.

shix ask "docker compose"

Local AI (--local)

Sends your sanitized history to a local Ollama model for smarter, context-aware suggestions.

# First time setup
ollama pull qwen2.5:7b
ollama serve  # keep running in another terminal

# OR RUN THE OLLAMA APP

# Then use --local
shix ask "find files older than 7 days" --local

Requires the optional httpx dependency:

pip install shix[local]
# or just: pip install httpx

Options

Flag Short Description
--top N -t Number of suggestions (default: 5)
--local -l Use local Ollama model
--model NAME -m Ollama model to use (default: qwen2.5:7b)
--history N -n Limit history lines (0 = all, default: 0)
--version -v Show version

How it works

  1. Reads your shell history (~/.zsh_history, ~/.bash_history, or PowerShell history on Windows)
  2. Sanitizes secrets (API keys, passwords, tokens) before processing
  3. Matches your query against history using fuzzy search (or sends to Ollama with --local)
  4. Displays results in an interactive TUI for quick selection

Supported shells

  • zsh (macOS/Linux)
  • bash (macOS/Linux)
  • PowerShell (Windows)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shix-0.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shix-0.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file shix-0.1.0.tar.gz.

File metadata

  • Download URL: shix-0.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for shix-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d7b57940e27499a92131caeac0614a22980b0adb5c8017e4acf78e963e1bdd7f
MD5 0e4ce212ac3c27dbb772af5bbb8ced8c
BLAKE2b-256 ce9f6f01fc77556d9ac3d042c37a4404462a23b36d6ba4c77e9ce18deb2ea21d

See more details on using hashes here.

File details

Details for the file shix-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: shix-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for shix-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d13609a8352a6434ac51037d506b9296f8579584dc8129fb093eb3202c2f497
MD5 c335d9b61aa3f258076d51f2fd2f0487
BLAKE2b-256 7d7b8ad15f06519bc3bd57df3a1e9120a24b75f988bd7c2a6494b9d8cf180cb8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page