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 shix
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
- Reads your shell history (
~/.zsh_history,~/.bash_history, or PowerShell history on Windows) - Sanitizes secrets (API keys, passwords, tokens) before processing
- Matches your query against history using fuzzy search (or sends to Ollama with
--local) - Displays results in an interactive TUI for quick selection
Supported shells
- zsh (macOS/Linux)
- bash (macOS/Linux)
- PowerShell (Windows)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shix-0.1.4.tar.gz.
File metadata
- Download URL: shix-0.1.4.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
457f9c8206471b135174ae44426df6083d0d071d2bfea7fe6a5e94476bf98b08
|
|
| MD5 |
15c7c7d4778ffcc31237ebfe465d0090
|
|
| BLAKE2b-256 |
504f835d4fac562feac2d3852b13ee5748ea7d7ddc64dd6f2fa383527629280e
|
File details
Details for the file shix-0.1.4-py3-none-any.whl.
File metadata
- Download URL: shix-0.1.4-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a05faa7f8f1828ed0f6194b50400562fdc34c5298af64b9c7d28af313eddf36
|
|
| MD5 |
b0145338a786232b9fd7af0e88dfc5c4
|
|
| BLAKE2b-256 |
179cef0a15a2e2ce98dbc14b571e1544e4bd33468d4161637a5c3c1f19e64041
|