Storage Modes: Local vs Git¶
TRXO offers two storage modes to suit your workflow: Local Filesystem and Git Repository.
๐ Local Mode (Default)¶
Ideal for ad-hoc backups or quick transfers between environments.
How it works:
- Exports are saved as JSON files in a local ./exports/ directory (or custom path).
- Imports read directly from these JSON files.
Usage:
# Export to local file
trxo export scripts
# Import from local file
trxo import scripts --file ./exports/scripts_timestamp.json
๐ Git Mode¶
Ideal for team collaboration, version history, audit logs, and automated deployments.
How it works: - TRXO connects directly to a remote Git repository (GitHub, GitLab, etc.). - Exports create a commit on a specified branch. - Imports read configurations directly from the repository structure.
Setup¶
- Prepare a Repository: Create an empty repo (e.g.,
ping-configs) on your Git provider. - Configure TRXO:
Usage¶
# Export to 'develop' branch
trxo export scripts --branch develop --message "Updated authentication scripts"
# Import from 'main' branch
trxo import scripts --branch main
Benefits of Git Mode¶
- Rollback Support: Use
--rollbackto automatically revert changes if an import fails. - Audit Trail: Every change is a commit with a timestamp and author.
- Structure: Configurations are organized by Realm and Component type automatically (e.g.,
alpha/scripts/my-script.json).