| Crates.io | omniscient |
| lib.rs | omniscient |
| version | 1.1.1 |
| created_at | 2025-11-11 10:04:59.525244+00 |
| updated_at | 2026-01-07 15:51:15.202561+00 |
| description | CLI command history tracker - never forget a command again |
| homepage | https://github.com/daneb/omniscient |
| repository | https://github.com/daneb/omniscient |
| max_upload_size | |
| id | 1926946 |
| size | 148,209 |
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
# Clone the repository
git clone https://github.com/daneb/omniscient.git
cd omniscient
# Build and install
cargo install --path .
# Verify installation
omniscient --version
cargo install omniscient
# Initialize shell integration
omniscient init
# Add the output to your ~/.zshrc
omniscient init >> ~/.zshrc
# Reload your shell
source ~/.zshrc
Note: 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 # macOS
That'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 stats
Omniscient'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 push
Omniscient automatically redacts sensitive patterns. Configure in ~/.omniscient/config.toml:
[privacy]
redact_patterns = ["password", "token", "secret", "api_key"]
enabled = true
Omniscient uses Zsh hooks to capture commands:
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:
~/.omniscient/)See SPECIFICATION.md for detailed feature planning.
Contributions welcome! Please read our contributing guidelines first.
# 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.sh
The script will:
~/.zshrc~/.cargo/bin/omniscient# 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 ~/.zshrc
Note: 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
Star ⭐ this repo if you find it useful!