Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
name: Shellcheck
name: Go Build

on:
push:
branches: [ "main", "dev" ]
branches: [ "main" ]
pull_request:
branches: [ "main", "dev" ]
branches: [ "main" ]

jobs:
shellcheck:
name: Shellcheck
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
scandir: './src'
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'

- name: Build
run: go build -v ./cmd/bleach

- name: Test
run: go test -v ./internal/...
- name: Check Main Script
uses: ludeeus/action-shellcheck@master
with:
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,10 @@ cython_debug/
*.swp
*.swo

linutil
linutil
# Go
bleach
*.exe
*.test
*.out
go.work
104 changes: 56 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,69 @@
# Bleach (Bash Edition)

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.

## ✨ Features

- **Interactive TUI**: Navigate easy menus to select exactly what you want to clean.
- **Deep Clean & Storage Recovery**:
- **System**: APT (autoremove/clean), Docker (prune), Logs (vacuum), Temp files (`/tmp`), Trash.
- **Dev**: Node (`npm`, `pnpm`, `yarn`), Python (deep `__pycache__` scan), Build Artifacts (`dist`, `build`).
- **IDE**: Clear caches for VS Code and JetBrains IDEs.
- **Privacy**: Clear user thumbnail caches.
- **System Maintenance**:
- **SSD Trim**: Optimize SSD performance via `fstrim`.
- **Storage Reporting**: Tracks and reports exactly how much disk space was reclaimed after every session.
- **Auto-Updates**:
- **Self-Update**: Built-in weekly check for new versions.
- **APT Hook**: Optional integration to check for Bleach updates whenever you run `sudo apt update`.
- **Logging**: Detailed logs of every action kept in `~/.local/share/bleach/logs`.
# Bleach (Go Version)

## 🚀 Installation

### One-Line Installer
This will install Bleach to `/opt/bleach`, create a symlink at `/usr/local/bin/bleach`, and install the `gum` dependency automatically.

```bash
curl -fsSL https://raw.githubusercontent.com/maruf-pfc/bleach/main/install.sh | sudo bash
```
A lightning-fast, terminal-based system cleaner and dashboard for Linux, rewritten in **Go** using the **Bubble Tea** framework.

*(Note: If you are running from a local clone, just run `sudo ./install.sh`)*
![License](https://img.shields.io/badge/license-MIT-blue.svg)
![Go](https://img.shields.io/badge/go-1.23+-00ADD8.svg?logo=go&logoColor=white)

### Prerequisites
Bleach uses **[gum](https://github.com/charmbracelet/gum)** for its UI. The installer handles this for you on Debian/Ubuntu systems.
## Features

## 🛠 Usage
- **Unified Dashboard**: Real-time "Command Center" view with live CPU, RAM, and Disk usage bars.
- **System Operations**:
- **Cleanup**: One-click `apt clean`, `autoremove`, and log rotation.
- **Updates**: streamlining `apt update && upgrade`.
- **Maintenance**: Automated system maintenance tasks.
- **Responsive TUI**: Adapts layout automatically (Side-by-side or Stacked) based on terminal window size.
- **Safe & Transparent**: Executes standard Linux commands (`sudo apt ...`) and streams output directly to you.

Run the tool anytime from your terminal:
## 🚀 Installation

### From Source (Recommended)

Requires [Go 1.23+](https://go.dev/dl/) installed.

1. Clone the repository:
```bash
git clone https://github.com/maruf-pfc/bleach.git
cd bleach
```
2. Build the binary:
```bash
go build ./cmd/bleach
```
3. Run:
```bash
./bleach
```

### Optional: Install Globally
```bash
bleach
sudo mv bleach /usr/local/bin/
```

### Modes
- **System Cleanup**: Quick access to disk space recovery tools.
- **System Updates**: Centralized update management for APT, Flatpak, and Snap.
- **Maintenance**: Utilities for long-term health (SSD Trim, etc.).
- **View Logs**: Read what Bleach has done recently.
## 🎮 Usage

### Auto-Update
Bleach checks for updates weekly. You can also manually trigger a check:
Launch Bleach from your terminal:
```bash
bleach --check-update
./bleach
```

## 🤝 Contributing

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to add new modules or improve existing ones.

## 📜 License

MIT License. See [LICENSE](LICENSE) for details.
### Interface
- **Dashboard (Top)**: Shows your System Info (Hostname, Kernel) and Live Resource Usage.
- **Menu (Bottom Left)**: Navigate using partially `Up` / `Down` arrows.
- **Output (Bottom Right)**: Displays real-time logs of actions performed.

### Controls
| Key | Action |
| :--- | :--- |
| `↑` / `↓` / `k` / `j` | Navigate Menu |
| `Enter` | Select Action |
| `q` / `Ctrl+C` | Quit |

## 🛠 Tech Stack
- **Language**: Go (Golang)
- **Framework**: [Bubble Tea](https://github.com/charmbracelet/bubbletea) (The Elm Architecture for TUI)
- **Styling**: [Lip Gloss](https://github.com/charmbracelet/lipgloss)
- **System Stats**: [gopsutil](https://github.com/shirou/gopsutil)

## License
MIT License. Use at your own risk.
223 changes: 0 additions & 223 deletions bleach

This file was deleted.

Loading