Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/babarot/gomi
🗑️ Replacement for UNIX rm command!
https://github.com/babarot/gomi
cli go gomi trash trashcan
Last synced: 14 days ago
JSON representation
🗑️ Replacement for UNIX rm command!
- Host: GitHub
- URL: https://github.com/babarot/gomi
- Owner: babarot
- License: mit
- Created: 2015-05-01T05:16:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-05-14T04:05:16.000Z (over 1 year ago)
- Last Synced: 2024-05-02T02:17:53.742Z (7 months ago)
- Topics: cli, go, gomi, trash, trashcan
- Language: Go
- Homepage: https://babarot.me/gomi
- Size: 6.64 MB
- Stars: 313
- Watchers: 3
- Forks: 13
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🗑️ Replacement for UNIX rm command!
`gomi` (ごみ/go-mi means a trash in Japanese) is a simple trash tool that works on CLI, written in Go
The concept of the trashcan does not exist in Command-line interface ([CLI](http://en.wikipedia.org/wiki/Command-line_interface)). If you have deleted an important file by mistake with the `rm` command, it would be difficult to restore. Then, it's this `gomi`. Unlike `rm` command, it is possible to easily restore deleted files because `gomi` have the trashcan for the CLI.
## Features
- Like a `rm` command but not unlink (delete) in fact (just move to another place)
- Easy to restore, super intuitive
- Compatible with `rm` command, e.g. `-r`, `-f` options
- Nice UI, awesome CLI UX
- Easy to see what gomi does with setting `GOMI_LOG=[trace|debug|info|warn|error]`## Usage
```console
$ alias rm=gomi
```
```console
$ rm -rf important-dir
```
```console
$ rm --restore
Search: █
Which to restore?
▸ important-dir
main_test.go
main.go
test-dir
↓ validate_test.regoName: important-dir
Path: /Users/b4b4r07/src/github.com/b4b4r07/important-dir
DeletedAt: 5 days ago
Content: (directory)
-rw-r--r-- important-file-1
-rw-r--r-- important-file-2
drwxr-xr-x important-subdir-1
drwxr-xr-x important-subdir-2
...
```## Installation
Download the binary from [GitHub Releases][release] and drop it in your `$PATH`.
- [Darwin / Mac][release]
- [Linux][release]**For macOS / [Homebrew](https://brew.sh/) user**:
```bash
brew install b4b4r07/tap/gomi
```**Using [afx](https://github.com/b4b4r07/afx), package manager for CLI**:
```yaml
github:
- name: b4b4r07/gomi
description: Trash can in CLI
owner: b4b4r07
repo: gomi
release:
name: gomi
tag: v1.1.5 ## NEED UPDATE!
command:
link:
- from: gomi
to: gomi
alias:
rm: gomi ## --> alias rm=gomi
```**AUR users**:
https://aur.archlinux.org/packages/gomi/
## Versus
- [andreafrancia/trash-cli](https://github.com/andreafrancia/trash-cli)
- [sindresorhus/trash](https://github.com/sindresorhus/trash)## License
[MIT][license]
[release]: https://github.com/b4b4r07/gomi/releases/latest
[license]: https://b4b4r07.mit-license.org