kleen

Crates.iokleen
lib.rskleen
version0.1.0
created_at2025-12-20 05:44:28.094157+00
updated_at2025-12-20 05:44:28.094157+00
descriptionA CLI tool to clean Mac system temporary and cache files
homepagehttps://github.com/ark930/kleen
repositoryhttps://github.com/ark930/kleen
max_upload_size
id1996051
size75,372
Edwin (ark930)

documentation

README

kleen

A CLI tool to clean Mac system temporary and cache files.

Features

  • ๐Ÿ” List - View all cache/temp files and their sizes
  • ๐Ÿงน Clean - Remove cache files with optional confirmation
  • ๐Ÿ‘€ Dry Run - Preview what will be deleted without actually removing
  • ๐Ÿ“‚ Categories - Organize caches by type (system, user, dev, browser)
  • โš™๏ธ Configurable - Customize cache directories via config file

Installation

From crates.io

cargo install kleen

From source

git clone https://github.com/ark930/kleen.git
cd kleen
cargo install --path .

Usage

List cache files

# List all caches
kleen list

# List with detailed file information
kleen list --verbose

# List only specific category
kleen list --category dev

Clean cache files

# Clean all caches (with confirmation)
kleen clean

# Clean without confirmation
kleen clean --force

# Clean only specific category
kleen clean --category browser

Dry run (preview mode)

# Preview what will be deleted
kleen dry-run

# Preview specific category
kleen dry-run --category user

Show categories

kleen categories

Configuration

# Show config file path
kleen config path

# Generate default config file
kleen config init

Categories

Category Description
system System temp files (/tmp, /private/var/folders)
user User caches, logs, and Trash
dev Developer tool caches (Xcode, Cargo, npm, pip, etc.)
browser Browser caches (Chrome, Safari, Firefox, Edge)
all All categories (default)

Configuration File

The config file is located at ~/Library/Application Support/kleen/config.toml.

Run kleen config init to generate a default config file, then customize it as needed.

Example config entry:

[[dev]]
name = "Cargo Registry Cache"
path = "~/.cargo/registry/cache"
category = "dev"
description = "Rust Cargo package cache"

Supported Cache Locations

System

  • System temp files (/private/var/folders)
  • Temp directory (/tmp)

User

  • User caches (~/Library/Caches)
  • User logs (~/Library/Logs)
  • Trash (~/.Trash)

Developer Tools

  • Xcode DerivedData & Archives
  • Cargo (Rust)
  • npm / yarn / pnpm (Node.js)
  • pip (Python)
  • Gradle / Maven (Java)
  • Go modules
  • CocoaPods
  • VS Code / Cursor / JetBrains IDEs

Browsers

  • Google Chrome
  • Safari
  • Firefox
  • Microsoft Edge

License

This project is licensed under the MIT License - see the LICENSE file for details.

Commit count: 0

cargo fmt