CLI reference
agility-bridge with no command (or stdio) serves MCP on stdin/stdout; agility-bridge serve runs the HTTP
server. The commands below manage a server: locally over its database (default) or remotely through the admin API
when AB_ADMIN_URL is set (guide). Output is JSON on stdout. Secrets are never arguments.
Write a new master key (0600) to the user configuration directory, never overwriting one.
agility-bridge init [--key-file <value>] [--version <value>] [--keychain <value>]| Name | Kind | Meaning |
|---|---|---|
--key-file |
string | Where to write it (default ~/.config/agility-bridge/master.key) |
--version |
string | Key version (default 1); a rotation needs one higher than the current key |
--keychain |
string | Store the new key in the OS keychain under this name instead of a file (never overwrites) |
Runs without a server.
doctor
Section titled “doctor”doctor
Section titled “doctor”Diagnose this setup without changing it: configuration, instance, keys, database and client files (read-only; --fix applies only the owner-only file modes it lists).
agility-bridge doctor [--check-token] [--offline] [--fix] [--json]| Name | Kind | Meaning |
|---|---|---|
--check-token |
flag | Also send one authenticated request to your instance to test the token (never printed) |
--offline |
flag | Make no network request |
--fix |
flag | Apply only the chmod repairs the report lists |
--json |
flag | Print the report as JSON |
Runs without a server.
keychain
Section titled “keychain”keychain set
Section titled “keychain set”Store a secret in the OS keychain (from –from-file, AB_KEYCHAIN_SECRET, standard input or a hidden prompt); refer to it as keychain:
agility-bridge keychain set <name> [--from-file <value>] [--for-url <value>]| Name | Kind | Meaning |
|---|---|---|
<name> |
argument | Entry name, or service/account (service defaults to agility-bridge) |
--from-file |
string | Read the secret from this 0600 file |
--for-url |
string | The instance address this token is for (https://…); the server then sends it to that host only |
Runs without a server.
keychain bind
Section titled “keychain bind”Bind an existing keychain entry to the instance it is for (also how you confirm a changed address): the server sends the token to that host only.
agility-bridge keychain bind <name> --for-url <value>| Name | Kind | Meaning |
|---|---|---|
<name> |
argument | Entry name, or service/account |
--for-url |
string, required | The instance address this token is for (https://…); the server then sends it to that host only |
Runs without a server.
keychain delete
Section titled “keychain delete”Remove an entry from the OS keychain.
agility-bridge keychain delete <name>| Name | Kind | Meaning |
|---|---|---|
<name> |
argument | Entry name, or service/account |
Runs without a server.
keychain status
Section titled “keychain status”Show which keychain this machine uses and whether it works; with –name, whether an entry exists (never its value).
agility-bridge keychain status [--name <value>]| Name | Kind | Meaning |
|---|---|---|
--name |
string | Entry name, or service/account |
Runs without a server.
config
Section titled “config”config export
Section titled “config export”Write instances, shared credentials, workspaces and service grants to a file; tokens only with –with-tokens (local, encrypted with a passphrase).
agility-bridge config export [--out <value>] [--with-tokens] [--passphrase-file <value>]| Name | Kind | Meaning |
|---|---|---|
--out |
string | New file to write (mode 0600, never overwritten); default: standard output |
--with-tokens |
flag | Include the shared credentials’ tokens, encrypted with a passphrase (needs –out and the local database) |
--passphrase-file |
string | Read the passphrase from this 0600 file (else AB_CONFIG_PASSPHRASE, standard input or a hidden prompt) |
Runs without a server.
config import
Section titled “config import”Add what a configuration file describes and the deployment lacks (additive; a dry run unless –apply; never changes or deletes anything that exists).
agility-bridge config import <file> [--apply] [--allow-sensitive] [--add-grants] [--passphrase-file <value>]| Name | Kind | Meaning |
|---|---|---|
<file> |
argument | A file written by config export |
--apply |
flag | Make the changes; without it only the plan is shown |
--allow-sensitive |
flag | Also create workspaces that enable writes or pass-through (review the plan first) |
--add-grants |
flag | Also add the file’s service grants that an existing workspace lacks (finishes a partly failed import) |
--passphrase-file |
string | Read the passphrase from this 0600 file (else AB_CONFIG_PASSPHRASE, standard input or a hidden prompt) |
Runs without a server.
client-config
Section titled “client-config”client-config
Section titled “client-config”Print the setup snippet (and install link where the client has one) for an MCP client: vscode, claude-code, claude-desktop, cursor, copilot-cli or windsurf; never holds a token.
agility-bridge client-config <client> [--url <value>] [--keychain <value>] [--pin] [--link]| Name | Kind | Meaning |
|---|---|---|
<client> |
argument | vscode, claude-code, claude-desktop, cursor, copilot-cli, windsurf |
--url |
string | Your instance address (default: a placeholder to replace) |
--keychain |
string | Refer to the token as keychain: |
--pin |
flag | Pin the package to this version instead of running the latest |
--link |
flag | Print only the install link (vscode and cursor) |
Runs without a server.
admin-token
Section titled “admin-token”admin-token
Section titled “admin-token”Print a new break-glass admin token for AB_ADMIN_TOKEN_FILE (shown once).
agility-bridge admin-tokenRuns without a server.
user list
Section titled “user list”List users.
agility-bridge user listLocal or remote.
user add
Section titled “user add”Add a user.
agility-bridge user add <email> [--role <value>] [--name <value>]| Name | Kind | Meaning |
|---|---|---|
<email> |
argument | Email address |
--role |
string | member (default), admin or owner |
--name |
string | Display name |
Local or remote.
user set-role
Section titled “user set-role”Change a user’s role.
agility-bridge user set-role <user-id> <role>| Name | Kind | Meaning |
|---|---|---|
<user-id> |
argument | User id |
<role> |
argument | member, admin or owner |
Local or remote.
user disable
Section titled “user disable”Disable a user.
agility-bridge user disable <user-id>| Name | Kind | Meaning |
|---|---|---|
<user-id> |
argument | User id |
Local or remote.
user enable
Section titled “user enable”Enable a disabled user again (their grants and device tokens that were not revoked work again).
agility-bridge user enable <user-id>| Name | Kind | Meaning |
|---|---|---|
<user-id> |
argument | User id |
Local or remote.
user unbind
Section titled “user unbind”Clear a user’s sign-in identity so they can sign in with another provider (owner; the next verified sign-in with their email binds the account).
agility-bridge user unbind <user-id> --confirm <value> [--to <value>] [--ttl-minutes <n>]| Name | Kind | Meaning |
|---|---|---|
<user-id> |
argument | User id |
--confirm |
string, required | The user’s current email address, typed again. Anyone who signs in with that verified email afterwards takes the account |
--to |
string | Only this provider may bind the account next: one this deployment configured (google, github, cf-access or oidc: |
--ttl-minutes |
int | How long –to lasts, in minutes (default 1440, at most 10080) |
Local or remote.
user end-sessions
Section titled “user end-sessions”End all of a user’s browser sessions (sign them out everywhere).
agility-bridge user end-sessions <user-id>| Name | Kind | Meaning |
|---|---|---|
<user-id> |
argument | User id |
Local or remote.
instance
Section titled “instance”instance list
Section titled “instance list”List Agility instances.
agility-bridge instance listLocal or remote.
instance add
Section titled “instance add”Add an Agility instance.
agility-bridge instance add <label> <url> [--ca-file <value>]| Name | Kind | Meaning |
|---|---|---|
<label> |
argument | Name for it |
<url> |
argument | The address you open Agility at, e.g. https://www7.v1host.com/YourInstance |
--ca-file |
string | PEM bundle of a private CA (Node only) |
Local or remote.
instance retarget
Section titled “instance retarget”Change an instance’s address or CA (owner; revokes its credentials and grants).
agility-bridge instance retarget <instance-id> <url> [--ca-file <value>]| Name | Kind | Meaning |
|---|---|---|
<instance-id> |
argument | Instance id |
<url> |
argument | The new address |
--ca-file |
string | PEM bundle of a private CA |
Local or remote.
instance delete
Section titled “instance delete”Delete an unused instance.
agility-bridge instance delete <instance-id>| Name | Kind | Meaning |
|---|---|---|
<instance-id> |
argument | Instance id |
Local or remote.
credential
Section titled “credential”credential list
Section titled “credential list”List credentials (never their tokens).
agility-bridge credential list [--instance <value>]| Name | Kind | Meaning |
|---|---|---|
--instance |
string | Only this instance |
Local or remote.
credential add
Section titled “credential add”Store a shared Agility token (from –from-file, AB_AGILITY_TOKEN, standard input or a hidden prompt).
agility-bridge credential add --instance <value> --label <value> [--from-file <value>]| Name | Kind | Meaning |
|---|---|---|
--instance |
string, required | Instance id |
--label |
string, required | Name, e.g. the service member |
--from-file |
string | Read the Agility token from this 0600 file |
Local or remote.
credential replace
Section titled “credential replace”Replace a credential’s token (it becomes unvalidated).
agility-bridge credential replace <credential-id> [--from-file <value>]| Name | Kind | Meaning |
|---|---|---|
<credential-id> |
argument | Credential id |
--from-file |
string | Read the Agility token from this 0600 file |
Local or remote.
credential validate
Section titled “credential validate”Ask Agility now whose token it is and what it can reach.
agility-bridge credential validate <credential-id>| Name | Kind | Meaning |
|---|---|---|
<credential-id> |
argument | Credential id |
Local or remote.
credential revoke
Section titled “credential revoke”Revoke a credential.
agility-bridge credential revoke <credential-id>| Name | Kind | Meaning |
|---|---|---|
<credential-id> |
argument | Credential id |
Local or remote.
credential delete
Section titled “credential delete”Delete an unused credential.
agility-bridge credential delete <credential-id>| Name | Kind | Meaning |
|---|---|---|
<credential-id> |
argument | Credential id |
Local or remote.
workspace
Section titled “workspace”workspace list
Section titled “workspace list”List workspaces.
agility-bridge workspace listLocal or remote.
workspace show
Section titled “workspace show”Show a workspace.
agility-bridge workspace show <workspace-id>| Name | Kind | Meaning |
|---|---|---|
<workspace-id> |
argument | Workspace id |
Local or remote.
workspace add
Section titled “workspace add”Create a workspace at /w/
agility-bridge workspace add <slug> --name <value> --instance <value> --project <value> [--children] [--default-credential <value>] [--tools a,b] [--asset-types-allow a,b] [--asset-types-deny a,b] [--max-rows <n>] [--quota-daily <n>] [--quota-monthly <n>] [--credential-source <value>]| Name | Kind | Meaning |
|---|---|---|
<slug> |
argument | URL name: lower-case letters, digits, hyphens |
--name |
string, required | Display name |
--instance |
string, required | Instance id |
--project |
string, repeatable, required | Allowed Agility project, Scope: |
--children |
flag | Include sub-projects |
--default-credential |
string | Shared credential for grants that name none |
--tools |
list | Enabled tools (default: every read tool) |
--asset-types-allow |
list | Only these asset types |
--asset-types-deny |
list | Never these asset types |
--max-rows |
int | Most rows per call |
--quota-daily |
int | Agility requests per UTC day for each grant (only lowers the server’s AB_QUOTA_DAILY) |
--quota-monthly |
int | Agility requests per UTC month for each grant (only lowers the server’s AB_QUOTA_MONTHLY) |
--credential-source |
string | stored (default) or passthrough: callers send their own Agility token (owner; needs AB_PASSTHROUGH=on) |
Local or remote.
workspace set
Section titled “workspace set”Change a workspace (only the options given).
agility-bridge workspace set <workspace-id> [--name <value>] [--project <value>] [--default-credential <value>] [--tools a,b] [--max-rows <value>] [--quota-daily <value>] [--quota-monthly <value>] [--credential-source <value>] [--writes <value>] [--write-approval <value>]| Name | Kind | Meaning |
|---|---|---|
<workspace-id> |
argument | Workspace id |
--name |
string | Display name |
--project |
string, repeatable | Replace the allowed projects (repeat) |
--default-credential |
string | Shared default credential |
--tools |
list | Enabled tools |
--max-rows |
string | Most rows per call (1-1000), or none; the other limits stay as they are |
--quota-daily |
string | Agility requests per UTC day for each grant (only lowers the server’s AB_QUOTA_DAILY), or none to remove it (removing or raising one needs an owner with a recent sign-in) |
--quota-monthly |
string | Agility requests per UTC month for each grant (only lowers the server’s AB_QUOTA_MONTHLY), or none to remove it (removing or raising one needs an owner with a recent sign-in) |
--credential-source |
string | stored (default) or passthrough: callers send their own Agility token (owner; needs AB_PASSTHROUGH=on) |
--writes |
string | on or off: whether write tools may be used in this workspace (owner, recent sign-in; the server needs AB_WRITE_TOOLS=on) |
--write-approval |
string | page_only: every write needs the approval page, or any (owner, recent sign-in) |
Local or remote.
workspace disable
Section titled “workspace disable”Disable a workspace.
agility-bridge workspace disable <workspace-id>| Name | Kind | Meaning |
|---|---|---|
<workspace-id> |
argument | Workspace id |
Local or remote.
workspace delete
Section titled “workspace delete”Delete a workspace, its grants and their tokens.
agility-bridge workspace delete <workspace-id>| Name | Kind | Meaning |
|---|---|---|
<workspace-id> |
argument | Workspace id |
Local or remote.
grant list
Section titled “grant list”List grants.
agility-bridge grant list [--workspace <value>]| Name | Kind | Meaning |
|---|---|---|
--workspace |
string | Only this workspace |
Local or remote.
grant add
Section titled “grant add”Grant a user (–user) or a labelled service (–service) access to a workspace.
agility-bridge grant add --workspace <value> [--user <value>] [--service <value>] [--credential <value>] [--tools a,b] [--project <value>] [--quota-daily <n>] [--quota-monthly <n>] [--expires-days <value>]| Name | Kind | Meaning |
|---|---|---|
--workspace |
string, required | Workspace id |
--user |
string | User id |
--service |
string | Label of a service grant (read-only) |
--credential |
string | Credential (default: the workspace’s shared default) |
--tools |
list | Only these tools |
--project |
string, repeatable | Only these of the workspace projects (repeat) |
--quota-daily |
int | Agility requests per UTC day for each grant (only lowers the server’s AB_QUOTA_DAILY) |
--quota-monthly |
int | Agility requests per UTC month for each grant (only lowers the server’s AB_QUOTA_MONTHLY) |
--expires-days |
string | Days until it expires, or never |
Local or remote.
grant update
Section titled “grant update”Change a grant (only the options given): its rate and hourly write limit, write approval, quota, tools, projects, end date (the API owner rules apply).
agility-bridge grant update <grant-id> [--rate-per-minute <value>] [--writes-per-hour <value>] [--write-approval <value>] [--credential <value>] [--tools a,b] [--project <value>] [--quota-daily <value>] [--quota-monthly <value>] [--expires-days <value>]| Name | Kind | Meaning |
|---|---|---|
<grant-id> |
argument | Grant id |
--rate-per-minute |
string | Requests a minute for this grant (1-100000), or none |
--writes-per-hour |
string | The grant’s own hourly write limit (1-1000; it can only lower the server’s), or none |
--write-approval |
string | page_only: its writes need the approval page (owner, recent sign-in), or any |
--credential |
string | Credential |
--tools |
list | Only these tools |
--project |
string, repeatable | Only these of the workspace projects (repeat) |
--quota-daily |
string | Agility requests per UTC day for each grant (only lowers the server’s AB_QUOTA_DAILY), or none to remove it (removing or raising one needs an owner with a recent sign-in) |
--quota-monthly |
string | Agility requests per UTC month for each grant (only lowers the server’s AB_QUOTA_MONTHLY), or none to remove it (removing or raising one needs an owner with a recent sign-in) |
--expires-days |
string | Days until it expires, or never |
Local or remote.
grant revoke
Section titled “grant revoke”Revoke a grant (and so all its tokens).
agility-bridge grant revoke <grant-id>| Name | Kind | Meaning |
|---|---|---|
<grant-id> |
argument | Grant id |
Local or remote.
grant delete
Section titled “grant delete”Delete a grant and its tokens.
agility-bridge grant delete <grant-id>| Name | Kind | Meaning |
|---|---|---|
<grant-id> |
argument | Grant id |
Local or remote.
token list
Section titled “token list”List a grant’s device tokens (never the tokens themselves).
agility-bridge token list <grant-id>| Name | Kind | Meaning |
|---|---|---|
<grant-id> |
argument | Grant id |
Local or remote.
token issue
Section titled “token issue”Issue a device token for one device (shown once).
agility-bridge token issue <grant-id> --label <value> [--expires-days <value>]| Name | Kind | Meaning |
|---|---|---|
<grant-id> |
argument | Grant id |
--label |
string, required | The device, e.g. laptop |
--expires-days |
string | Days until it expires, or never |
Local or remote.
token revoke
Section titled “token revoke”Revoke a device token.
agility-bridge token revoke <token-id>| Name | Kind | Meaning |
|---|---|---|
<token-id> |
argument | Token id |
Local or remote.
setup-link
Section titled “setup-link”setup-link
Section titled “setup-link”Issue a single-use link that makes whoever signs in with it the first owner (owner; needs AB_PUBLIC_URL and a sign-in provider).
agility-bridge setup-link [--ttl-minutes <n>]| Name | Kind | Meaning |
|---|---|---|
--ttl-minutes |
int | Minutes until it expires (default 60, at most 10080) |
Local or remote.
audit tail
Section titled “audit tail”Show the newest audit rows (oldest first).
agility-bridge audit tail [--limit <n>] [--kind <value>] [--workspace <value>]| Name | Kind | Meaning |
|---|---|---|
--limit |
int | How many (default 20, at most 1000) |
--kind |
string | tool_call, auth, admin or write |
--workspace |
string | Only this workspace id |
Local or remote.
backup
Section titled “backup”backup
Section titled “backup”Write a consistent copy of the database to a new 0600 file while the server runs (local).
agility-bridge backup <file>| Name | Kind | Meaning |
|---|---|---|
<file> |
argument | The new backup file (never overwritten) |
Local database only.
restore
Section titled “restore”restore
Section titled “restore”Check a backup and copy it to a new database file (stop the server first).
agility-bridge restore <backup> <target>| Name | Kind | Meaning |
|---|---|---|
<backup> |
argument | A file written by backup |
<target> |
argument | The new database file (never overwritten) |
Runs without a server.
keys status
Section titled “keys status”Credentials per master-key version (owner).
agility-bridge keys statusLocal or remote.
keys rotate
Section titled “keys rotate”Re-encrypt stored tokens with the current master key; resumable (local).
agility-bridge keys rotate --reason <value>| Name | Kind | Meaning |
|---|---|---|
--reason |
string, required | Why, for the audit log |
Local database only.
keys retire
Section titled “keys retire”Retire a master-key version no credential uses any more (owner).
agility-bridge keys retire <version> --reason <value>| Name | Kind | Meaning |
|---|---|---|
<version> |
argument | Key version, e.g. 1 |
--reason |
string, required | Why, for the audit log |
Local or remote.
agility-bridge is an unofficial, community project. It is not affiliated with, endorsed by, or supported by Digital.ai. Digital.ai, Agility and VersionOne are trademarks of their respective owners.