Skip to content

Latest commit

 

History

60 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CleanerX — Clean storage. Clear mind. Better code.

CleanerX

Review and safely clean private local data left by coding agents.

Product CI Apache-2.0 license

CleanerX is a local-only desktop application for inspecting and cleaning storage created by Codex, Claude Code, OpenCode, and pi. It presents a metadata-first inventory, expands the exact cleanup scope for review, and fails closed when an Agent capability, storage schema, path, or writer state cannot be verified.

CleanerX does not upload data, collect telemetry, synchronize with cloud services, or run in the background. A project path is grouping metadata only: CleanerX never recursively scans or modifies a source directory. The only built-in network action is an explicit application-update check against CleanerX's GitHub Releases feed.

Caution

CleanerX permanently deletes private local data. The repository is an engineering preview and does not yet provide a promoted binary release; current builds are unsigned. Nothing is selected automatically. Review every cleanup plan; if backup is unavailable or left off, deletion is irreversible.

Why CleanerX

Coding agents can retain session histories, generated media, memories, logs, caches, and temporary files across many projects. Those data classes do not share one safe deletion rule: some have an official API, some use documented files, and some must remain read-only.

CleanerX gives them one review workflow without flattening those differences:

  • inventory first, without retaining content bodies beyond one bounded pi display-title excerpt;
  • group sessions by project while keeping source trees outside the cleanup boundary;
  • block active, pinned, loaded, protected, or otherwise unsafe items;
  • show descendants and dependent artifacts before confirmation;
  • use an official Agent mutation route where one exists;
  • offer encrypted backup only when a verified restore route exists; and
  • rescan after cleanup or recovery instead of trusting journal state alone.

CleanerX is not a general disk cleaner, app uninstaller, project cleaner, or cloud-account deletion tool.

Supported scope

Support is capability-gated at runtime. A listed Agent or platform does not guarantee that every installed version or data category is writable; unsupported and unrecognized operations remain visible where safe and degrade to read-only behavior.

Agent Inventory Mutation route Backup and restore
Codex Sessions and descendants, memory, media, logs, caches, temporary data App Server for session deletion and independently probed memory reset; guarded fixed-root routes for qualified local data Not available for session or memory deletion because Codex exposes no supported import route
Claude Code Sessions, project auto memory, history, caches, temporary data Documented application-data paths with fixed-root validation and writer blocking Encrypted backup for qualified restorable paths
OpenCode Sessions and descendants, logs, cache Official CLI while offline; verified loopback Server API for idle sessions while running Official export/import for offline session backup and restore
pi Sessions and fork lineage, provider catalog cache Documented per-session file removal with fixed-root validation and writer blocking Encrypted backup and restore for sessions

The detailed routes, gates, limitations, and automated evidence live in the mutation compatibility matrix.

Platform Current boundary Build output
macOS 13+ Apple Silicon and Intel Unsigned .app and DMG
Linux x86_64 WebKitGTK 4.1 desktop environment; CI uses Ubuntu 22.04 Unsigned .deb and AppImage
Windows 10/11 x86_64 WebView2 Runtime; MSVC C runtime is statically linked Unsigned MSI and NSIS installers

There is no promoted binary release yet. The release workflow can produce explicitly unsigned artifacts from a reviewed v* tag; see the release policy for the gates that separate source availability from supported cleanup builds.

Application updates

CleanerX uses Tauri's official updater with a static latest.json feed on GitHub Releases. It never checks in the background: open Settings → Application updates and choose Check for updates. A discovered update is shown with its version and release notes, and installation starts only after a second explicit click.

Updater artifacts are signed separately from operating-system code signing. CleanerX embeds the updater public key and refuses an artifact whose signature does not match; release automation reads the private key from the TAURI_SIGNING_PRIVATE_KEY GitHub Actions secret. This verifies continuity with the installed CleanerX build, but it does not make the still-unsigned application Apple-notarized or establish a Microsoft publisher identity.

In-app installation supports macOS bundles, Windows NSIS installations, and Linux AppImage. Linux .deb installations must continue through their original distribution channel or a manual GitHub Release download because Tauri's static feed has only one entry per OS/architecture and cannot safely select between .deb and AppImage. See the update strategy for the researched alternatives and release design.

Safety model

CleanerX treats deletion as a security boundary:

Boundary Guarantee
Projects and source Project paths only organize Agent records. They are never recursive scan or cleanup roots.
Protected data Authentication, configuration, MCP credentials, rules, skills, plugins, browser accounts, cookies, and source code are never cleanup targets.
Paths Direct operations must remain beneath category-specific fixed roots. Traversal, links or redirects, ownership anomalies, mount/volume changes, protected descendants, and file identity changes are rejected.
Agent state Active writers are explained and blocked. CleanerX never force-quits an Agent.
Official state Codex and OpenCode session state is mutated only through supported public routes. CleanerX never repairs or deletes sessions through private SQLite writes.
Backup Backup is optional and off by default. When selected, the encrypted archive is atomically committed, reopened, and hash-verified before mutation begins.
Restore Every destination and manifest hash is preflighted before the first move. Restore never overwrites an existing ID or path and is all-or-nothing.
Recovery A journal records mutation boundaries, but startup recovery always rescans the owning Agent before deciding whether an operation completed.
Privacy No telemetry, crash upload, cloud sync, background daemon, or unrestricted shell/filesystem API is included. Update checks run only when the user clicks Check for updates and send no private Agent data.

Backups use tar + zstd and age X25519 encryption. The private identity stays in macOS Keychain, Linux Secret Service, or Windows Credential Manager. If the native credential store is unavailable, backup creation fails before cleanup begins.

For the normative threat model and private reporting process, read SECURITY.md.

Build from source

Prerequisites

  • Rust 1.88 or later
  • Node.js 22 or later; CI uses Node.js 24
  • pnpm 11.3.0 or later
  • platform build tools: Xcode Command Line Tools on macOS, WebKitGTK/Tauri packages on Linux, or Microsoft C++ Build Tools plus WebView2 on Windows
  • a supported local Agent installation or recognized data root for the inventory you want to inspect

On macOS, install the command-line tools if needed:

xcode-select --install

On Debian or Ubuntu, install the native dependencies:

sudo apt update
sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file \
  libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev patchelf

Encrypted backup on Linux also needs a desktop Secret Service provider such as GNOME Keyring or KDE Wallet.

Run the development app

make setup
make dev

Run the complete validation gate before submitting a change:

make check

Build a native package

Command Host and result
make app macOS: unsigned .app
make bundles macOS: unsigned .app and DMG
make linux Linux x86_64: unsigned .deb and AppImage
make windows Windows x86_64 Developer PowerShell: unsigned MSI and NSIS installers

Use TARGET=<rust-target-triple> with bundle commands when selecting an explicit architecture. Native packages are written beneath target/release/bundle/.

Unsigned builds may trigger Gatekeeper or SmartScreen. Verify that the binary came from the expected commit before approving it. Do not disable platform protections globally or trust a checksum as proof of publisher identity.

Use CleanerX

  1. Launch CleanerX, select a detected Agent, and scan.
  2. Inspect the overview, sessions, media, memory, logs, caches, and temporary data available for that Agent.
  3. Select individual eligible items or use selection within the current visible scope. Nothing is selected by default.
  4. Review the expanded cleanup plan, including descendants, dependent artifacts, and blockers.
  5. Choose whether to create an encrypted backup when the complete plan has a supported restore route. Backup is off by default.
  6. Confirm cleanup. CleanerX executes the qualified route and rescans to verify the result.

Custom Agent data roots must be absolute and are saved in Settings. The defaults are:

Agent Resolution order
Codex Settings override → CODEX_HOME~/.codex
Claude Code Settings override → CLAUDE_CONFIG_DIR~/.claude
OpenCode Settings override → XDG_DATA_HOME/opencode~/.local/share/opencode
pi Settings override → PI_CODING_AGENT_DIR~/.pi/agent

On Windows, ~ means %USERPROFILE%.

When an operation is read-only

Read-only mode is a safety result, not a partial deletion attempt. CleanerX shows the specific missing capability, unrecognized schema, unsafe path, or active-writer blocker.

  1. Read the reason in CleanerX and use Retry connection after resolving it.
  2. Let the affected Agent finish writing, then close it normally; CleanerX will not force-quit it.
  3. Confirm the Agent executable and configured data root. For Codex CLI installations, codex --version and codex app-server --help should succeed.
  4. Upgrade the Agent if the installed version lacks the required public route, then rescan.

CleanerX will not turn an unsupported operation into a private database write or an unrestricted file deletion.

Architecture

Path Responsibility
crates/cleanerx-core Domain types, cleanup planning, path validation, backup/restore, hashing, and transaction invariants
crates/adapter-codex Codex discovery, App Server transport and capability probing, storage classification, and read-only fallbacks
crates/adapter-claude Claude Code discovery, documented storage classification, bounded previews, and guarded path cleanup
crates/adapter-opencode OpenCode discovery, recognized-SQLite read-only inventory, and official CLI/Server mutation routes
crates/adapter-pi pi discovery, documented session inventory and deletion, fork lineage, and protected-path classification
src-tauri Narrow Tauri command boundary and cleanup transaction orchestration
src React/TypeScript presentation and interaction

Future Agents implement the compile-time AgentAdapter trait. CleanerX does not load a dynamic cleanup-plugin ABI or expose general shell and filesystem access to the webview.

CleanerX follows the public Codex App Server protocol for session operations and validates Windows behavior against the documented Codex Windows execution model. Runtime capabilities are negotiated because Agents evolve independently of CleanerX.

Documentation

Start with the documentation index. The main references are:

Contributing and support

Contributions are welcome. Read CONTRIBUTING.md and the repository-wide AGENTS.md constraints before starting. Public issues must contain sanitized metadata only; possible protected-data mutation, path escape, credential exposure, or backup/restore compromise belongs in a private security advisory.

Related projects and scope

CleanerX benefits from the documentation and interaction patterns established by mature local cleanup tools such as BleachBit, Czkawka/Krokiet, Pearcleaner, and Bulk Crap Uninstaller. Those projects serve broader disk, duplicate-file, application, or package-cleanup use cases. CleanerX does not reuse their cleaner definitions and deliberately stays limited to recognized coding-agent storage.

License

Copyright © 2026 BeaCox. Licensed under the Apache License 2.0.

About

A local-only desktop app to review and safely clean storage created by Codex, Claude Code, OpenCode, and pi.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages