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.
The Problem Profiles Solve
Section titled “The Problem Profiles Solve”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.
Global Entries vs. Profile Entries
Section titled “Global Entries vs. Profile Entries”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.
# Global — synced on every machinedevsync track ~/.gitconfigdevsync track ~/.zshrc
# Work profile onlydevsync track ~/.config/work-vpn --profile work
# Desktop profile onlydevsync track ~/.config/gpu-settings --profile desktop
# Both work and linux profilesdevsync track ~/.config/some-tool --profile work --profile linuxSetting the Active Profile
Section titled “Setting the Active Profile”The active profile is stored in ~/.config/devsync/settings.json.
# Set active profile to "work"devsync profile use work
# Clear active profile (fall back to global-only)devsync profile useOnce the active profile is set, devsync push and devsync pull will include global entries plus entries assigned to the active profile.
Listing Profiles
Section titled “Listing Profiles”devsync profile listThis shows all profile names that appear in any entry in manifest.json, along with the currently active profile.
Overriding the Profile for a Single Run
Section titled “Overriding the Profile for a Single Run”Use --profile to temporarily override the active profile for a single command without changing settings.json:
devsync push --profile workdevsync pull --profile personaldevsync status --profile desktopThis is useful for testing or for pulling a specific profile on a shared machine.
Example: Work and Personal Setup
Section titled “Example: Work and Personal Setup”-
On your work machine, track work-specific files with
--profile work:Terminal window devsync track ~/.gitconfig # globaldevsync track ~/.zshrc # globaldevsync track ~/.config/work-tool --profile workdevsync track ~/.ssh/work-key --mode secret --profile work -
Set the active profile on the work machine:
Terminal window devsync profile use work -
Push:
Terminal window devsync push -
On your personal machine, set a different profile (or none):
Terminal window devsync profile use personaldevsync pullOnly global entries (
.gitconfig,.zshrc) are applied. Work-specific files are not written.
Profile Storage in the Repository
Section titled “Profile Storage in the Repository”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