CLI Reference

The AuthBoundry CLI helps you initialize, integrate, and manage your authority system.

Installation

npm install -g @authboundry/cli

Commands

authboundry init

Initialize AuthBoundry in a project.

authboundry init

Creates:

  • authboundry.config.json - Configuration file
  • .authboundry/ - Local state directory
  • .authboundryignore - Files to ignore

authboundry attach

Connect your application to AuthBoundry.

authboundry attach --upstream http://localhost:3001

Parameters:

  • --upstream - Your application's server URL
  • --port - Port for AuthBoundry to listen on (default: 3000)
  • --name - Application name

authboundry discover

Discover capabilities from your application.

authboundry discover

Analyzes your application's routes and handlers to identify capabilities.

authboundry status

View the current authority model status.

authboundry status

Shows:

  • Connected application
  • Discovered capabilities
  • Active policies
  • Active delegations

authboundry propose

Propose an authority model based on discovered capabilities.

authboundry propose

authboundry approve

Approve the proposed authority model.

authboundry approve [proposal-id]

authboundry policy

Manage policies.

authboundry policy create --principal alice --capability invoice.read

Subcommands:

  • create - Create a policy
  • list - List policies
  • view - View a policy
  • modify - Modify a policy
  • delete - Delete a policy

authboundry delegate

Manage delegations.

authboundry delegate create --from alice --to bob --capability invoice.approve --expires 2026-07-31

Subcommands:

  • create - Create a delegation
  • list - List delegations
  • view - View a delegation
  • revoke - Revoke a delegation

authboundry audit

Query the audit log.

authboundry audit --principal alice --capability invoice.refund --decision ALLOW

Parameters:

  • --principal - Filter by principal
  • --capability - Filter by capability
  • --decision - Filter by decision (ALLOW/DENY)
  • --start - Start date
  • --end - End date
  • --format - Output format (json/csv/table)

authboundry export

Export policies or audit logs.

authboundry export --type policies --format csv --output policies.csv

authboundry serve

Run the AuthBoundry server.

authboundry serve config.auth

Parameters:

  • config-file - Configuration file
  • --tenant - Tenant name(s)
  • --addr - Address to listen on
  • --port - Port to listen on

Global Flags

  • --help - Show help
  • --verbose - Verbose output
  • --config - Configuration file path

Common Workflows

Setup a New Application

authboundry init authboundry attach --upstream http://localhost:3001 authboundry discover authboundry status authboundry propose authboundry approve

Grant Authority to a User

authboundry policy create --principal alice --capability invoice.read

Delegate Authority Temporarily

authboundry delegate create \ --from alice \ --to bob \ --capability invoice.approve \ --expires 2026-07-31 \ --reason "Alice on vacation"

Audit a Principal's Activity

authboundry audit \ --principal alice \ --start 2026-09-01 \ --end 2026-09-30 \ --format csv

Next Steps