Skip to content

nself tenant

Tenant management: create, upgrade, suspend, destroy, audit.

nself tenant <subcommand> [flags] <slug-or-tenant-id>

nself tenant manages tenant lifecycle in multi-tenant ɳSelf deployments. Each tenant has a slug, a plan (basic, pro, elite, business, business-plus, enterprise), and an audit trail.

tenant create provisions a new tenant with a starting plan. tenant upgrade changes the plan in place. tenant suspend halts a tenant’s access while preserving data; a --reason is required so the audit trail explains why. tenant destroy is the hard-delete path and requires --confirm-name <slug> to proceed. tenant audit queries the per-tenant audit log, optionally filtered by --since time window and rendered as table or JSON.

Plans must match server-side validation. Pair this command with nself billing for usage and invoicing.

NameDescription
create <slug>Create a new tenant
upgrade <slug>Change a tenant’s plan
suspend <slug>Suspend a tenant
destroy <slug>Hard-delete a tenant (DESTRUCTIVE)
audit <tenant-id>Query tenant audit log
FlagDefaultDescription
--planbasicTenant plan: basic, pro, elite, business, business-plus, enterprise
FlagDefaultDescription
--plan""Target plan (required)
FlagDefaultDescription
--reason""Reason for suspension
FlagDefaultDescription
--confirm-name""Type the tenant slug to confirm destruction
FlagDefaultDescription
--since""Time window, e.g. 7d, 24h, 2w
--formattableOutput format: table or json
Terminal window
# Create a new tenant on the basic plan
nself tenant create acme-corp
# Create on the pro plan from the start
nself tenant create acme-corp --plan pro
# Upgrade to elite
nself tenant upgrade acme-corp --plan elite
# Suspend with an explicit reason
nself tenant suspend acme-corp --reason "non-payment 30d overdue"
# Destroy a tenant after explicit confirmation
nself tenant destroy acme-corp --confirm-name acme-corp
# Audit the last week
nself tenant audit acme-corp --since 7d
# Export audit log as JSON
nself tenant audit acme-corp --since 30d --format json

Commands | Home