Files
skillshare/website/docs/commands/trash.md
T
Willie 8604ab278e feat(ui): add Trash page, trash API handlers, and CLI delete/empty commands
- Add Web UI Trash page with list, restore, delete, and empty actions
- Add 4 server handlers (handler_trash.go) with dual-mode support
- Fix handleUninstallSkill/handleUninstallRepo to use trash.MoveToTrash
  instead of os.RemoveAll (bug fix: uninstall via UI now soft-deletes)
- Add trash delete/empty CLI subcommands with integration tests
- Show Uninstall button for all skills in SkillDetailPage (not just
  tracked/installed ones)
- Update confirm dialog wording to reflect soft-delete behavior
- Update docs with new trash subcommands
2026-02-09 23:19:28 +08:00

2.5 KiB
Raw Blame History

sidebar_position
sidebar_position
4

trash

Manage uninstalled skills in the trash directory.

skillshare trash list                    # List trashed skills
skillshare trash restore my-skill        # Restore from trash
skillshare trash restore my-skill -p     # Restore in project mode
skillshare trash delete my-skill         # Permanently delete from trash
skillshare trash empty                   # Empty the trash

Subcommands

list

Show all skills currently in the trash:

skillshare trash list
Trash
  my-skill      (1.2 KB, 2d ago)
  old-helper    (800 B, 5d ago)

2 item(s), 2.0 KB total
Items are automatically cleaned up after 7 days

restore

Restore the most recent trashed version of a skill back to the source directory:

skillshare trash restore my-skill
✓ Restored: my-skill
ℹ Trashed 2d ago, now back in ~/.config/skillshare/skills
ℹ Run 'skillshare sync' to update targets

If a skill with the same name already exists in source, restore will fail. Uninstall the existing skill first or use a different name.

delete

Permanently delete a single item from the trash:

skillshare trash delete my-skill
✓ Permanently deleted: my-skill

empty

Permanently delete all items from the trash (with confirmation prompt):

skillshare trash empty
⚠ This will permanently delete 3 item(s) from trash
Continue? [y/N]: y
✓ Emptied trash: 3 item(s) permanently deleted

Backup vs Trash

These two safety mechanisms protect different things:

backup trash
Protects target directories (sync snapshots) source skills (uninstall)
Location ~/.config/skillshare/backups/ ~/.config/skillshare/trash/
Triggered by sync, target remove uninstall
Restore with skillshare restore <target> skillshare trash restore <name>
Auto-cleanup manual (backup --cleanup) 7 days

Options

Flag Description
--project, -p Use project-level trash (.skillshare/trash/)
--global, -g Use global trash
--help, -h Show help

Auto-Cleanup

Expired trash items (older than 7 days) are automatically cleaned up when you run uninstall or sync. No cron or scheduled task is needed.

  • uninstall — Remove skills (moves to trash)
  • backup — Backup target directories
  • restore — Restore targets from backup