Profiles

Separate configurations for work, personal, and other contexts

Creating Profiles

Terminal

configsync profile create work --env production --path ~/work --description "Work projects"

configsync profile create personal --env dev --path ~/personal

# Clone an existing profile

configsync profile create work-v2 --copy-from work

--env <env>Default environment for this profile
--path <dir>Directory associated with this profile (used for auto-detection)
--copy-from <profile>Copy settings from an existing profile
--description <text>Human-readable description

Switching Profiles

Terminal

# Switch active profile

configsync profile switch work

# View current profile

configsync profile show

# List all profiles

configsync profile list

# Delete a profile

configsync profile delete work-v2

Profile Paths

Associate directories with a profile for automatic detection. When you cd into a directory that matches a profile path, ConfigSync can auto-activate that profile.

Terminal

configsync profile set-path work ~/work

configsync profile set-path work ~/contracts

configsync profile remove-path work ~/contracts

Profile Variables

Profile variables are available in templates and override machine-level variables.

Terminal

configsync profile set-var work git_email "sean@company.com"

configsync profile set-var personal git_email "sean@personal.dev"

configsync profile unset-var work git_email

~
Profile variables take priority over machine variables in template rendering. Use them to customize configs per context.

Environment Overrides

Override specific environment variables when a profile is active. These are applied on top of parsed env file values.

Terminal

configsync profile set-env-override work DATABASE_URL "postgres://prod-host/db"

configsync profile unset-env-override work DATABASE_URL

Resolution Priority

ConfigSync resolves the active profile in this order (first match wins):

  1. --profile flag passed to the command
  2. CONFIGSYNC_PROFILE environment variable
  3. .configsync-profile file (walks up parent directories)
  4. ~/.configsync/active-profile global setting
  5. Path-based matching against profile paths