Quick Start
Install Devsync and run your first sync.
Installation
Section titled “Installation”npm install -g @tinyrack/devsyncpnpm add -g @tinyrack/devsyncyarn global add @tinyrack/devsyncAfter installation, verify it’s working:
devsync --versionStart with a new repository
Section titled “Start with a new repository”-
Initialize Devsync
Terminal window devsync initYou’ll be asked for an age private key. Press Enter to generate a new one automatically.
After initialization, the following structure is created under
~/.config/devsync/:Directory~/.config/devsync/
Directorysync/ Git repository where synced files are stored
- …
Directoryage/
- keys.txt age private key used to decrypt secret files
- settings.json Global settings (active profile, etc.)
-
Track files
Register the files or directories you want to sync:
Terminal window devsync track ~/.gitconfigdevsync track ~/.zshrcdevsync track ~/.config/nvimFor sensitive files, use
--mode secretto store them encrypted in the repository:Terminal window devsync track ~/.ssh/config --mode secret -
Push to the sync repository
Terminal window devsync pushThis mirrors your local files into
~/.config/devsync/sync/. No git commit is created at this point. -
Publish to a remote Git repository
Use
devsync cdto enter the sync repository directory, then run git commands directly:Terminal window devsync cdTerminal window git remote add origin https://github.com/yourname/dotfiles.gitgit add .git commit -m "Initial sync"git push -u origin mainexit
Connect an existing repository
Section titled “Connect an existing repository”If you’re setting up a new machine and already have a dotfiles repository, pass the repository URL to init:
devsync init https://github.com/yourname/dotfiles.gitYou’ll be prompted to enter your age private key. Enter the key you backed up from your original machine.
After cloning, restore your files to their original paths:
devsync pullDevsync automatically decrypts secret files with your age key.