Share Guard Profiles
Create reusable guardrails, share them with a single command, and let others install with one line. Semver ensures updates never surprise you.
Three ways to share:
- Cloud —
savants guard share→ anyone installs with@you/profile-name - URL — host a JSON file anywhere, install from any URL
- Community — open a PR to the savants repo for curated profiles
Create a Profile
A guard profile is a JSON array of DSL rules. Create one in ~/.savants/custom-profiles/:
mkdir -p ~/.savants/custom-profiles
cat > ~/.savants/custom-profiles/my-team-rules.json << 'EOF'
[
"when tool eq 'Bash' and command contains 'rm -rf /' then block",
"when tool eq 'Bash' and command contains 'DROP TABLE' then block",
"when tool eq 'Bash' and command contains 'force push' then ask 'Are you sure?'",
"when tool eq 'Write' and file_path contains '.env' then block"
]
EOF Activate it locally:
savants guard preset standard+my-team-rules Share to the Cloud
One command publishes your profile so anyone can install it:
# First time: connect your account
savants connect
# Share your profile
savants guard share my-team-rules --version 1.0.0
# Output:
# Shared! Install with: savants guard install @yourname/my-team-rules Publish updates with bumped versions:
# Added new rules (minor bump)
savants guard share my-team-rules --version 1.1.0
# Changed suggest to block (major bump — breaking)
savants guard share my-team-rules --version 2.0.0 Install a Profile
# Install latest version
savants guard install @acme/backend-safe
# Pin to exact version
savants guard install @acme/[email protected]
# Accept patches and minors on the next 'update' run
savants guard install @acme/backend-safe@^1
# Accept patches only on the next 'update' run
savants guard install @acme/backend-safe@~1.2
# Install from a URL
savants guard install https://gist.githubusercontent.com/.../rules.json
# Install a built-in community profile
savants guard install nixos-safe Then activate it alongside your existing preset:
savants guard preset standard+cloud-safe Versioning (Semver)
Guard profiles follow semantic versioning so updates never surprise you:
| Bump | Example | What changed | Auto-updates? |
|---|---|---|---|
| Patch | 1.0.0 → 1.0.1 | Wording changes, no behavior change | Yes |
| Minor | 1.0.0 → 1.1.0 | New rules added, existing rules unchanged | Yes (with ^1) |
| Major | 1.0.0 → 2.0.0 | Rules removed, actions changed (suggest → block) | Never |
Why this matters: If a profile author changes a suggest to a block, your agent could suddenly stop mid-task. Major version bumps require you to explicitly opt in.
Updating an installed profile
There is no background auto-update. A profile changes when you run a command that changes it — which is the behaviour a guard tool should have, and we would rather document the narrow true version than the broad false one.
# See what would change, without changing it
savants guard update --check
# Update the profiles in your active preset
savants guard update
# Pin a CLOUD profile to an exact version
savants guard pin @acme/backend-safe 1.2.0
# Roll a CLOUD profile back to its previous version
savants guard rollback @acme/backend-safe Pin and rollback work on cloud profiles only
(@owner/name). They read ~/.savants/profiles.lock,
and only a cloud install writes an entry there — a community profile
or a built-in preset has no lock entry, so passing one of those names
exits with an error.
The Lock File
Installed profiles are tracked in ~/.savants/profiles.lock:
{
"@acme/backend-safe": {
"version": "1.2.0",
"pinned": "^1",
"installed": "2026-07-05",
"previous": "1.1.0"
},
"nixos-safe": {
"version": "1.0.0",
"pinned": "1.0.0",
"installed": "2026-07-05"
}
} Commit this file to your repo to share the same profile versions across your team.
Browse profiles
savants guard browse lists cloud profiles
published to savants.cloud. The registry is new, so today it returns
nothing:
savants guard browse
# No profiles found. The profiles that ship with the binary are a different set and are
always available offline. savants guard profiles lists them.
Contribute a Community Profile
Community profiles ship with Savants and don't require a cloud account to use. To add one:
- Create a JSON file with your rules
- Name it descriptively:
tool-safe.jsonorworkflow-safe.json - Open a PR to
packages/guard-profiles/community/in the savants repo
Community vs Cloud: Community profiles are bundled in the binary — always available offline. Cloud profiles (@user/name) require internet on first install but are cached locally after.
Example: Team Onboarding
Share your team's guardrails in your repo README:
# Install Savants + team guardrails
curl -fsSL savants.sh | sh
savants guard install @acme/backend-safe@^2
savants guard preset standard+backend-safe
# Done. Every developer on the team now has the same safety rules. Three lines in your README. New developers get the same guardrails as everyone else, automatically kept in sync.
Sync Across Machines
Keep your guard rules in sync across all your machines using savants guard sync:
# Push your current rules to the cloud
savants guard sync push
# Pull the latest rules onto another machine
savants guard sync pull
# Check sync status
savants guard sync status Auto-sync: Guard rules automatically sync every 5 minutes when a hook is invoked. You only need manual push/pull for immediate sync or initial setup on a new machine.
This is separate from profile sharing. sync keeps your personal rule set (including custom rules and preset selections) identical across your laptop, desktop, and CI environments.