Home

Awesome

<p align="center"> <img src="./docs/screenshot.png" width="500" alt="gomi"> </p> <p align="center"> <a href="https://b4b4r07.mit-license.org"> <img src="https://img.shields.io/github/license/b4b4r07/gomi" alt="License"/> </a> <a href="https://github.com/b4b4r07/gomi/releases"> <img src="https://img.shields.io/github/v/release/b4b4r07/gomi" alt="GitHub Releases"/> </a> <br /> <a href="https://b4b4r07.github.io/gomi/"> <img src="https://img.shields.io/website?down_color=lightgrey&down_message=donw&up_color=green&up_message=up&url=https%3A%2F%2Fb4b4r07.github.io%2Fgomi" alt="Website" /> </a> <a href="https://github.com/b4b4r07/gomi/actions/workflows/release.yaml"> <img src="https://github.com/b4b4r07/gomi/actions/workflows/release.yaml/badge.svg" alt="GitHub Releases" /> </a> <a href="https://github.com/b4b4r07/gomi/blob/master/go.mod"> <img src="https://img.shields.io/github/go-mod/go-version/b4b4r07/gomi" alt="Go version" /> </a> </p>

šŸ—‘ļø 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). 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

Usage

$ alias rm=gomi
$ rm -rf important-dir
$ rm --restore
Search: ā–ˆ
Which to restore?
  ā–ø important-dir
    main_test.go
    main.go
    test-dir
ā†“   validate_test.rego

Name:             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 and drop it in your $PATH.

For macOS / Homebrew user:

brew install b4b4r07/tap/gomi

Using afx, package manager for CLI:

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

License

MIT