A Python-based CLI utility that performs high-performance filesystem scanning to identify space-intensive directories and applies a heuristic scoring model to suggest 'Garbage Collection' (deletion) of transient or stale data.
Project description
🤖 fsgc — Filesystem Garbage Collector
Clean your filesystem with precision.
A Python-based CLI utility that performs high-performance filesystem scanning using MCTS-informed search to identify space-intensive directories and suggests garbage collection based on intelligent heuristics.
🚀 Getting Started
The fsgc tool is built with modern Python tooling (uv).
Installation
For users (recommended):
uvx fsgc
Or via pipx:
pipx install fsgc
For developers:
# Clone the repository
git clone https://github.com/apiad/fsgc.git
cd fsgc
# Install dependencies and build the project
uv sync
Usage
By default, running fsgc will perform a stochastic MCTS-informed scan of the current directory:
fsgc scan .
Options:
--workers/-w: Number of concurrent workers (default: 8).--depth/-d: Maximum display depth (default: 2).--min-percent/-p: Minimum size percentage of parent to show child (default: 0.01).--limit/-l: Maximum number of children to list individually (default: 10).--age/-a: Age threshold in days for recency heuristic (default: 90).--dry-run: Show what would be collected without deleting.
🧠 The Core Philosophy
fsgc is "The Architect in the Machine." It uses a Stochastic Search architecture to turn raw metadata into actionable deletion proposals:
- Scanner (The Playout): Informed MCTS scanning using
GCTrailhistory and known signatures. - Heuristic Engine (The Mark Phase): Scores nodes based on patterns, recency, and sentinel verification (e.g., verifying
package.jsonfornode_modules). - Aggregator (The Sweep Phase): Groups garbage into logical collections for interactive selection.
🛠️ Development Lifecycle
The project is managed using a highly customized Gemini CLI agent framework. For more information on the framework and available commands, refer to GEMINI.md.
Standard Targets:
make lint: Run Ruff checks.make format: Apply code formatting.make test: Execute the test suite.make check: Run Mypy static analysis.make all: Run all checks and tests.
⚓ The Hook System
The framework uses a robust hook system (.gemini/hooks/) that synchronizes the agent with your project state, ensuring continuous validation and journaling.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fsgc-0.5.0.tar.gz.
File metadata
- Download URL: fsgc-0.5.0.tar.gz
- Upload date:
- Size: 205.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ead85a450192d6f3348130ed6dfd1b783b2519962bf7f968c0a40618c15366b4
|
|
| MD5 |
400d3ceb0b0c9272bcab78b1aa42e102
|
|
| BLAKE2b-256 |
bf2fc4cc6948cfb3ff17e338513cc68dd36b50dbd81669cfdee54e3e134753c9
|
File details
Details for the file fsgc-0.5.0-py3-none-any.whl.
File metadata
- Download URL: fsgc-0.5.0-py3-none-any.whl
- Upload date:
- Size: 37.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a4067cd403dd2cb185b54de0e82524488a8b12ed61b54b10d057b1bf8730549
|
|
| MD5 |
545db7ea458ab265490ddc2ea0a1d82e
|
|
| BLAKE2b-256 |
96acb19f799cae8538fadb6e650081e6e856a58f6d2402982096a10b47c8a550
|