Skip to content

Quick Start

Install Devsync and run your first sync.

Terminal window
npm install -g @tinyrack/devsync

After installation, verify it’s working:

Terminal window
devsync --version

  1. Initialize Devsync

    Terminal window
    devsync init

    You’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.)
  2. Track files

    Register the files or directories you want to sync:

    Terminal window
    devsync track ~/.gitconfig
    devsync track ~/.zshrc
    devsync track ~/.config/nvim

    For sensitive files, use --mode secret to store them encrypted in the repository:

    Terminal window
    devsync track ~/.ssh/config --mode secret
  3. Push to the sync repository

    Terminal window
    devsync push

    This mirrors your local files into ~/.config/devsync/sync/. No git commit is created at this point.

  4. Publish to a remote Git repository

    Use devsync cd to enter the sync repository directory, then run git commands directly:

    Terminal window
    devsync cd
    Terminal window
    git remote add origin https://github.com/yourname/dotfiles.git
    git add .
    git commit -m "Initial sync"
    git push -u origin main
    exit

If you’re setting up a new machine and already have a dotfiles repository, pass the repository URL to init:

Terminal window
devsync init https://github.com/yourname/dotfiles.git

You’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:

Terminal window
devsync pull

Devsync automatically decrypts secret files with your age key.