Variables¶
A variable is a named value you can use in any file Aegis delivers. Write
{{ aegis.STAGING_URL }} in a file, and Aegis puts in the value when it delivers the file. Change
the value once on the Variables page, and every file that uses it picks up the change on the next
sync.
Variables needs the editor level.
Adding a variable¶
Choose + Add variable and fill in:
- a name in capitals, digits and underscores, starting with a letter, such as
STAGING_URLorSENTRY_TOKEN - the kind: Cleartext or Secret
- the value
- optionally, a description of what it's for
Cleartext and secret¶
A cleartext variable is for values that are fine to have on a developer's computer, such as a URL or a company name. Aegis writes its value into the delivered file.
A secret variable is for credentials, such as an API token for an MCP server. Its value is never
written to a developer's disk. Instead, when Claude Code starts the MCP server that needs it, the
aegis command fetches the value and hands it straight to that server. Secret values are stored
encrypted, and nobody can read one back from Aegis after saving it, not even an administrator.
You can replace or delete a secret.
Where a secret can go¶
Because a secret is never written into a file, it only works in one place: as the whole value of
an env entry on an MCP server that Claude Code starts with a command. For example:
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": ["-y", "@sentry/mcp-server@latest"],
"env": { "SENTRY_AUTH_TOKEN": "{{ aegis.SENTRY_TOKEN }}" }
}
}
}
Saving a file that uses a secret anywhere else is refused, with a message naming the variable and the line.
Cleartext variables work anywhere.
What you see in the editors¶
The admin UI always shows the {{ aegis.NAME }} placeholder, never the value. That's also what's
saved in your organisation's history, so changing a value doesn't create a change to every file
that uses it.
If a file uses a name that doesn't exist, it's delivered with the placeholder left in, and the sync still succeeds. You can create the variable after the file that uses it.
Backups¶
Backups include variable values, secrets too, inside the encrypted archive. They're restored with everything else. See Backup and restore.