Kessler Syndrome (noun): A theoretical scenario in which the density of objects in low Earth orbit is high enough that collisions between objects could cause a cascade, generating space debris that increases the likelihood of further collisions, rendering space exploration impossible.
For developers, your hard drive is low Earth orbit.
Over time, it gets clogged with node_modules, targets, stray build/ folders, forgotten Python virtual environments, and intermediate Rust targets. This digital space debris silently consumes hundreds of gigabytes until your system grinds to a halt.
Kessler is an intelligent, blazingly fast, and incredibly safe command-line tool built in Go that clears the orbit. It finds, calculates, and safely sweeps away runtime artifacts and build caches without ever touching your source code.
- 🏎️ Blazingly Fast: Scans massive directory trees concurrently using a high-performance Go worker pool.
- 🔍 Context-Aware Engine: Targets known safe artifacts based on project triggers (e.g.,
package.json,Cargo.toml). - 🛡️ Git Safety Net: Silently queries
git ls-filesto guarantee actively tracked files are never deleted. - 🌍 Global Cache Management: Safely cleans system-level caches (Docker, Homebrew, npm, Cargo, Go modules).
- ♻️ OS Trash Integration: Moves debris to your native OS Trash/Recycle Bin instead of a permanent
rm -rf. - 🛡️ Active Project Protection: Warns you before cleaning if a project's dev server is currently running.
- 🧪 Environmental Doctor: Identifies and cleans unused versions of toolchains (Node.js, Rust, Python, Ruby, Java, etc.).
- 🚀 Project Launchpad: A built-in navigator to fuzzy-search and instantly open projects in VS Code, Cursor, or Terminal.
- 🤖 Background Daemon: Runs silently to automatically sweep stale debris over 1GB weekly.
- 🌐 Community Rules: Dynamically updates and merges crowd-sourced cleanup rules via
kessler rules update. - 📜 Scan History: Tracks previous sweeps and total space freed to monitor your disk's health over time.
- 🤖 CI / Scripting Mode: Non-interactive
scanandcleansubcommands with JSON output, dry-run, and filtering. - 🎨 Beautiful TUI & Telemetry: An interactive Charmbracelet dashboard with 4 tabbed views and live "Orbital Telemetry".
Bring the full power of Kessler directly into your editor. Kessler for VS Code is a blazingly fast, lightweight extension that lives in your status bar, giving you real-time telemetry and one-click cleanup without ever leaving your workspace.
- 📡 Real-time Telemetry: Live debris weight tracking in your status bar.
- 🔄 Auto-Pilot: Automatically cleans build caches on Git branch switches.
- ⚡ Zero-Config: Intelligent, ecosystem-aware scanning out of the box.
| 🍺 Homebrew macOS & Linux |
brew tap hariharen9/tap
brew install kessler |
| 🪟 Scoop Windows |
scoop bucket add hariharen9 https://github.com/hariharen9/scoop-bucket
scoop install kessler |
| 📦 npm All Platforms |
npm install -g kessler-cli
# Or run directly without installing:
npx kessler-cli ~/Projects |
| 🐹 Go From Source |
go install github.com/hariharen9/kessler@latest |
| 📦 Debian / Ubuntu .deb Package |
Download the .deb from the latest release, then:sudo dpkg -i kessler_*.deb |
🕹️ Interactive TUI (Default)
Run Kessler without a subcommand to launch the interactive dashboard.
kessler ~/Projects # Scan your Projects folder
kessler . # Scan the current directoryTUI Controls:
| Key | Action |
|---|---|
↑/↓ or j/k |
Navigate |
Space |
Toggle selection |
a |
Select / deselect all |
e |
Select Ecosystem (Bulk select same project types) |
S |
Select Stale (Select projects untouched for >30 days) |
t |
Toggle Tier (Safe ↔ Deep mode in Tab 1) |
o |
Open in Editor (VS Code / Cursor in Tab 4) |
t |
Open in Terminal (Tab 4) |
i |
Toggle gitignored artifacts |
s |
Sort by Size ↔ Name |
/ |
Search projects |
p |
Toggle full Project Preview |
1 - 4 |
Switch tabs (Projects / Global / History / Launchpad) |
Tab |
Cycle through tabs |
Enter |
Move selected to Trash |
X |
Permanently delete |
q |
Quit |
🤖 CLI Subcommands
Scan and report — no deletion.
kessler scan ~/Projects # Table output
kessler scan ~/Projects --json # JSON output (pipe to jq)Scan and clean — shows a preview and asks for confirmation. Includes Active Project Protection.
kessler clean ~/Projects # Preview + confirm
kessler clean ~/Projects --deep # Deep clean
kessler clean ~/Projects --force # Skip confirmation + safety checksKessler can run silently in the background to monitor your system. It scans once a week and automatically sweeps away more than 1GB of stale debris (older than 10 days) in safe mode.
kessler daemon --start # Install and start the background daemon
kessler daemon --status # Show current schedule status
kessler daemon --stop # Uninstall the daemonFetch the latest community-provided project cleanup rules from GitHub and merge them locally.
kessler rules updateKessler is powered by a dynamic rules engine (rules.yaml). When Kessler enters a directory, it looks for Trigger Files (like package.json or Cargo.toml). By understanding context, it only targets known safe artifacts for that specific ecosystem.
Out of the box, Kessler provides support for over 30 ecosystems and global package managers—zero configuration required. Really! 😉
Beyond project directories, Kessler identifies and safely cleans massive system-level caches that silently eat your hard drive.
Need to clean up proprietary build artifacts or custom frameworks? You can extend Kessler's intelligence without modifying the source code.
Simply create a rules.yaml file in your config directory (e.g., ~/.config/kessler/rules.yaml on macOS/Linux or %APPDATA%\kessler\rules.yaml on Windows).
rules:
- name: "My Custom Framework"
triggers: ["my-framework.config"]
targets:
- path: ".custom-cache"
tier: "safe"
- path: "out_binaries"
tier: "deep"Your custom rules will automatically merge with the default rules engine and the community rules.
Kessler maintains a set of community-driven rules that are updated independently from the binary. You can fetch the latest community rules at any time:
kessler rules updateThese rules are stored in community-rules.yaml in your config directory and are automatically applied during scans.
For every detected project, it runs git ls-files --ignored --directory to discover directories your .gitignore is hiding that aren't already covered by Kessler's rules. These appear as [user ignored] artifacts.
Safety guarantees:
- ✅ Only ignored directories are surfaced — individual files (
.env, lockfiles, configs) are never shown - ✅ Trigger files (
package.json,Cargo.toml, etc.) are always excluded - ✅ Danger zone items can never appear, even if gitignored
Kessler is built with developer trust as its core tenet. We understand that your source code is your livelihood, so we've implemented multiple layers of protection:
Before Kessler touches any directory, it performs a real-time query: git ls-files <path>.
- The Guard: If Git is tracking even a single file inside a folder (e.g., you manually added a specific script to a
bin/folder), Kessler will immediately skip that folder. - Why? This prevents accidental deletion of manually tracked assets that happen to reside in common artifact locations.
Kessler scans your system's process table before performing a cleanup.
- The Guard: If it detects a running process whose working directory is inside a project you're cleaning (e.g., an active
npm start,go run, orcargo watch), it will flag the project as ACTIVE and block deletion until you provide an explicit override. - Why? Deleting artifacts while a compiler or dev server is using them can lead to corrupted builds or system hangs.
Kessler maintains a strict, non-overridable blocklist of critical system and project directories.
- The Guard: Even if a buggy community rule or custom pattern targets
.git/,/etc/,/usr/bin/, or your project's root source folders, the scanner will hard-block the operation at the engine level.
Not all artifacts are created equal. Kessler categorizes every target:
- Safe Tier (Default): 100% regeneratable junk (caches, logs, temporary objects, package manager metadata).
- Deep Tier: Re-buildable artifacts that take longer to regenerate (binaries, compiled objects, heavy
node_modules). - The Guard: Kessler defaults to Safe Mode. You must intentionally toggle "Deep Clean" or use the
--deepflag to touch binaries.
Kessler avoids the destructive finality of rm -rf.
- The Guard: All "deleted" items are moved to your native OS Trash or Recycle Bin using platform-specific APIs.
- The "Undo" Button: If you realize you cleaned something by mistake, just open your Trash and click "Put Back."
Kessler never "guesses." It only considers a folder for cleanup if it recognizes a valid Project Trigger (e.g., finding a Cargo.toml before looking for target/). It will never touch your family photos or personal documents because they don't match any known development ecosystem.
While tools like Kondo, npkill, or ecosystem-specific commands like cargo clean are great for basic cleaning, Kessler is engineered as a Safety-First, Polyglot Disk Management Dashboard.
| Feature | cargo clean | npkill | Kondo | Kessler |
|---|---|---|---|---|
| Ecosystem Support | Single (Rust) | Single (Node) | Polyglot | ✅ Polyglot (30+) |
| The Git Safety Net | ❌ No | ❌ No | ❌ No | ✅ Yes (git ls-files) |
| Active Project Protection | ❌ No | ❌ No | ❌ No | ✅ Yes (Warns on running PIDs) |
| Environmental Doctor | ❌ No | ❌ No | ❌ No | ✅ Yes (Detects unused toolchains) |
| Global Cache Cleaning | ❌ No | ❌ No | ❌ No | ✅ Yes (npm, docker, homebrew) |
| Tiered Cleaning | ❌ No | ❌ No | ❌ No | ✅ Yes (Safe vs. Deep mode) |
.gitignore Scanning |
❌ No | ❌ No | ❌ No | ✅ Yes (Finds hidden ignored dirs) |
| High-Fidelity TUI | ❌ No | ✅ Yes | ✅ Yes (Modern Bubble Tea) | |
| OS Trash Integration | ❌ No | ❌ No | ✅ Yes | ✅ Yes (+ Windows support) |
| Project Launchpad | ❌ No | ❌ No | ❌ No | ✅ Yes (Fuzzy-search & Open) |
Distributed under the MIT License. See LICENSE for more information.
Built with ❤️ by Hariharen
