Komando
A command line utility to help you organize and easily access your commands with SQLite-based storage and optional semantic search.
Features
- 💾 SQLite Storage: Fast, reliable database for your command history
- 🔍 Smart Search: Pattern-based search (default) or semantic embeddings (optional)
- 📊 Usage Tracking: Tracks command usage for better organization
- 🔄 Auto Migration: Seamlessly migrates from legacy JSON storage
- ⚡ Interactive Selection: Navigate commands with arrow keys
Installation
Install from Crates.io
Standard Version (Pattern-Based Search)
With Semantic Embeddings (Optional)
To enable AI-powered semantic search:
# Install with embeddings feature - ONNX Runtime downloads automatically
Note: The build process will automatically download and set up ONNX Runtime (v1.23.2, ~70MB) during installation. After installation, add these environment variables to your shell RC file (~/.bashrc or ~/.zshrc):
Then source your shell configuration:
Verify the installation works by running:
Build from Source
Quick Install (Recommended)
Use the install script that builds and installs automatically:
# Standard build (fast pattern matching)
# Or with semantic embeddings (AI-powered search)
Manual Build
Standard Build
Uses fast SQL pattern matching (LIKE queries) - works on any system:
Build with Semantic Embeddings
Enables AI-powered semantic search using vector embeddings:
Requirements:
- GLIBC 2.27 or higher (Ubuntu 18.04+, Debian 10+, etc.)
- ~100MB disk space for embedding model (downloaded on first use)
- ~70MB for ONNX Runtime (auto-downloaded during build)
Setup:
# Build with embeddings feature - ONNX Runtime downloads automatically
After building, add these environment variables to your shell RC file (~/.bashrc or ~/.zshrc):
Note: The setup_embeddings.sh script is still available if you prefer manual setup or encounter issues with the automatic download.
What's the difference?
- Standard (Pattern-based): Searches for exact text matches in commands. Fast and reliable.
- Embeddings (Semantic): Understands meaning - e.g., searching "containers" finds
docker psandkubectl get podseven though "containers" doesn't appear in either command.
And don't forget to source your shell configuration:
Then verify the installation by running:
Usage
Initial Setup (Shell Integration)
For the best experience, set up the shell alias:
This will output an alias command that you can add to your shell configuration file.
Or add it automatically:
Saving a command
Run:
This will save the previous command entered in the terminal, along with the directory at which it was run.
Note: Komando automatically detects duplicate commands in the same directory and will warn you if you try to save the same command twice.
Listing all saved commands
Run:
This will display all your saved commands with their directories and unique IDs.
Searching and executing a command
Run:
Pattern-based search (default): Searches for commands containing your query text.
Semantic search (with embeddings): Understands meaning and context. Examples:
- Query
"containers"→ findsdocker ps,kubectl get pods - Query
"install packages"→ findsnpm install,pip install - Query
"version control"→ findsgit commit,git push
You will be presented with an interactive terminal where you can choose the command using the UP and DOWN arrows.
After choosing the command with ENTER, you can execute it immediately.
Note: Each time you execute a command through komando, it tracks usage statistics for potential future features.
Deleting a command
Run:
This will delete the command with the specified ID. You can find command IDs using komando --list.
Storage and Data
Komando stores your commands in an SQLite database at ~/.komando.db.
Automatic Migration: If you're upgrading from an older version that used JSON storage (~/.komando.json), Komando will automatically migrate your commands to the new database format on first run. Your old JSON file will be backed up as ~/.komando.json.bak.
Troubleshooting
Embeddings Not Working
If you get errors when using the embeddings feature:
-
Check GLIBC version:
You need GLIBC 2.27 or higher.
-
Verify ONNX Runtime setup:
These should point to your ONNX Runtime installation.
-
Check if ONNX Runtime is installed:
If not found, it should have been auto-downloaded during build. You can manually run:
-
Check library compatibility:
| | | |Should show GLIBC_2.27 or lower.
Fallback to Pattern-Based Search
If embeddings are causing issues, you can always rebuild without them:
Pattern-based search is fast and reliable for most use cases.
Development
Setting Up Development Environment
-
Clone the repository:
-
Install pre-commit hooks:
This installs git hooks that automatically run before each commit:
cargo fmt- Code formatting checkcargo clippy- Linting with warnings as errorscargo test- All unit testscargo check- Build verification
Alternative: Using pre-commit framework
Running Tests
# Run all tests (standard features)
# Run tests with all features
# Run specific test
Code Quality
# Format code
# Run linter
# Check without building
Building
# Standard build
# With embeddings
Release Process
This project uses cargo-release with a custom workflow that respects branch protection rules.
Making a Release (Automated)
Use the release script (recommended):
# Preview changes (dry-run)
# Execute release
The script will:
- ✅ Run cargo-release (runs tests, updates version, creates commit & tag)
- ✅ Create a release branch (e.g.,
release/v1.0.0-alpha.2) - ✅ Push the branch and tag to GitHub
- ✅ Show you the PR URL to create
Making a Release (Manual)
If you prefer manual control:
-
Update CHANGELOG.md: Add changes under
[Unreleased]section -
Run cargo-release:
# Preview changes # Execute release -
Create and push release branch:
VERSION= -
Create PR:
release/v{version}→master -
After PR is merged: GitHub Actions automatically builds and publishes
What Happens Automatically
When you push the tag, GitHub Actions will:
- Build binaries for Linux and macOS (x86_64 and ARM64)
- Create a GitHub Release with binaries
- Publish to crates.io
Configuration
Release behavior is configured in release.toml. The workflow is designed to work with branch protection rules - releases go through the normal PR review process.
License
This project is licensed under the MIT License.