CLI

CLI

The Fabrixly CLI (fab) lets you manage your Identity Server deployment from the terminal — create users, manage clients, rotate secrets, and more without touching the UI.


Installation

npm install -g @fabrixly/cli
# or
npx @fabrixly/cli

Verify installation:

fab --version
# Fabrixly CLI v1.0.0

Authentication

Configure the CLI to connect to your IDS instance — choose cloud or self-hosted:

# For Cloud SaaS
fab config set --url https://ids.fabrixly.com
# For Self-hosted
# fab config set --url https://auth.yourdomain.com

fab login
# Enter your admin email and password when prompted

Or use environment variables:

# For Cloud SaaS
export FAB_URL=https://ids.fabrixly.com
# For Self-hosted
# export FAB_URL=https://auth.yourdomain.com

export FAB_TOKEN=your-admin-api-token

User Management

# List all users
fab users list

# Create a new user
fab users create \
  --email user@example.com \
  --name "Jane Doe" \
  --password "SecurePass@123"

# Get a user
fab users get --email user@example.com

# Update a user
fab users update --email user@example.com --name "Jane Smith"

# Delete a user
fab users delete --email user@example.com

# Reset a user's password
fab users reset-password --email user@example.com

Client Management

# List all OAuth clients
fab clients list

# Create a new client (Authorization Code + PKCE)
fab clients create \
  --name "My Web App" \
  --type public \
  --redirect-uris "https://app.yourdomain.com/callback" \
  --scopes "openid profile email"

# Create a Machine-to-Machine client
fab clients create \
  --name "Backend Service" \
  --type confidential \
  --grant-types "client_credentials" \
  --scopes "api:read api:write"

# Get client details (shows client_secret)
fab clients get --name "My Web App"

# Rotate client secret
fab clients rotate-secret --id <client-id>

# Delete a client
fab clients delete --id <client-id>

Organization Management

# List all organizations
fab orgs list

# Create an organization
fab orgs create --name "Acme Corp" --domain "acme.com"

# Add a user to an org
fab orgs add-member \
  --org "Acme Corp" \
  --email user@acme.com \
  --role "member"

# List members of an org
fab orgs list-members --org "Acme Corp"

# Remove a member
fab orgs remove-member \
  --org "Acme Corp" \
  --email user@acme.com

Token Operations

# Verify a token
fab token verify --token <access_token>

# Inspect token payload (decoded)
fab token inspect --token <access_token>

# Revoke a token
fab token revoke --token <refresh_token>

# List active sessions for a user
fab sessions list --email user@example.com

# Revoke all sessions for a user
fab sessions revoke-all --email user@example.com

System

# Check server health
fab health

# View current config
fab config show

# Run database migrations
fab db migrate

# Seed the database
fab db seed

# Create a database backup
fab db backup --output ./backup.sql

# Restore from backup
fab db restore --input ./backup.sql

Output Formats

# Default (table format)
fab users list

# JSON output
fab users list --format json

# CSV output
fab users list --format csv

# Quiet mode (IDs only)
fab users list --quiet

Next Steps

Subscribe to The Fabrixly Blog

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe