Skip to content

Repository files navigation

garbage

Soft-delete and trash management CLI for the Amadla ecosystem.

Files and directories are moved to a restorable trash directory (~/.local/amadla/trash/) with metadata tracked in a shared SQLite database (~/.local/amadla/db.sqlite).

Installation

make build

Requires CGO (for SQLite via mattn/go-sqlite3).

Usage

Trash a file or directory

garbage rm /path/to/file.txt
garbage rm /path/to/directory /path/to/another-file.txt

List trashed items

garbage list
garbage list --type=file
garbage list --type=directory

Show item details

garbage info <id>

Restore a trashed item

garbage restore <id># Restore to original location
garbage restore <id> --to=/new/path
garbage restore myfile.txt # Restore by name

Permanently delete trashed items

garbage empty --force # Delete all
garbage empty --older-than=30d --force # Delete items older than 30 days

Show settings and statistics

garbage settings

Global flags

FlagDescription
--jsonOutput in JSON format
--quietSuppress non-error output
--verboseShow detailed output
--dry-runShow what would be done without making changes

Development

make test# Run tests
make lint # Run linter
make build # Build for current platform
make build-all # Build for all platforms

About

🗑 To delete files, packages, directory, etc. It put everything in a .garbage directory so you can restore. 🗑

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages