Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Command-Line Reference

Audience: operators and integrators driving Aperture from a shell.

aperture — Fine-grained access control engine. This page is generated from the urfave/cli command tree in internal/cli (cli.NewApp); every command, subcommand, and flag below is read from the live definitions.

Global flags

aperture declares no persistent global flags. The commonly shared options — --seed, --store, --account, and --principal (the acting principal on mutations, sourced from APERTURE_PRINCIPAL) — are defined per command and appear in each command’s flag table below.

Commands

CommandSummary
bestowBestow (delegate) a grant you hold to another principal
bulkProvision or deprovision many grants in one transactional call
checkDecide whether a principal may take an action on an object
deleteDelete an entity (object-type|permission|principal|role|group|account|grant|membership)
enumerateList the objects a principal may act on
explainExplain why a decision resolved the way it did
exportExport the whole model to a single JSON/YAML state file (system-admin tier)
getRead one entity by id (object-type|permission|principal|role|group|account|grant)
identifiersList all valid instance ids of an object type from its provider
impersonateStart a time-boxed impersonation session (prints the session)
importApply a JSON/YAML state file as an idempotent transactional upsert (system-admin tier)
listList entities of a kind (object-types|permissions|principals|roles|groups|accounts|grants)
mcpServe the read-only Aperture MCP surface over stdio
putCreate or update an entity (object-type|permission|principal|role|group|account|membership|grant)
revokeRevoke a grant you previously bestowed
serveRun the Aperture HTTP server
templateManage and apply provisioning templates

aperture bestow

Bestow (delegate) a grant you hold to another principal

aperture bestow [options]
NameAliasesTypeDefaultUsage
--delegatorstringprincipal bestowing the grant (env: APERTURE_PRINCIPAL) (required)
--filestringpath to a JSON grant body
--jsonstringgrant body as inline JSON
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture bulk

Provision or deprovision many grants in one transactional call

aperture bulk <command>

aperture bulk grant

Apply many grants atomically (account-admin tier)

aperture bulk grant [options]
NameAliasesTypeDefaultUsage
--accountstringactive account (required for system-tier authority resolution)
--filestringpath to a JSON array of grant bodies
--jsonstringa JSON array of grant bodies
--principalstringauthenticated principal performing the mutation (env: APERTURE_PRINCIPAL)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture bulk revoke

Delete many grants atomically (account-admin tier)

aperture bulk revoke [options] [<grant-id>...]
NameAliasesTypeDefaultUsage
--accountstringactive account (required for system-tier authority resolution)
--grantstringgrant id to revoke (repeatable)
--principalstringauthenticated principal performing the mutation (env: APERTURE_PRINCIPAL)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture check

Decide whether a principal may take an action on an object

aperture check [options] <principal> <action> <object>
NameAliasesTypeDefaultUsage
--accountstring"acme"active account the decision is scoped to
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture delete

Delete an entity (object-type|permission|principal|role|group|account|grant|membership)

aperture delete [options] <kind> [<id>]
NameAliasesTypeDefaultUsage
--accountstringactive account (required for system-tier authority resolution)
--account-idstringmembership account id (kind=membership)
--principalstringauthenticated principal performing the mutation (env: APERTURE_PRINCIPAL)
--principal-idstringmembership principal id (kind=membership)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture enumerate

List the objects a principal may act on

aperture enumerate [options] <principal> <action> <pattern>
NameAliasesTypeDefaultUsage
--accountstring"acme"active account the enumeration is scoped to
--limitint0cap the number of returned object ids (<=0 means the default)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture explain

Explain why a decision resolved the way it did

aperture explain [options] <principal> <action> <object>
NameAliasesTypeDefaultUsage
--accountstring"acme"active account the decision is scoped to
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture export

Export the whole model to a single JSON/YAML state file (system-admin tier)

aperture export [options]
NameAliasesTypeDefaultUsage
--accountstringactive account (required for system-tier authority resolution)
--formatstringoutput format: json (default) or yaml
--outstringwrite the state file to this path (default: stdout)
--principalstringauthenticated principal performing the mutation (env: APERTURE_PRINCIPAL)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture get

Read one entity by id (object-type|permission|principal|role|group|account|grant)

aperture get [options] <kind> <id>
NameAliasesTypeDefaultUsage
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture identifiers

List all valid instance ids of an object type from its provider

aperture identifiers [options] <object_type>
NameAliasesTypeDefaultUsage
--excludestringid to omit from the result (repeatable); expands an exclusive allowance
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture impersonate

Start a time-boxed impersonation session (prints the session)

aperture impersonate [options]
NameAliasesTypeDefaultUsage
--accountstringactive account (required)
--modestring"augment"augment|become
--operatorstringoperator principal (env: APERTURE_PRINCIPAL) (required)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)
--targetstringtarget principal to impersonate (required)

aperture import

Apply a JSON/YAML state file as an idempotent transactional upsert (system-admin tier)

aperture import [options]
NameAliasesTypeDefaultUsage
--accountstringactive account (required for system-tier authority resolution)
--filestringpath to the JSON/YAML state file (default: stdin, treated as JSON)
--principalstringauthenticated principal performing the mutation (env: APERTURE_PRINCIPAL)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture list

List entities of a kind (object-types|permissions|principals|roles|groups|accounts|grants)

aperture list [options] <kind>
NameAliasesTypeDefaultUsage
--accountstringaccount to list grants for (required for kind=grant)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture mcp

Serve the read-only Aperture MCP surface over stdio

Exposes Aperture’s decision API (check/enumerate/explain, single + bulk), a read-only what-if simulator, and model inspection as MCP tools over stdio. No tool mutates. Intended to be spawned over stdio by an MCP client.

aperture mcp [options]
NameAliasesTypeDefaultUsage
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture put

Create or update an entity (object-type|permission|principal|role|group|account|membership|grant)

aperture put [options] <kind>
NameAliasesTypeDefaultUsage
--accountstringactive account (required for system-tier authority resolution)
--filestringpath to a JSON entity body
--jsonstringentity body as inline JSON
--principalstringauthenticated principal performing the mutation (env: APERTURE_PRINCIPAL)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture revoke

Revoke a grant you previously bestowed

aperture revoke [options]
NameAliasesTypeDefaultUsage
--delegatorstringprincipal revoking the grant (env: APERTURE_PRINCIPAL) (required)
--grantstringid of the grant to revoke (required)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture serve

Run the Aperture HTTP server

aperture serve [options]
NameAliasesTypeDefaultUsage
--addrstring":8080"TCP address to listen on
--authstringauthenticator adapter: dev|oidc|parsec (overrides APERTURE_AUTH_MODE; defaults to dev — bearer is the principal id, no external IdP) (env: APERTURE_AUTH_MODE)
--enforce-membershipbooldeny any decision whose principal is not a member of the active account, before grants are consulted (defence-in-depth; lets shared roles be reused across accounts safely) (env: APERTURE_ENFORCE_MEMBERSHIP)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture template

Manage and apply provisioning templates

aperture template <command>

aperture template apply

Apply a template transactionally into –account (account-admin tier)

aperture template apply [options]
NameAliasesTypeDefaultUsage
--accountstringactive account (required for system-tier authority resolution)
--id-prefixstringprefix for generated grant ids
--namestringtemplate name to apply (required)
--paramstringparameter as name=value (repeatable)
--principalstringauthenticated principal performing the mutation (env: APERTURE_PRINCIPAL)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)
--versionint0template version (0 = latest)

aperture template delete

Delete a template version, or all versions (system-admin tier)

aperture template delete [options] <name>
NameAliasesTypeDefaultUsage
--accountstringactive account (required for system-tier authority resolution)
--principalstringauthenticated principal performing the mutation (env: APERTURE_PRINCIPAL)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)
--versionint0template version to delete (0 = all versions of the name)

aperture template get

Read a template by name (latest version unless –version)

aperture template get [options] <name>
NameAliasesTypeDefaultUsage
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)
--versionint0template version (0 = latest)

aperture template list

List every template version

aperture template list [options]
NameAliasesTypeDefaultUsage
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)

aperture template put

Create or update a template (system-admin tier)

aperture template put [options]
NameAliasesTypeDefaultUsage
--accountstringactive account (required for system-tier authority resolution)
--filestringpath to a JSON template body
--jsonstringtemplate body as inline JSON
--principalstringauthenticated principal performing the mutation (env: APERTURE_PRINCIPAL)
--seedstringpath to a JSON/YAML seed model (defaults to the embedded example)
--storestringsqlite DSN for the backing store (defaults to in-memory)