|
1 | | -# Bleach (Bash Edition) |
2 | | - |
3 | | -Bleach is a powerful, interactive terminal utility designed to keep your Linux system clean, fast, and private. Rewritten entirely in **Bash** for maximum portability and control, it uses [gum](https://github.com/charmbracelet/gum) to provide a modern, easy-to-use interface. |
4 | | - |
5 | | -## ✨ Features |
6 | | - |
7 | | -- **Interactive TUI**: Navigate easy menus to select exactly what you want to clean. |
8 | | -- **Deep Clean & Storage Recovery**: |
9 | | - - **System**: APT (autoremove/clean), Docker (prune), Logs (vacuum), Temp files (`/tmp`), Trash. |
10 | | - - **Dev**: Node (`npm`, `pnpm`, `yarn`), Python (deep `__pycache__` scan), Build Artifacts (`dist`, `build`). |
11 | | - - **IDE**: Clear caches for VS Code and JetBrains IDEs. |
12 | | - - **Privacy**: Clear user thumbnail caches. |
13 | | -- **System Maintenance**: |
14 | | - - **SSD Trim**: Optimize SSD performance via `fstrim`. |
15 | | - - **Storage Reporting**: Tracks and reports exactly how much disk space was reclaimed after every session. |
16 | | -- **Auto-Updates**: |
17 | | - - **Self-Update**: Built-in weekly check for new versions. |
18 | | - - **APT Hook**: Optional integration to check for Bleach updates whenever you run `sudo apt update`. |
19 | | -- **Logging**: Detailed logs of every action kept in `~/.local/share/bleach/logs`. |
| 1 | +# Bleach (Go Version) |
20 | 2 |
|
21 | | -## 🚀 Installation |
22 | | - |
23 | | -### One-Line Installer |
24 | | -This will install Bleach to `/opt/bleach`, create a symlink at `/usr/local/bin/bleach`, and install the `gum` dependency automatically. |
25 | | - |
26 | | -```bash |
27 | | -curl -fsSL https://raw.githubusercontent.com/maruf-pfc/bleach/main/install.sh | sudo bash |
28 | | -``` |
| 3 | +A lightning-fast, terminal-based system cleaner and dashboard for Linux, rewritten in **Go** using the **Bubble Tea** framework. |
29 | 4 |
|
30 | | -*(Note: If you are running from a local clone, just run `sudo ./install.sh`)* |
| 5 | + |
| 6 | + |
31 | 7 |
|
32 | | -### Prerequisites |
33 | | -Bleach uses **[gum](https://github.com/charmbracelet/gum)** for its UI. The installer handles this for you on Debian/Ubuntu systems. |
| 8 | +## Features |
34 | 9 |
|
35 | | -## 🛠 Usage |
| 10 | +- **Unified Dashboard**: Real-time "Command Center" view with live CPU, RAM, and Disk usage bars. |
| 11 | +- **System Operations**: |
| 12 | + - **Cleanup**: One-click `apt clean`, `autoremove`, and log rotation. |
| 13 | + - **Updates**: streamlining `apt update && upgrade`. |
| 14 | + - **Maintenance**: Automated system maintenance tasks. |
| 15 | +- **Responsive TUI**: Adapts layout automatically (Side-by-side or Stacked) based on terminal window size. |
| 16 | +- **Safe & Transparent**: Executes standard Linux commands (`sudo apt ...`) and streams output directly to you. |
36 | 17 |
|
37 | | -Run the tool anytime from your terminal: |
| 18 | +## 🚀 Installation |
38 | 19 |
|
| 20 | +### From Source (Recommended) |
| 21 | + |
| 22 | +Requires [Go 1.23+](https://go.dev/dl/) installed. |
| 23 | + |
| 24 | +1. Clone the repository: |
| 25 | + ```bash |
| 26 | + git clone https://github.com/maruf-pfc/bleach.git |
| 27 | + cd bleach |
| 28 | + ``` |
| 29 | +2. Build the binary: |
| 30 | + ```bash |
| 31 | + go build ./cmd/bleach |
| 32 | + ``` |
| 33 | +3. Run: |
| 34 | + ```bash |
| 35 | + ./bleach |
| 36 | + ``` |
| 37 | + |
| 38 | +### Optional: Install Globally |
39 | 39 | ```bash |
40 | | -bleach |
| 40 | +sudo mv bleach /usr/local/bin/ |
41 | 41 | ``` |
42 | 42 |
|
43 | | -### Modes |
44 | | -- **System Cleanup**: Quick access to disk space recovery tools. |
45 | | -- **System Updates**: Centralized update management for APT, Flatpak, and Snap. |
46 | | -- **Maintenance**: Utilities for long-term health (SSD Trim, etc.). |
47 | | -- **View Logs**: Read what Bleach has done recently. |
| 43 | +## 🎮 Usage |
48 | 44 |
|
49 | | -### Auto-Update |
50 | | -Bleach checks for updates weekly. You can also manually trigger a check: |
| 45 | +Launch Bleach from your terminal: |
51 | 46 | ```bash |
52 | | -bleach --check-update |
| 47 | +./bleach |
53 | 48 | ``` |
54 | 49 |
|
55 | | -## 🤝 Contributing |
56 | | - |
57 | | -We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to add new modules or improve existing ones. |
58 | | - |
59 | | -## 📜 License |
60 | | - |
61 | | -MIT License. See [LICENSE](LICENSE) for details. |
| 50 | +### Interface |
| 51 | +- **Dashboard (Top)**: Shows your System Info (Hostname, Kernel) and Live Resource Usage. |
| 52 | +- **Menu (Bottom Left)**: Navigate using partially `Up` / `Down` arrows. |
| 53 | +- **Output (Bottom Right)**: Displays real-time logs of actions performed. |
| 54 | + |
| 55 | +### Controls |
| 56 | +| Key | Action | |
| 57 | +| :--- | :--- | |
| 58 | +| `↑` / `↓` / `k` / `j` | Navigate Menu | |
| 59 | +| `Enter` | Select Action | |
| 60 | +| `q` / `Ctrl+C` | Quit | |
| 61 | + |
| 62 | +## 🛠 Tech Stack |
| 63 | +- **Language**: Go (Golang) |
| 64 | +- **Framework**: [Bubble Tea](https://github.com/charmbracelet/bubbletea) (The Elm Architecture for TUI) |
| 65 | +- **Styling**: [Lip Gloss](https://github.com/charmbracelet/lipgloss) |
| 66 | +- **System Stats**: [gopsutil](https://github.com/shirou/gopsutil) |
| 67 | + |
| 68 | +## License |
| 69 | +MIT License. Use at your own risk. |
0 commit comments