Skip to content

CLI Reference

Run a command with scoped, short-lived cloud credentials.

Terminal window
tryaudex run [OPTIONS] -- <COMMAND>...
FlagDescriptionDefault
--allow <ACTIONS>Comma-separated IAM/permission actions (required)
--profile <NAME>Named policy profile (e.g. “s3-readonly”)None
--ttl <DURATION>Session time-to-live15m
--budget <USD>Advisory budget limit in USDNone
--resource <ARNS>Comma-separated resource ARNs to restrict*
--provider <PROVIDER>Cloud provider: aws, gcp, azure, vaultaws
--role-arn <ARN>IAM role ARN (AWS) or service account email (GCP)$AUDEX_ROLE_ARN
--service-account <EMAIL>GCP service account email$AUDEX_GCP_SERVICE_ACCOUNT
--subscription <ID>Azure subscription ID$AZURE_SUBSCRIPTION_ID
--region <REGION>AWS region for STS$AWS_REGION
--notify <URL>Webhook URL for notificationsNone
Terminal window
# Basic S3 read access
tryaudex run --allow "s3:GetObject,s3:ListBucket" -- aws s3 ls
# With budget cap
tryaudex run --ttl 15m --budget 5 \
--allow "lambda:UpdateFunctionCode" -- ./deploy.sh
# Using a profile
tryaudex run --profile s3-readonly -- aws s3 ls
# GCP example
tryaudex run --provider gcp --allow "storage.objects.get" -- gsutil ls
# Azure example
tryaudex run --provider azure --allow "Microsoft.Storage/storageAccounts/read" \
-- az storage account list

Run a multi-step workflow with progressively scoped credentials per step.

Terminal window
tryaudex chain --step <ACTIONS> --step <ACTIONS> -- <COMMAND>...
FlagDescriptionDefault
--step <ACTIONS>IAM actions for this step (repeat for each step, required)
--ttl <DURATION>TTL per step5m
--provider <PROVIDER>Cloud provider (aws, gcp, azure)aws
--fail-fastStop on first failuretrue
--jsonOutput results as JSONFalse
Terminal window
# Deploy: read from S3, then invoke Lambda
tryaudex chain \
--step "s3:GetObject" \
--step "lambda:InvokeFunction" \
-- ./deploy.sh

Each step runs with its own credentials and session, scoped to exactly what that step needs.


List and inspect credential sessions.

Terminal window
tryaudex sessions [COMMAND]
CommandDescription
list [--status STATUS]List all sessions, optionally filtered by status
show <SESSION_ID>Show details of a specific session
kill <SESSION_ID>Revoke a session manually

active, completed, failed, expired, revoked, budget_exceeded

Terminal window
# List all sessions
tryaudex sessions list
# Filter by status
tryaudex sessions list --status active
# Show a specific session
tryaudex sessions show a1b2c3d4e5f6
# Revoke a session
tryaudex sessions kill a1b2c3d4e5f6

View the append-only audit trail of all sessions and events.

Terminal window
tryaudex audit [COMMAND]
CommandDescription
show <SESSION_ID>Show all events for a session
recent [--limit N]Show recent audit entries
pathPrint the audit log file path
export <FORMAT>Export audit log (json, csv) for compliance
Terminal window
# Show audit entries for a session
tryaudex audit show a1b2c3d4
# Show recent entries
tryaudex audit recent --limit 50
# Export for compliance
tryaudex audit export json > audit.json

Convert natural language to IAM permissions using Claude API.

Terminal window
tryaudex intent "<DESCRIPTION>"
FlagDescription
--api-key <KEY>Anthropic API key (or $ANTHROPIC_API_KEY)
--model <MODEL>Claude model to use (default: claude-opus)
Terminal window
# Convert natural language to permissions
tryaudex intent "I need to read from S3 and invoke a Lambda"
# Output:
# {
# "allow": "s3:GetObject,lambda:InvokeFunction",
# "resource": null,
# "description": "Read objects from S3 and invoke Lambda functions"
# }

Learn minimum IAM permissions by observing CloudTrail during command execution.

Terminal window
tryaudex learn -- <COMMAND>...
FlagDescription
--ttl <DURATION>Session TTL (default: 15m)
--role-arn <ARN>IAM role with broad permissions for learning
Terminal window
# Observe what S3 operations a script actually uses
tryaudex learn -- ./my-script.sh
# Output shows the minimum IAM policy needed:
# s3:GetObject,s3:ListBucket,s3:HeadObject

CloudTrail has a ~5 minute delay, so this is best for longer-running operations.


Estimate potential cost before issuing credentials.

Terminal window
tryaudex estimate [OPTIONS]
FlagDescription
--allow <ACTIONS>IAM actions to estimate cost for
--region <REGION>AWS region for pricing data
--ttl <DURATION>Estimated session duration
Terminal window
tryaudex estimate --allow "s3:GetObject" --ttl 1h
# Output: Estimated cost: $0.002 for S3 operations

Export audit trail as SOC2/ISO 27001 compliance reports.

Terminal window
tryaudex compliance [OPTIONS]
FlagDescription
--format <FORMAT>Report format: soc2, iso27001, cis
--since <DATE>Start date for report (YYYY-MM-DD)
--until <DATE>End date for report (YYYY-MM-DD)
--output <FILE>Output file path
Terminal window
tryaudex compliance --format soc2 --since 2024-01-01 --output soc2-report.pdf

Interactive TUI dashboard for monitoring sessions and audit trails. See Dashboard for full details.

Terminal window
tryaudex dashboard
# or simply: tryaudex

Run health checks on Audex configuration, credential stores, and cloud connectivity.

Terminal window
tryaudex health [OPTIONS]
FlagDescription
--check <NAME>Run a specific check (config, credentials, cloud, all)
--verboseShow detailed output
Terminal window
tryaudex health
# Checks: config file, credential store, AWS/GCP/Azure connectivity, etc.
tryaudex health --check aws
# Check only AWS STS connectivity

Serve Prometheus metrics or print metrics once.

Terminal window
tryaudex metrics [OPTIONS]
FlagDescription
--serve <ADDR>Serve metrics on this address (e.g. “localhost:9090”)
--oncePrint metrics once and exit
Terminal window
# Serve Prometheus metrics on port 9090
tryaudex metrics --serve localhost:9090
# Print once
tryaudex metrics --once

Metrics include: sessions created, credentials issued, budget spent, API latencies, etc.


Replay the full timeline of a past session from the audit log.

Terminal window
tryaudex replay <SESSION_ID>
Terminal window
tryaudex replay a1b2c3d4
# Output shows:
# 00:00 -- SessionCreated: role=arn:aws:iam::123456789:role/AudexRole, actions=s3:GetObject
# 00:01 -- CredentialsIssued: access_key=ASIA..., expires_at=2024-01-01T12:16:00Z
# 00:15 -- SessionEnded: status=completed, exit_code=0, duration=15m

Watch live API calls for an active session via CloudTrail.

Terminal window
tryaudex watch <SESSION_ID>
Terminal window
# In one terminal, start a session:
tryaudex run --allow "s3:*" -- my-script.sh
# In another, watch it (replace SESSION_ID with the one from above):
tryaudex watch a1b2c3d4
# Shows real-time CloudTrail events:
# s3:GetObject -- bucket=my-bucket, key=data.json
# s3:ListBucket -- bucket=my-bucket

CloudTrail has a ~1 minute delay.


Clear sessions, audit logs, or all local data.

Terminal window
tryaudex clean [OPTIONS]
FlagDescription
--sessionsDelete all session files
--auditDelete the audit log
--allDelete everything (sessions, audit, config)
--before <DATE>Only delete entries before this date
Terminal window
# Delete completed sessions
tryaudex clean --sessions
# Delete audit log
tryaudex clean --audit
# Delete everything
tryaudex clean --all
# Delete entries older than 30 days
tryaudex clean --before 2024-01-01

Run centralized HTTP API server for team credential issuance. See Team Mode for full details.

Terminal window
tryaudex server [OPTIONS]
FlagDescription
--listen <ADDR>Server address (default: localhost:8080)
--config <FILE>Server configuration file
--enable-ssoEnable SAML/OIDC authentication
--enable-approvalsRequire multi-party approvals
Terminal window
tryaudex server --listen 0.0.0.0:8080 --enable-sso --enable-approvals

Start the MCP (Model Context Protocol) server for AI agent integration. See MCP Server for setup details.

Terminal window
tryaudex mcp

This starts a JSON-RPC server over stdin/stdout for use with Claude Code and other compatible clients.


VariableDescriptionUsed By
AUDEX_ROLE_ARNDefault IAM role ARN (AWS)run, chain
AUDEX_GCP_SERVICE_ACCOUNTDefault GCP service account emailrun
AUDEX_AZURE_SUBSCRIPTION_IDDefault Azure subscription IDrun
AUDEX_TENANT_IDDefault Azure tenant IDrun
AWS_REGIONAWS region for STS callsrun, chain
VAULT_ADDRHashiCorp Vault server addressrun (Vault provider)
VAULT_TOKENHashiCorp Vault authentication tokenrun (Vault provider)
ANTHROPIC_API_KEYAPI key for Claude (used by intent command)intent

TTL values use human-readable duration strings:

ExampleDuration
30s30 seconds
5m5 minutes
1h1 hour
2h30m2 hours 30 minutes

Maximum: 12 hours (cloud provider limit). Values exceeding this are silently clamped.


PathPurpose
~/.local/share/audex/sessions/Session JSON files
~/.local/share/audex/audit/Audit log (JSONL format)
~/.config/audex/config.tomlConfiguration file
~/.local/share/audex/keystore/Encrypted credential cache