Skip to content

devsync init

Initialize a new sync repository or connect to an existing one.

Terminal window
devsync init [repository]

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
ArgumentDescription
repositoryOptional. A git repository URL to clone (HTTPS or SSH).
FlagDescription
--identity PATHPersist 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 KEYPass 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.
--verbosePrint detailed output during initialization.
Terminal window
# Create a new local sync repository with a fresh age key
devsync init

After initialization, track your first file with devsync track, then push with devsync push.