@blackridder22/vault
v1.0.0
Published
Minimal local project backup CLI.
Downloads
23
Readme
Vault
Minimal local project backup CLI.
Vault copies a development project into a hidden local folder:
~/.vault/projects/<project-name>/It is not Git. It does not create version history, archives, cloud backups, or restore workflows.
Installation
npm install -g @blackridder22/vaultFor local development from this repository:
npm install
npm run build
npm linkCommands
Backup the current project:
vault --backup
vault -bBackup a specific project:
vault --backup /path/to/project
vault -b /path/to/projectList saved projects:
vault --list
vault -lDelete a saved project:
vault --delete sonoa-searchShow help:
vault --help
vault -hShow version:
vault --version
vault -vHow Backups Work
When you run vault -b, Vault uses this source:
- The path passed after
--backupor-b, if provided. - The Git root from
git rev-parse --show-toplevel, if the current folder is inside a Git repo. - The current folder from
process.cwd().
The project name is the source folder name. For example:
/Users/me/projects/sonoa-searchis saved to:
~/.vault/projects/sonoa-search/If a backup with the same project name already exists, Vault overwrites it. It first copies the project into ~/.vault/tmp/<project-name>-tmp. Only after that copy succeeds does it remove the previous backup and move the temporary copy into ~/.vault/projects/<project-name>/.
Ignore Rules
Vault respects the project's root .gitignore.
Vault also uses a global ignore file:
~/.vault/config/ignore.txtIf that file does not exist, Vault creates it automatically with default rules for common folders and files such as .git/, node_modules/, .next/, dist/, build/, .env, logs, and caches.
The ignore file supports gitignore-style rules, including ! negation rules.
