Skip to content

Platform Commands ​

The astonish platform command manages multi-tenant platform operations — database initialization, organization management, and user administration.

Usage ​

bash
astonish platform <subcommand> [flags]

Subcommands ​

Initialize Platform Database ​

bash
astonish platform init \
  --host <postgres-host> \
  --password <postgres-admin-password>

This creates the platform database and runs migrations. It prints the connection DSN for use in Helm values or config.

FlagDefaultEnv FallbackDescription
--host(required)PGHOSTPostgreSQL hostname
--port5432PGPORTPostgreSQL port
--userpostgresPGUSERPostgreSQL admin user
--password(required)PGPASSWORDPostgreSQL admin password
--sslmodepreferPGSSLMODESSL mode
--suffixauto-generated—Fixed instance suffix

Generate Secret ​

bash
astonish platform gen-secret

Generates a cryptographically secure random secret (64-character hex string) suitable for use as masterKey or jwtSecret.

Platform Status ​

bash
astonish platform status

Displays organization count, user count, lists organizations with team counts, and shows the PostgreSQL version.

Organization Management ​

bash
# Create a new organization
astonish platform org create --name "Acme Corp" --slug acme-corp

# Create with an existing user as owner
astonish platform org create --name "Acme Corp" --slug acme-corp --owner-email admin@acme.com

# List all organizations
astonish platform org list

# Invite a user to an organization
astonish platform org invite \
  --org acme-corp \
  --email user@acme.com \
  --role member

# Invite with password prompt (instead of generated password)
astonish platform org invite \
  --org acme-corp \
  --email admin@acme.com \
  --role owner \
  --password

org create Flags ​

FlagDescription
--nameOrganization display name (required)
--slugURL-safe identifier (required)
--owner-emailSet an existing user as org owner

org invite Flags ​

FlagDescription
--orgOrganization slug (required)
--emailUser's email address (required)
--roleRole: owner, admin, member (default: member)
--nameDisplay name for new users
--teamAlso add to this team (default: general)
--passwordPrompt for password instead of generating one

User Management ​

bash
# List all users (optionally filter by org)
astonish platform user list [--org <slug>]

# Show user details
astonish platform user show <email>

# Delete a user
astonish platform user delete <email>

# Set a user's password interactively
astonish platform user set-password <email>

# Disable/enable a user account
astonish platform user disable <email>
astonish platform user enable <email>

# Promote/demote platform superadmin
astonish platform user promote <email>
astonish platform user demote <email>

Issue Access Token ​

bash
# Interactive browser-based login
astonish platform issue-token --server https://astonish.example.com --sso

# Direct password authentication
astonish platform issue-token \
  --server https://astonish.example.com \
  --email admin@example.com \
  --password

# Output as JSON
astonish platform issue-token --server https://astonish.example.com --json

Sandbox Audit ​

bash
astonish platform sandbox-audit

Audits sandbox PVCs for orphaned data.

Roles ​

RolePermissions
ownerFull org control, manage all members and teams
adminManage members, teams, settings
memberUse agents, view team resources