Drift CLI¶
A terminal-native, safety-first AI assistant that integrates directly into your shell.
Powered by local LLMs via Ollama โ no cloud dependency, full privacy.
Running `drift` with no arguments now opens a rich help dashboard with grouped commands, slash action panels, and flag summaries.
What is Drift?¶
Drift turns plain English into safe, executable shell commands. Just describe what you want, no fancy syntax needed:
$ drift find all python files modified in the last 7 days
โญโ Plan โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Summary: Find recently modified Python files โ
โ Risk: ๐ข LOW โ
โ โ
โ $ find . -type f -name '*.py' -mtime -7 โ
โ โ Search for .py files modified within 7 days โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Execute? [y/N]:
Then Drift:
- Queries a local LLM (via Ollama โ no cloud, no API keys)
- Generates a structured execution plan with risk assessment
- Shows a dry-run preview with color-coded risk badges
- Asks for confirmation before executing anything
- Takes a file snapshot so you can
drift undoif needed
Safety First¶
Every command goes through a three-layer safety pipeline before it can run:
| Layer | What It Does |
|---|---|
| Blocklist | 60+ regex patterns block dangerous commands (rm -rf /, fork bombs, disk wipes) |
| Risk Scoring | Commands get a LOW / MEDIUM / HIGH risk badge |
| Confirmation | You always review and confirm before execution |
Plus: snapshot-based undo for every file-modifying operation.
Quick Start¶
# Install
git clone https://github.com/a-elhaag/drift-cli.git
cd drift-cli
pip install -e .
# Make sure Ollama is running
ollama pull qwen2.5-coder:1.5b
# Just use natural language queries:
drift what is the time now
drift compress all logs older than 7 days
drift explain tar -czf archive.tar.gz src/
drift doctor
Key Features¶
Natural Language โ Shell
Just describe what you want in plain Englishโno syntax needed. Drift generates the right command.
drift compress all logs older than 7 days
drift what is the time now
drift show me all python files on my laptop
Safety Engine
Blocklist, risk scoring, dry-run previews, and mandatory confirmation for dangerous ops.
Undo System
Every file-modifying command creates a snapshot. Roll back anytime with drift undo.
Memory System
Learns tool preferences, shows usage stats, and surfaces insights via drift memory show, drift memory stats, and drift memory insights.
Slash Commands
/git, /commit, /status, /clean, /lint, /tips, and more โ all captured in Slash commands.
Local-First & Private
Runs entirely on your machine via Ollama. Your data never leaves your computer.
๐งฐ System & personalization¶
Use Drift's management commands to keep your environment healthy and your preferences portable.
drift doctorverifies Ollama, pulls the defaultqwen2.5-coder:1.5bmodel if missing, and reports~/.driftstatus.drift configinteractively edits model settings, toggles auto-install/start/pull, and changes snapshot or idle behavior.drift setup,drift update, anddrift uninstallreboot the wizard, self-update the git clone + pip install, or tear down Drift/Ollama entirely.drift memory export/importmoves personalization between machines,drift memory projectslists per-project data, anddrift memory reset/insightskeep you in control.
Read the Command reference and Slash commands for the full CLI surface.
Built with GitHub Copilot¶
Drift CLI was built entirely with GitHub Copilot as a development partner โ from architecture design to security hardening. Read the full story