{"id":19703392,"url":"https://github.com/jpal91/trash","last_synced_at":"2026-06-17T14:32:28.011Z","repository":{"id":222564057,"uuid":"757758274","full_name":"jpal91/trash","owner":"jpal91","description":"A friendlier implementation of the rm command","archived":false,"fork":false,"pushed_at":"2025-06-08T19:59:46.000Z","size":107,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-22T14:33:46.268Z","etag":null,"topics":["cli","command-line","gnu","rm","rust","trash"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpal91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-14T23:04:47.000Z","updated_at":"2025-06-08T19:59:50.000Z","dependencies_parsed_at":"2025-01-10T11:34:13.303Z","dependency_job_id":"d1cb7ab0-4f97-446e-a21e-6270a1373a01","html_url":"https://github.com/jpal91/trash","commit_stats":null,"previous_names":["jpal91/trash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jpal91/trash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpal91%2Ftrash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpal91%2Ftrash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpal91%2Ftrash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpal91%2Ftrash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpal91","download_url":"https://codeload.github.com/jpal91/trash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpal91%2Ftrash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34453431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","command-line","gnu","rm","rust","trash"],"created_at":"2024-11-11T21:17:41.846Z","updated_at":"2026-06-17T14:32:27.983Z","avatar_url":"https://github.com/jpal91.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trash\n\nA friendlier implementation of the `rm` command. \n\n![](assets/trash.png)\n\n## Purpose\n\n`rm` can be a little scary sometimes and I wanted an implementation that I didn't have to stare at for a full minute to make sure I was absolutely doing the correct thing before pressing enter. \n\nWith `trash`, instead of the item(s) being permanently deleted, they will be moved to a directory created by `trash`, which will be stored in the user's `tmp` directory. If an item was `trashed` by mistake, it can be moved back (and `trash` even can help with that!). Once the user's computer restarts, the item(s) will be deleted per normal OS process, but it still gives the user time/ability to correct any mistakes. \n\n## Features\n- Ability to send one or more files to the `trash`\n    - Just like with `rm` each argument is going to be acted on\n    - Supports UNIX globbing\n- History\n    - `undo` the last action\n    - `view` the history\n- Ultimately the files will be deleted, just like with `rm` if the user takes no action\n- Speed and safety of Rust\n- Explain Mode - Can tell you what will happen instead of performing the action\n- Pretty color output\n\n## Usage\n```bash\n# Moves my_doc.txt to the trash\ntrash my_doc.txt\n\n# Moves all contents of my_dir to the trash, leaving it empty. -v (verbose) logs each move as it happens.\ntrash -v my_dir/*\n\n# Undo last move, moving the contents of my_dir back to it's original place(s)\ntrash -u\n\n# Don't move anything, but log on the console what would happen in this command\ntrash -e my_dir/*\n\n# View the history of all your prior trash commands\ntrash -w\n\n# View help and exit\ntrash -h\n```\n\n## Installation\n\nRequires `rustc` and `Cargo` installed on your computer.\n\n```bash\ngit clone https://github.com/jpal91/trash.git\ncd trash\ncargo install --path .\n```\n\n## Hacking - OS\n\nCurrently this is built for Linux, but should be able to be re-tooled somewhat easily for Mac and Windows.\n\nMainly the `resolve_paths` function would just have to be implemented to fit the OS. Anything that is written in by hand would have to be altered to fit the desired path.\n\n```rust\npub fn resolve_paths() -\u003e TrashResult\u003c(PathBuf, PathBuf)\u003e {\n    let mut hist_path = PathBuf::from_iter([\n        dirs::home_dir().unwrap(), // This should be fine as it should work on Windows/Mac\n        PathBuf::from(\".config/trash/\") // This would have to be changed\n    ]);\n    ...\n    let mut trash_dir = env::temp_dir(); // This should also work\n    trash_dir.push(\"trash/\"); // may need to change\n    ...\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpal91%2Ftrash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpal91%2Ftrash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpal91%2Ftrash/lists"}