Documentation
Machine Tags & Variables
Customize sync behavior per machine with tags and variables
Machine Identity
Each machine gets a unique ID auto-generated from its hostname, platform, architecture, and MAC address. This ID is used to track which machine pushed a snapshot and to target pulls.
Tags
Tags are labels you attach to a machine. They are used in template conditionals to customize config files per machine.
# Add tags
configsync machine tag add work
configsync machine tag add server
# Remove a tag
configsync machine tag remove server
# List tags
configsync machine tag list
Use tags in templates with the contains operator:
{{#if tags contains "work"}}
source ~/.work-env
{{/if}}
Variables
Machine variables are key-value pairs available in templates as {{vars.key}}.
# Set a variable
configsync machine var set git_email "sean@example.com"
# Get a variable
configsync machine var get git_email
# List all variables
configsync machine var list
[user]
email = {{vars.git_email}}
Variable Priority
When a profile is active and defines the same variable key, the profile variable takes priority over the machine variable. This lets you set machine-level defaults and override them per context.