Tenants are isolated environments within a workspace, each with their own infrastructure, data, and configuration. The CLI provides full lifecycle management for tenants and their backups.
Tenant commands require a workspace ID, either from your profile or via the -w flag. Most tenant commands identify tenants by their name (e.g., t1234-abcd-xyz1), not a numeric ID.
CRUD
List Tenants
Use -o json for the full JSON response.
Get Tenant Details
Create a Tenant
| Argument / Flag | Description |
|---|
display | Display name (required, positional) |
-d | Description |
--license | License tier: tier1 (default), tier2, tier3 |
--cluster_id | Cluster ID (required for tier2/tier3) |
--platform_id | Platform ID to use |
--domain | Custom domain |
--ephemeral | Mark tenant as ephemeral (allows push operations) |
--[no-]ingress | Enable/disable ingress (default: enabled) |
--[no-]tasks | Enable/disable background tasks (default: enabled) |
-w | Workspace ID |
-o | Output format: summary or json |
Edit a Tenant
Additional flags: --domain, --proxy, --[no-]ingress, --[no-]tasks, --[no-]rbac.
Delete a Tenant
Add -f to skip the confirmation prompt.
Deleting a tenant destroys all associated infrastructure and data. This cannot be undone.
Impersonate
Open a tenant’s dashboard in your browser, or retrieve the impersonation URL for scripting.
Print the URL without opening the browser:
Output credentials as JSON:
Pull & Push
You can pull a tenant’s content down as local XanoScript files, or push local files to a tenant. This works the same way as workspace pull & push, but targets a specific tenant.
Pull a Tenant
| Flag | Description |
|---|
-t | Tenant name (required) |
--env | Include environment variables |
--records | Include database records |
--draft | Include draft versions of resources |
-w | Workspace ID |
Push to a Tenant
| Flag | Description |
|---|
-t | Tenant name (required) |
--no-records | Skip importing table records |
--no-env | Skip overwriting environment variables |
--truncate | Truncate all table records before importing |
-w | Workspace ID |
Deployments
Deploy a Release
Deploy a release to a tenant by name:
Tenant License
Tenant Environment Variables
Manage environment variables on a per-tenant basis.
List Env Var Keys
Get a Single Env Var
Set an Env Var
Delete an Env Var
Export All Env Vars
Export all environment variables to a YAML file:
Import All Env Vars
Import environment variables from a YAML file (replaces existing):
Tenant Backups
List Backups
Use --page for pagination.
Create a Backup
Restore from a Backup
You’ll be asked to confirm before the restore proceeds. Use -f to skip confirmation.
Restoring a backup replaces the current tenant data entirely.
Export a Backup
Download a backup as a .tar.gz file:
Specify a custom output path with --output:
Import a Backup
Import a backup file into a tenant:
Delete a Backup
Add -f to skip the confirmation prompt.
Clusters
Manage tenant clusters for multi-tenant deployments.
List Clusters
Get Cluster Details
Create a Cluster
| Flag | Description |
|---|
--name | Cluster name (required) |
--credentials_file | Path to kubeconfig YAML file |
--type | Cluster type (e.g., run) |
-d | Description |
Edit a Cluster
Delete a Cluster
Add -f to skip the confirmation prompt.
Cluster License (Kubeconfig)