Skip to content

ark930/kleen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages