{"id":26869971,"url":"https://github.com/icyphox/crap","last_synced_at":"2025-05-07T04:23:14.590Z","repository":{"id":55339164,"uuid":"156371327","full_name":"icyphox/crap","owner":"icyphox","description":"🗑️ `rm` files without fear","archived":false,"fork":false,"pushed_at":"2020-06-06T11:19:05.000Z","size":23,"stargazers_count":32,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T13:03:33.384Z","etag":null,"topics":["cli","crap","files","rm","trash"],"latest_commit_sha":null,"homepage":"","language":"Nim","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/icyphox.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}},"created_at":"2018-11-06T11:10:50.000Z","updated_at":"2024-02-07T00:16:57.000Z","dependencies_parsed_at":"2022-08-14T21:30:49.048Z","dependency_job_id":null,"html_url":"https://github.com/icyphox/crap","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyphox%2Fcrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyphox%2Fcrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyphox%2Fcrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyphox%2Fcrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icyphox","download_url":"https://codeload.github.com/icyphox/crap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252811189,"owners_count":21807905,"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","crap","files","rm","trash"],"created_at":"2025-03-31T06:19:30.705Z","updated_at":"2025-05-07T04:23:14.571Z","avatar_url":"https://github.com/icyphox.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://x.icyphox.sh/15QNk.png\" width=\"280\"\u003e\n\u003c/h1\u003e\n\n\u003e `rm` files without fear\n\n### Why?\nEver `rm`ed a file and instantly regretted it? Fear not, for `crap` is here. \n\n### How?\n`crap` follows the FreeDesktop.org Trash spec. So instead of perma-deleting your file, `crap` moves it to the `$XDG_DATA_HOME/Trash` folder. If this environment variable isn't set, it defaults to `~/.local/share/Trash`.\n\nAnd obviously, ***this works only on Linux***. \n\n## Installation\n```console\n$ nimble install crap\n```\n\nor download the binary from the [Releases](https://github.com/icyphox/crap/releases/) page.\n\n### Tip\nAlias `crap` to `rm` in your `.bashrc`/`.zshrc`. But that's kinda the point.\n\n## Usage\n```console\n$ crap foo.png\n\n$ crap *.png\n\n$ crap a.pdf b.jpg c.mp4\n\n```\nAaannddd it'll show up in your file manager's Trash.\n\n![trash](https://x.icyphox.sh/H6iNv.png)\n\n## API\nThis package exposes a single proc: `crap(path: var string)`\n\n```nim\nimport crap\n\ncrap(\"~/Pictures/*\")\n\n```\n\n## TODO\n- [x] support multiple files\n- [x] trashing dirs\n- [ ] support for other OSs (idk maybe)\n\n## Prior art\n- [sindresorhus/trash-cli](https://github.com/sindresorhus/trash-cli)\n\n## Contributing\nBad code? New feature in mind? Open an issue. Better still, learn [Nim](https://nim-lang.org/documentation.html) and shoot a PR :sparkles:\n\n## License\nMIT © [Anirudh Oppiliappan](https://icyphox.sh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficyphox%2Fcrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficyphox%2Fcrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficyphox%2Fcrap/lists"}