Metadata-Version: 2.1
Name: resrm
Version: 0.1.0
Summary: drop-in replacement for rm with undo/restore built-in.
Home-page: https://github.com/mdaleo404/resrm
License: GPL-3.0-or-later
Author: Marco D'Aleo
Author-email: marco@marcodaleo.com
Requires-Python: >=3.13,<4.0
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Project-URL: Repository, https://github.com/mdaleo404/resrm
Description-Content-Type: text/markdown

# resrm

**resrm** is a safe, drop-in replacement for the Linux `rm` command with **undo/restore support**.  
It moves files to a per-user _trash_ instead of permanently deleting them, while still allowing full `sudo` support for root-owned files.

---

## Features

- Move files and directories to a **trash folder** instead of permanent deletion  
- Restore deleted files by **short ID or exact basename**  
- Empty trash safely  
- Supports `-r`, `-f`, `-i`, `--perma` options  
- Works with `sudo` for root-owned files  

---

## Installation

Install via Poetry:

```bash
poetry add resrm
```

Or clone the repo and install locally:

```bash
git clone https://github.com/mdaleo404/resrm.git
cd resrm
poetry install
```

## Usage

```bash
# Move files to trash
resrm file1 file2

# Recursive remove of a directory
resrm -r mydir

# Force remove (ignore nonexistent)
resrm -f file

# Interactive remove
resrm -i file

# Permanent delete (bypass trash)
resrm --perma file

# List trash entries
resrm -l

# Restore a file by ID or basename
resrm --restore <id|name>

# Empty the trash permanently
resrm --empty
```

## Trash Location

Normal users: `~/.local/share/resrm/files`

Root user: `/root/.local/share/resrm/files`
