Vanish

I wrote Vanish as a safer rm. Deleted files go to a recoverable cache, with a TUI to browse, restore and undo.

Status
● Live
Year
2025
Stack
Go · Bubble Tea · TUI · CLI
Source
Nurysso/vanish
8
themes
13
command flags
TOML
config

01 / Overview

What it does

Vanish (vx) replaces rm with a cache you can pull files back from. Delete as usual, then restore by wildcard, check cache stats, or purge anything older than 30 days.

02 / Usage

Delete, then change your mind

Delete
vx file.txt folder/ *.log
Restore by pattern
vx --restore "*.txt"
vx --restore "backup-*"
vx --restore "*.log" "config.*" "test-*"
Look after the cache
vx --list
vx --stats
vx --purge 30    # drop anything older than 30 days

03 / Commands

The whole workflow

  • vx file.txt folder/ *.log

    Delete files and directories. They move to the cache instead of disappearing.

  • vx --restore "project-*"

    Restore by wildcard and flexible matching.

  • vx --list · --info · --stats

    See what is cached, inspect one file, and track usage.

  • vx --purge 30

    Remove cached files older than 30 days.

04 / Features

What you get

  • Recoverable by default

    Nothing is permanently removed until you purge or clear the cache.

  • TUI with 8 themes

    Browse and restore in a terminal interface you can restyle.

  • Audit trail

    Every operation is logged.

  • Retention policies

    Set how long the cache keeps files and when it cleans up.

  • TOML config

    Behavior, themes and retention in one file.

  • Scriptable

    Add --noconfirm to skip prompts when you know what you are doing.

05 / Install

Get it running

curl
curl -LsSf https://raw.githubusercontent.com/Nurysso/vanish/main/install.sh | sh
wget
wget -qO- https://raw.githubusercontent.com/Nurysso/vanish/main/install.sh | sh

Then run vx file.txt to delete, vx --list to see the cache, vx --restore "*.txt" to bring files back.

06 / Limits

Rough edges

  • Moving the cache means emptying the old one with vx --clear and restarting.

07 / FAQ

Before you try it

Where do deleted files go?
To a cache directory. vx --path prints its location.
Does restoring keep permissions?
Yes. Original permissions, ACLs and extended attributes are preserved. Symlinks are kept but not followed.
Can I move the cache?
Change the location in the config file, run vx --clear to empty the old one, then restart.
How do I skip the prompts?
Add --noconfirm. Use it with care.

Vanish

I wrote Vanish as a safer rm. Deleted files go to a recoverable cache, with a TUI to browse, restore and undo.