DevSweep Engine · Rule Schema v1.2

Clean your AI developer tools
just like an otter grooms its fur

Precision health inspection and cleanup tool for next-gen AI coding assistants and Agent CLIs.

v1.0.0 · 25 Curated Rules · Four-Tier Safety Matrix · MIT License

Sea-Otter Banner

Interactive CLI Preview

Use arrow keys or click tabs to inspect Sea-Otter modes. Protected paths are locked automatically, and cleanup defaults to read-only dry-run or atomic quarantine.

sea-otter — scan
$ sea-otter scan

Why Sea-Otter?

Traditional Mac cleaners rely on an App Bundle-centric heuristic under ~/Library, which breaks down against Claude Code, Codex, Cherry Studio, Cursor, Ollama, and modern Agent CLIs.

Hidden Dotfile Blindspots

Databases, caches, and configs are scattered across hidden home directories like ~/.claude, ~/.codex, ~/.gemini, and ~/.ollama.

Silent On-Device AI Models & Vectors

Browsers silently pull 4.0 GB Gemini Nano (OptGuideOnDeviceModel), while Electron AI clients accumulate gigabytes of attachments and IndexedDB vector embeddings.

Root-Level Ghost Bugs & Channel Islands

Cross-platform bugs drop (null), default.store, .ACCC_Lock, or empty skeleton trees into ~/Library/Application Support/ while stale preview channels linger.

Orphan Residuals & Plaintext Secrets

After uninstalling an app, SQLite histories, OAuth Refresh Tokens, and API keys remain exposed without sensitivity tagging or safe rollback.

Accidental Workspace Damage

AI agents often create .git repositories or workspaces under user folders; conventional cleaners lack repository immunity guardrails.

Key Capabilities

Powered by v1.2 Architecture for on-device models, fine-grained slimming, root penetration, and lossless rollback.

On-Device AI Model Engine

Detects .gguf, .safetensors, .onnx, .bin, .pt, .pth, magic headers, and Chrome Gemini Nano to prune weights without touching user profiles.

--models · AIModelScanner

Fine-Grained Slimming Mode

Recursively expands sub_targets and prunable markers to trim attachments and vector indices while protecting core SQLite databases.

--slim · Data/Files · IndexedDB

Root Orphan & Ghost Scanner

Scans root entries directly to catch (null) bug directories, legacy unpacked assets, misplaced CoreData files, dead locks, and < 64KB skeleton dirs.

--ghosts · RootOrphanScanner

Multi-Channel Redundancy

Links Chrome, Edge, and VS Code channel families; flags Canary/Dev/Beta/Insiders channels inactive for > 90 days while Stable is actively used.

--channels · ChannelRedundancyScanner

3-Tier Reverse Association

Resolves decoupled app/folder names via Info.plist / Bundle ID lookup, curated signature DB (Code → VS Code), and 180-day idle heuristics.

--associations · AssociationEngine

Deep Secret Leak Auditing

Audits JSON, YAML, .env, PEM private keys, and read-only SQLite DBs for plaintext tokens and API keys without ever echoing raw values.

--secrets · SecretLeakAuditor

Native Agentic MCP Server

Zero-dependency MCP stdio server exposing sea_otter_scan, sea_otter_clean (confirmation guarded), and sea_otter_rollback.

sea-otter-mcp · stdio

Atomic Quarantine & Rollback

Archives cleaned items into ~/.Trash/AppSupport_Cleanup_<timestamp>/ with manifest.json (v1.2.0) for one-command restoration.

sea-otter rollback · ~/.Trash

Four-Tier Safety Risk Matrix

For modern developers and AI storage governance, safety precedes everything.

Tier Definition Typical Targets Selection & Cleanup Strategy
L1 · Zero-Impact Junk Pure junk files, dead locks, cross-platform bug dirs, pure caches (null) ghost dir, default.store, .ACCC_Lock, skeleton dirs, browser caches Selected by default, archived safely
L2 · Orphaned Apps Residual data from uninstalled apps or uninstalled stale channels Abandoned Codex, Cursor, uninstalled Chrome Beta channel data Selected by default, isolated to quarantine
L3 · In-Use Bloatware Active apps with bloated weights, attachments, or caches Chrome on-device LLMs (4 GB), Cherry Studio attachments/vectors, active caches Unselected by default, requires explicit flag
L4 · Protected System macOS critical databases, code workspaces, active processes com.apple.TCC, AddressBook, CloudDocs, .git repos, running daemons Hardcoded block, strictly forbidden to delete

System Redline Vault

Strictly blocks com.apple.TCC, AddressBook, CallHistoryDB, CloudDocs, Keychain, com.apple.sharedfilelist, Safari, Mail, and Photos.

Process & Lock Guard

Cross-references system process tables, background daemons, and SingletonLock files so running tools remain locked and protected.

Workspace Immunity

Probes paths for .git, .svn, .hg, and .obsidian, and enforces exclude_paths to guarantee zero source-code loss.

Quarantine & Secret Audit

Archives targets with manifest.json for lossless rollback; plaintext OAuth tokens and private keys are skipped unless explicitly authorized.

Installation & CLI Usage

Install directly via GitHub, clone in developer mode, or run directly from source without installing.

# Install to current user environment via pip
pip install --user git+https://github.com/yourwayai/sea-otter.git

# Or install in an isolated environment via pipx
pipx install git+https://github.com/yourwayai/sea-otter.git

Note: Please make sure ~/.local/bin is included in your system PATH.

CLI Inspection & Cleanup

# Health Inspection
sea-otter scan
sea-otter scan cursor codex google-chrome
sea-otter scan --models
sea-otter scan --slim
sea-otter scan --ghosts
sea-otter scan --channels
sea-otter scan --associations
sea-otter scan --secrets
sea-otter scan --json

# Dry-run Preview & Safe Cleanup
sea-otter clean --dry-run
sea-otter clean cherry-studio --slim --dry-run
sea-otter clean --models --dry-run
sea-otter clean --ghosts --dry-run
sea-otter clean --channels --dry-run
sea-otter clean --associations --dry-run

Rollback, Validation & MCP Server

# Atomic Quarantine & Lossless Rollback
sea-otter rollback --list
sea-otter rollback --dry-run
sea-otter rollback

# Rules Validation & Project Info
sea-otter rules list
sea-otter rules validate
sea-otter about
MCP Client Config (Antigravity / Claude Code / Cursor)
{
  "mcpServers": {
    "sea-otter": {
      "command": "sea-otter-mcp"
    }
  }
}