Updated Edit
On this page
Complete CLI reference for saferm — all available commands, subcommands, flags, arguments, and usage examples with detailed descriptions.
#saferm CLI Reference
AI-first safe rm replacement
Version: 0.10.2
#Commands
- delete -- Move files to the saferm archive with metadata tracking
- undelete -- Restore a previously archived file back to its original path
- list -- Show all items currently held in the saferm archive
- purge -- Permanently destroy archived items and free disk space
- info -- Display full metadata and context for an archived deletion
- capabilities -- Name the features this saferm ships, for a program deciding how to drive it
#Command Groups
- config -- Manage persistent configuration values stored in the config file
#Global flags
| Name | Short | Type | Presence | Env | Description |
|---|---|---|---|---|---|
--archive-dir | str | default: {"relative_to_root": {"env_var": "SAFERM_HOME", "parts": ["archive"]}} | Path to the archive directory | ||
--db-path | str | default: {"relative_to_root": {"env_var": "SAFERM_HOME", "parts": ["db", "saferm.db"]}} | Path to the SQLite database | ||
--exclude-env-patterns | list[str] (unique) | default: ["(?i)token", "(?i)secret", "(?i)password", "(?i)key", "(?i)credential"] | Regex patterns for env vars to exclude from metadata |
#Framework flags
These flags are owned by the strictcli framework, not by the app. No command may declare a flag with one of these names, and each is recognized anywhere on the command line.
| Flag | Effect |
|---|---|
--dry-run | Preview mode: no mutation runs. The framework prints a log of every effect the command would have performed. |
--approve-consequential | Skips the confirmation prompt a consequential command shows before it runs. |
--quiet | Hides informational output. Warnings, errors, structured data and the dry-run log are never suppressed. |
--verbose | Shows debug output. --quiet wins when both are passed. |
#Configuration
| Setting | Value |
|---|---|
| Config file | This app reads a config file; --config <path> selects one. |
| Config format | toml |
| Config path | {"relative_to_root": {"env_var": "SAFERM_HOME", "parts": ["config.toml"]}} |
| Env prefix | SAFERM -- every env-bound flag reads SAFERM + its own variable name unless it declares otherwise. |
#Infrastructure
#Roots
| Env var | Default |
|---|---|
SAFERM_HOME | ~/.saferm |