{"id":13571752,"url":"https://github.com/oberblastmeister/trashy","last_synced_at":"2025-04-13T00:42:21.994Z","repository":{"id":45899157,"uuid":"292720676","full_name":"oberblastmeister/trashy","owner":"oberblastmeister","description":"a cli system trash manager, alternative to rm and trash-cli","archived":false,"fork":false,"pushed_at":"2024-01-19T02:18:44.000Z","size":627,"stargazers_count":415,"open_issues_count":32,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T00:42:12.865Z","etag":null,"topics":["cli","file","rm","rust","trash-cli","trashcan"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oberblastmeister.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-09-04T01:41:42.000Z","updated_at":"2025-04-06T14:16:42.000Z","dependencies_parsed_at":"2023-10-14T17:32:26.266Z","dependency_job_id":"aa44de1c-cec5-4521-a6ef-00e809ba0c5e","html_url":"https://github.com/oberblastmeister/trashy","commit_stats":{"total_commits":244,"total_committers":11,"mean_commits":"22.181818181818183","dds":"0.23360655737704916","last_synced_commit":"7c48827e55bca5a3188d3de44afda3028837b34b"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oberblastmeister%2Ftrashy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oberblastmeister%2Ftrashy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oberblastmeister%2Ftrashy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oberblastmeister%2Ftrashy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oberblastmeister","download_url":"https://codeload.github.com/oberblastmeister/trashy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650417,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","file","rm","rust","trash-cli","trashcan"],"created_at":"2024-08-01T14:01:05.713Z","updated_at":"2025-04-13T00:42:21.966Z","avatar_url":"https://github.com/oberblastmeister.png","language":"Rust","funding_links":[],"categories":["Rust","FileSystem"],"sub_categories":[],"readme":"# trashy\n\n![Build Status](https://github.com/oberblastmeister/trash-cli/workflows/ci/badge.svg)\n\n*trashy* is a simple, fast, and featureful alternative to *rm* and *trash-cli* written in rust.\n\nQuick links:\n\n- [Usage](#usage)\n- [Installation](#installation)\n\n## Demo\n\n![demo](doc/trashy_demo_1.gif)\n\n## Features\n\n- easy to use, just run `trashy put PATH`\n- recursive by default, without having the issues\n- beautiful output\n    - colorized paths (similar to *fd*)\n    - cool tables\n- very fast, and faster than trash-cli (see [benchmarks](#benchmarks))\n- much safer than `rm -rf`\n- intuitive syntax and fine grained control\n- uses the system trash on both linux and windows\n\n## Usage\n\n### Trash a path\n\n```bash\n$ trashy first second third\n```\n\nThis is just sugar for \n\n```bash\n$ trashy put first second third\n```\n\n### List items in the trash\n\n```bash\n$ trashy list\n```\n\n### Restore or empty some files\n\n```bash\n$ trashy restore first second\n```\n```bash\n$ trashy empty first second third\n```\n\nThe `restore` and `empty` subcommands both take very similar arguments and flags.\n\nBy default the arguments for `restore` and `empty` are interpreted as regular expressions.\nUse the `-m` option to interpret them differently.\n\n\n### Restore or empty all files\n\n```bash\n$ trashy restore --all\n```\n\n```bash\n$ trashy empty --all\n```\n\n## Integrations\n\n### fzf\n\nRestore with fzf\n\n```bash\ntrashy list | fzf --multi | awk '{$1=$1;print}' | rev | cut -d ' ' -f1 | rev | xargs trashy restore --match=exact --force\n```\n\nEmpty with fzf\n\n```bash\ntrashy list | fzf --multi | awk '{$1=$1;print}' | rev | cut -d ' ' -f1 | rev | xargs trashy empty --match=exact --force\n```\n\n## Installation\n\n### Using cargo\n\n```bash\ncargo install trashy\n```\n\n### From Github Releases\n\nDownload the binary from Github Releases and put it in your `$PATH`.\n\n### From the AUR\n\nUse your favorite AUR helper.\n\n```bash\nparu -S trashy\n```\n\n### Using Nix\n\n```bash\nnix-env -i trashy\n```\n\nOr if you have flakes enabled:\n\n```bash\nnix profile install nixpkgs#trashy\n```\n\n## Benchmarks\n\nThese benchmarks are run on the rust compiler source in the `compiler/` directory.\nThe directory has about 2000 files. The benchmarks are run using [hyperfine](https://github.com/sharkdp/hyperfine).\n\nRunning `put` on each file in the `compiler/` directory recursively.\n\n```\nhyperfine -M 1 'fd -t f --threads 1 -x trash-put'\n```\n\n```\nTime (abs ≡):        65.849 s               [User: 54.383 s, System: 11.370 s]\n```\n\nNow with `trashy`\n\n```\nhyperfine -M 1 'fd -t f --threads 1 -x trashy put'\n```\n\n```\nTime (abs ≡):         4.822 s               [User: 2.014 s, System: 2.918 s]\n```\n\n`trashy` has practically zero startup time, while `trash-cli` has a large startup time because it is written in python. This difference in startup time causes massive speed differences when used in scripts. The benchmark shows that `trashy` is about 13 times faster!\n\nListing the previously trashed items\n\n```\nhyperfine 'trash-list'\n```\n\n```\nTime (mean ± σ):     383.7 ms ±  10.5 ms    [User: 321.8 ms, System: 59.4 ms]\nRange (min … max):   375.9 ms … 412.0 ms    10 runs\n```\n\n\n```\nhyperfine 'trashy list'\n```\n\n```\nTime (mean ± σ):     178.3 ms ±   1.9 ms    [User: 135.7 ms, System: 40.4 ms]\nRange (min … max):   175.6 ms … 181.0 ms    16 runs\n```\n\n`trashy` is faster by more than 2 times.\n\n## FAQ\n\n### Is this supported on MacOS?\n\nNo, see this [issue](https://github.com/Byron/trash-rs/issues/8)\n\n### Should I alias rm='trashy put'?\n\nYou should not. The alias will not be present on other systems and habits are really hard to break. An alternative is to alias `trashy put` to `rt` or `tp`.\n\n## License\n\nCopyright (c) 2020 Brian Shu\n\n*trashy* is distributed under the terms of both the MIT license and the Apache License 2.0.\n\nSee the [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foberblastmeister%2Ftrashy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foberblastmeister%2Ftrashy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foberblastmeister%2Ftrashy/lists"}