pi-delete
v0.1.0
Published
Delete Pi sessions from the TUI or command line, using trash by default.
Maintainers
Readme
pi-delete
Delete Pi sessions from the TUI or command line. Sessions go to the system trash by default; permanent deletion is explicit.
Install
pi install npm:pi-deleteRestart Pi or run /reload.
Usage
Delete the current session:
/deleteDelete another session by exact ID or an unambiguous ID prefix:
/delete <session-id>Delete from the command line and exit:
pi --delete <session-id>Flags work with both forms:
| Flag | Effect |
| --- | --- |
| --force, -f | Skip confirmation |
| --purge | Permanently delete instead of moving to trash |
Examples:
/delete abc123 --force
/delete abc123 --purge
/delete abc123 --purge --forcepi --delete abc123 --force
pi --delete abc123 --purge
pi --delete abc123 --purge --force--force controls confirmation. --purge controls recoverability.
Safety
- Targets must come from Pi's session index.
- Exact IDs and unique prefixes are accepted; ambiguous prefixes are rejected.
- Targets must resolve to canonical, regular
.jsonlfiles. - Normal deletion requires
trash,gio trash, ortrash-put. - If no trash command works, deletion stops instead of silently becoming permanent.
- Deleting the current session switches to a fresh session before removing the old file.
License
MIT
