Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

trash-cli

$ trash-put Community Med Risk
Andrea Francia · Files & Search · GPL-2.0 · macos / linux

trash-cli implements the FreeDesktop.org Trash specification via separate commands: trash-put moves files non-interactively to the trashcan, trash-list inspects trashed paths, trash-restore recovers items, and trash-empty permanently purges them. Using trash-put instead of rm gives coding agents reversible file deletion.

FCRS-1.0 Score
80 /100
Good
Medium Confidence
Zero-Friction Install
brew install trash-cli
CLI vs MCP Decision CLI Only

Direct trash-put calls give agents instant reversible local file deletion without any MCP layer.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 17 / 25

trash-put and trash-list run non-interactively with clean exit codes, though trash-list emits plain text (no --json) and trash-restore prompts interactively.

  • trash-put and trash-list work headlessly
  • No --json output; trash-restore is interactive by default
Trust & Safety 22 / 25

Reversible trash placement is dramatically safer than rm, though trash-empty and trash-rm perform permanent deletion.

  • trash-put preserves recovery path and timestamp
  • trash-empty permanently deletes trashed items
Setup & Portability 13 / 15

Installed easily via brew install trash-cli, pip install trash-cli, or Linux distro packages; not built for Windows.

  • Available on PyPI, Homebrew, and Linux repositories
Utility & Efficiency 13 / 15

Drop-in safer alternative to rm in agent cleanup workflows with zero configuration.

  • Single-command reversible deletion via trash-put
Maintenance & Lineage 7 / 10

Long-standing GPL-2.0 Python project (andreafrancia/trash-cli) maintained across distributions.

  • Stable GitHub repository with distro packaging
Docs & Verifiability 8 / 10

Clear README and per-command --help / man pages for trash-put, trash-list, trash-restore, and trash-empty.

  • Man pages and README examples for all subcommands

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; writes FreeDesktop trash metadata under ~/.local/share/Trash/.

Side Effects
Read-Only Local Write Destructive
Cost & Quotas

100% free, offline, and open-source (GPL-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# trash-cli Agent Rules
- Prefer `trash-put` over `rm` for reversible cleanup.
- NEVER run `trash-empty` or `trash-rm` without explicit user approval—they permanently purge files.
- Avoid bare `trash-restore` in headless shells since it prompts interactively for a row index.

Agent-Ready Command Recipes

Safe Read-Only Queries

List files currently in the trashcan
trash-list

Prints deletion timestamps and original file paths from the FreeDesktop trash directory read-only.

Controlled Writes & Previews

Move obsolete files to trash reversibly
trash-put build/old-artifact.tar.gz

Moves the file to ~/.local/share/Trash/ instead of unlinking it permanently like rm.

Strengths for Agents

  • + trash-put gives agents a non-interactive, reversible alternative to rm.
  • + trash-list records exact deletion timestamps and original paths.

Caveats & Pitfalls

  • ! No --json output from trash-list.
  • ! trash-restore prompts interactively unless piped; trash-empty permanently deletes.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI