devsync init
Initialize a new sync repository or connect to an existing one.
Synopsis
Section titled “Synopsis”devsync init [repository]Description
Section titled “Description”devsync init bootstraps your devsync setup. It either creates a brand-new local sync repository or clones an existing remote repository into the standard location at ~/.config/devsync/sync/.
When run without a repository URL, it initializes a fresh git repository and generates a new age encryption key. When a URL is provided, it clones that repository and prompts you to supply the corresponding age private key needed to decrypt any secrets stored there.
After initialization, devsync creates:
~/.config/devsync/sync/— the sync repository directory~/.config/devsync/settings.json— runtime settings (active profile, identity path, etc.)~/.config/devsync/age/keys.txt— age key storage
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
repository | Optional. A git repository URL to clone (HTTPS or SSH). |
Options
Section titled “Options”| Flag | Description |
|---|---|
--identity PATH | Persist the path to an age identity file in settings.json. Useful when your key lives in a password manager export or a separate secure location. |
--key KEY | Pass an age private key (AGE-SECRET-KEY-…) directly. Useful for non-interactive or scripted setup. |
--recipient AGE1... | Add an age recipient public key. Can be repeated to add multiple recipients. Enables sharing encrypted secrets with other users. |
--verbose | Print detailed output during initialization. |
Examples
Section titled “Examples”# Create a new local sync repository with a fresh age keydevsync init# Clone an existing sync repository from GitHubdevsync init https://github.com/yourname/dotfiles.git# Clone and supply age key non-interactivelydevsync init https://github.com/yourname/dotfiles.git \ --key AGE-SECRET-KEY-1QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ# Point devsync to an age identity file stored elsewheredevsync init --identity ~/.secrets/age-identity.txt# Add multiple recipients so teammates can decrypt secretsdevsync init \ --recipient age1alice... \ --recipient age1bob...After initialization, track your first file with devsync track, then push with devsync push.