Metadata-Version: 2.4
Name: estrellio-repo-vault
Version: 0.1.0
Summary: Encrypted Git and directory archives
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: estrellio-repo-layout-tools<0.4,>=0.3.0
Requires-Dist: pyzipper<0.5,>=0.4
Dynamic: license-file

# Repository Vault

RVP creates and restores encrypted Git and directory archives. Python >=3.10,
Git and pyzipper are required. CLI: repo-vault or python -m repo_vault.
Use explicit --config and --local-config. Archive commands accept --password-file,
--archive-root and --restore-root. No personal configuration is bundled.

The existing WinZip AES format is retained. File contents are encrypted; outer
member names and sizes remain visible. Use a random strong password and keep it
separate from artifacts. Publishing Python code does not hide its implementation.

Embedding applications inject Runtime services with runtime_context. Credential
references and local snapshot sources require explicit resolvers. Local-config
composition accepts a mapping of relative paths to bytes; restore retains checksum,
path, symlink and preserve/backup_replace protections.

Build a wheel, check scripts/check_dist.py and twine check --strict, then run
scripts/verify_install.py 0.1.0 with the wheel normally installed outside the source.
Only verified synthetic fixtures are permitted. MIT license.

## Commands and compatibility

- `pack`: bundle, tracked_snapshot, latest_commit or directory_snapshot; configured
  shortcuts support single inputs and grouped directories/files.
- `unpack`: local storage ZIP with `-i`, or configured browser download; supports
  strict, force and clean restore modes and extra restore targets.
- `archive` / `unarchive`: encrypted full Git bundle archives, with explicit roots
  and a password file. Repository metadata and ordinary snapshot DAT formats remain
  compatible with the original AutoScripts implementation.
- `replace-random`, `reset-fork`: maintain a configured storage repository. Read
  `--help` and use a dedicated backup storage repository. Changed directory packs
  retain the original upstream-reset behavior; this may reset storage history.
- `generate-password -o PATH`: creates a random password without overwriting an
  existing entry. Linux uses restrictive modes; Windows applies a user-only ACL
  before writing the secret. Password values are never intentionally logged.

Ordinary pack/unpack configuration uses `password.file_path` or `password.command`
(an argument list). File passwords use the first line. Credential references are
opaque application references, not secret values. Without an injected resolver they
fail explicitly. Password command failures do not echo arguments or output.

Global options can precede or follow the subcommand. CLI values override only when
explicitly supplied. Explicit local JSON overrides the explicit base JSON. Relative
paths follow the current working directory, as in the original implementation.
The independent CLI does not discover AutoScripts configuration or home directories.
The AutoScripts adapter retains its existing defaults and credential-store selection.

Local snapshot sources belong to embedding applications. Supply a snapshot_loader
in Runtime returning a mapping of relative local-config paths to bytes. The package
composes committed source with these files and retains the existing checksum metadata
format. Restore validates paths, checksums and symlinks before target cleanup;
`preserve` retains existing local files and `backup_replace` retains comparison copies.

## Security limits

The format is standard WinZip AES ZIP with the existing PBKDF2 parameters, not a new
cryptographic protocol. A copied DAT permits offline password guesses, so use a
random long password. Outer ZIP names and sizes remain visible, including bundle
names; the `.dat` suffix does not conceal the file format. Changing the password file
does not re-encrypt existing backups. This release does not perform password rotation.

Only Python code, the license and distribution metadata are allowed in the wheel.
Tests use synthetic data and local temporary repositories. No production DAT, password
file, personal configuration, credential database, log or publication token is bundled.
