Never forget a command again. Your complete CLI history, categorized and searchable.
Omniscient is a cross-platform command history tracker that captures every command you run, categorizes them intelligently, and makes them instantly searchable. Survive machine migrations, access your command library anywhere, and boost your CLI productivity.
📚 Complete Documentation | 📖 Full Index | 🤝 Contributing
- 🚀 Zero Overhead: < 10ms command capture, won't slow you down
- 📊 Smart Categorization: Automatic categorization by command type
- 🔍 Fast Search: Find any command in milliseconds, even with 100k+ history
- 🔒 Privacy First: Automatic redaction of sensitive data
- 💾 Portable: Export/import your history, sync via Git
- 📈 Usage Analytics: Track your most-used commands
- 🎯 Simple: Single binary, minimal configuration
- 🐚 Multi-Shell: Supports Zsh and Bash (Fish coming soon)
# Clone the repository
git clone https://github.com/daneb/omniscient.git
cd omniscient
# Build and install
cargo install --path .
# Verify installation
omniscient --versioncargo install omniscient# Initialize shell integration
omniscient init
# Add the output to your ~/.zshrc
omniscient init >> ~/.zshrc
# Reload your shell
source ~/.zshrcNote: Bash requires the bash-preexec library.
# 1. Install bash-preexec
curl -sSL https://github.com/rcaloras/bash-preexec/raw/master/bash-preexec.sh -o ~/.bash-preexec.sh
# 2. Source bash-preexec in your profile
# For Linux (~/.bashrc):
echo 'source ~/.bash-preexec.sh' >> ~/.bashrc
# For macOS (~/.bash_profile):
echo 'source ~/.bash-preexec.sh' >> ~/.bash_profile
# 3. Add Omniscient hook
# For Linux:
omniscient init --shell bash >> ~/.bashrc
# For macOS:
omniscient init --shell bash >> ~/.bash_profile
# 4. Reload your shell
source ~/.bashrc # Linux
source ~/.bash_profile # macOSThat's it! Omniscient is now tracking your commands.
# Search your command history
omniscient search "git commit"
# Show recent commands
omniscient recent 20
# Most frequently used commands
omniscient top 10
# Filter by category
omniscient category git
# View statistics
omniscient statsOmniscient's search handles special characters seamlessly:
# Search for IP addresses
omniscient search "10.104.113.39"
# Search for URLs
omniscient search "https://api.github.com"
omniscient search "api.github.com"
# Search for file paths with dots
omniscient search "./config/settings.yaml"
omniscient search "../parent/file.txt"
# Search for email addresses
omniscient search "user@domain.com"
# Search for version numbers
omniscient search "v1.2.3"
# Search works with or without quotes
omniscient search 192.168.1.1
omniscient search "192.168.1.1"Note: All searches use exact phrase matching, so searching for git commit will find commands containing that exact phrase, not commands with "git" OR "commit" separately.
# Export your history
omniscient export history.json
# Import on a new machine
omniscient import history.json
# Sync via Git (recommended workflow)
omniscient export ~/.omniscient-backup/history.json
cd ~/.omniscient-backup
git add history.json
git commit -m "Update command history"
git pushOmniscient automatically redacts sensitive patterns. Configure in ~/.omniscient/config.toml:
[privacy]
redact_patterns = ["password", "token", "secret", "api_key"]
enabled = trueOmniscient uses Zsh hooks to capture commands:
- preexec: Starts a timer when you press Enter
- Command executes: Your shell runs the command normally
- precmd: Captures command, exit code, and duration
- Storage: Saves to local SQLite database with categorization
Zero impact on your workflow, all happens in the background.
$ omniscient search "docker"
[2025-11-10 14:32:45] [✓] docker ps -a (git/123)
[2025-11-10 12:15:30] [✗] docker build -t myapp . (docker/45)
[2025-11-09 16:45:12] [✓] docker-compose up -d (docker/89)
[2025-11-09 10:22:01] [✓] docker logs -f container_name (docker/12)
$ omniscient top 5
1. git status (1,234 uses)
2. ls -la (892 uses)
3. cd .. (654 uses)
4. git commit -m (432 uses)
5. cargo build (301 uses)
Configuration file: ~/.omniscient/config.toml
[storage]
type = "sqlite"
path = "~/.omniscient/history.db"
[privacy]
redact_patterns = ["password", "token", "secret"]
enabled = true
[capture]
min_duration_ms = 0
max_history_size = 100000~/.omniscient/
├── history.db # SQLite database with your commands
└── config.toml # Configuration file
Tested with 1,000+ commands:
- Command capture: ~5ms (background, non-blocking)
- Search queries: < 500ms
- Stats calculation: < 500ms
- Memory usage: < 50MB
- Binary size: 5.2MB
- All data stored locally (
~/.omniscient/) - File permissions: 600 (owner read/write only)
- Automatic redaction of sensitive patterns
- No telemetry, no cloud sync (unless you choose Git)
- ✅ Zsh integration
- ✅ SQLite storage
- ✅ Command categorization
- ✅ Search and retrieval
- ✅ Export/import
- Bash, Fish, PowerShell support
- Multi-line command handling
- Command execution with safety checks
- Web UI for history browsing
- AI-powered command suggestions
See SPECIFICATION.md for detailed feature planning.
Contributions welcome! Please read our contributing guidelines first.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
# Clone the repository
git clone https://github.com/daneb/omniscient.git
cd omniscient
# Build
cargo build
# Run tests
cargo test
# Install locally
cargo install --path .If you need to uninstall Omniscient:
# Download and run the uninstall script
curl -sSL https://raw.githubusercontent.com/daneb/omniscient/master/uninstall.sh | bash
# Or if you have the repository cloned
./uninstall.shThe script will:
- Remove shell hooks from your
~/.zshrc - Remove the binary from
~/.cargo/bin/omniscient - Optionally delete your command history data
- Create backups before deletion
# 1. Remove shell hooks
# Edit ~/.zshrc and remove the "# Omniscient" section
vim ~/.zshrc
# 2. Remove the binary
cargo uninstall omniscient
# or manually
rm ~/.cargo/bin/omniscient
# 3. (Optional) Remove data directory
rm -rf ~/.omniscient
# 4. Reload shell
source ~/.zshrcNote: The uninstaller creates backups before deletion. Your data will be backed up to ~/omniscient_backup_* before removal.
MIT License - see LICENSE for details.
Q: Does this slow down my shell?
A: No. Capture happens asynchronously after command execution with < 10ms overhead.
Q: What about sensitive data in commands?
A: Automatic redaction of common patterns (passwords, tokens, etc.). Configurable.
Q: Can I use this across multiple machines?
A: Yes! Export your history to JSON and sync via Git or any file sync tool.
Q: Does it capture command output?
A: No, only the command itself and metadata (exit code, duration, etc.). Keeps storage lean.
Q: What if I delete my machine?
A: Export regularly and keep the JSON in version control. Import on your new machine.
Q: Is my data sent anywhere?
A: Never. Everything is local unless you explicitly export and sync via Git.
Built with Rust 🦀 for performance and reliability.
Inspired by the need to never lose a useful command again.
Version: 1.0.0 Status: ✅ Production Ready Maintained: Yes Test Coverage: 85% (75 tests passing) Code Quality: Zero warnings, all clippy lints passed
- ✅ Command capture with automatic categorization
- ✅ Full-text search with FTS5
- ✅ Export/Import with multiple merge strategies
- ✅ Statistics and analytics
- ✅ Privacy-first redaction
- ✅ Zsh shell integration
- ✅ Comprehensive test suite
Star ⭐ this repo if you find it useful!