Skip to content

Profiles

Use profiles to sync different subsets of your config on different machines or environments.

Profiles let you assign tracked entries to named groups and selectively sync only the entries that belong to the active profile. This is useful when different machines need different subsets of your config.


Not every tracked file belongs on every machine. For example:

  • Work credentials should only sync to work machines
  • A GPU-tuning config should only apply to your desktop
  • A Linux-specific shell script shouldn’t be pulled onto your Mac

Without profiles, you’d need separate repositories for each environment. With profiles, a single repository can serve all your machines, and each machine only applies the entries it needs.


Every tracked entry is either global or profile-scoped:

  • Global — no profile assigned. Always included during push and pull, regardless of the active profile.
  • Profile-scoped — assigned to one or more named profiles. Only included when the active profile matches.
Terminal window
# Global — synced on every machine
devsync track ~/.gitconfig
devsync track ~/.zshrc
# Work profile only
devsync track ~/.config/work-vpn --profile work
# Desktop profile only
devsync track ~/.config/gpu-settings --profile desktop
# Both work and linux profiles
devsync track ~/.config/some-tool --profile work --profile linux

The active profile is stored in ~/.config/devsync/settings.json.

Terminal window
# Set active profile to "work"
devsync profile use work
# Clear active profile (fall back to global-only)
devsync profile use

Once the active profile is set, devsync push and devsync pull will include global entries plus entries assigned to the active profile.


Terminal window
devsync profile list

This shows all profile names that appear in any entry in manifest.json, along with the currently active profile.


Use --profile to temporarily override the active profile for a single command without changing settings.json:

Terminal window
devsync push --profile work
devsync pull --profile personal
devsync status --profile desktop

This is useful for testing or for pulling a specific profile on a shared machine.


  1. On your work machine, track work-specific files with --profile work:

    Terminal window
    devsync track ~/.gitconfig # global
    devsync track ~/.zshrc # global
    devsync track ~/.config/work-tool --profile work
    devsync track ~/.ssh/work-key --mode secret --profile work
  2. Set the active profile on the work machine:

    Terminal window
    devsync profile use work
  3. Push:

    Terminal window
    devsync push
  4. On your personal machine, set a different profile (or none):

    Terminal window
    devsync profile use personal
    devsync pull

    Only global entries (.gitconfig, .zshrc) are applied. Work-specific files are not written.


Profile-scoped entries are stored in a subdirectory named after the profile inside the sync directory:

~/.config/devsync/sync/
├── manifest.json
├── default/ ← global entries
│ ├── .gitconfig
│ └── .zshrc
└── work/ ← work profile entries
├── .config/
│ └── work-tool/
└── .ssh/
└── work-key.devsync.secret