Where Does Sapling Store Its Config File?
Sapling keeps user config at ~/.config/sapling/sapling.conf on Linux, ~/Library/Preferences/sapling/ on Mac, %APPDATA%\sapling on Windows.
Last updated
Sapling documents its config locations per platform instead of making you guess. Linux uses ~/.config/sapling/sapling.conf. macOS uses ~/Library/Preferences/sapling/sapling.conf. Windows uses %APPDATA%\sapling\sapling.conf.
You rarely need to open these directly. sl config --user ui.username "Name <mail>" writes to the right file on any OS, creating it when missing. Reach for the file itself when migrating machines or versioning your setup in a dotfiles repo.
Where Sapling stores this, by platform
~/.config/sapling/sapling.conf
Honors $XDG_CONFIG_HOME when set. Repo-level overrides live in .sl/config inside each checkout.
~/Library/Preferences/sapling/sapling.conf
Note the Preferences location rather than Application Support. Find it fast with sl configfile --user.
%APPDATA%\sapling\sapling.conf
In PowerShell, note that sl collides with the Set-Location alias, so invoke sl.exe by full path or reassign the alias first.
Frequently asked questions
How do I find my Sapling config file?
Run sl configfile --user. It prints the exact user config path for your platform, which is the authoritative answer when installers or env vars have moved things.
How do user, repo and system configs interact?
Three levels: user, repo and system. sl config --user edits your file, --local edits .sl/config in the current repo, --system edits the machine-wide file. Local beats user, system loses to both.
Notice an outdated path? Let us know.