Skip to content

Administration

Administration commands require the admin (or, for some operations, superuser) role.

Inviting is the usual way to add someone — the invitee sets their own password and the roles you name are applied at registration.

Terminal window
# Send an email invitation with roles pre-assigned
oi admin user invite send user@example.com -r member
# Generate a shareable invite link
oi admin user invite link -r member --max-uses 10
# List or revoke invitations
oi admin user invite list
oi admin user invite revoke <id>
Terminal window
# List users
oi admin user list
# Create a user directly — for seeding, scripted provisioning, or service
# accounts. Prefer an invitation for a person who has an inbox.
oi admin user create user@example.com -p 'Pass123@' -r member
# Add roles to a user
oi admin user role add user@example.com manager
# Grant or remove the admin role
oi admin user role promote user@example.com
oi admin user role demote user@example.com
Terminal window
# Install from the marketplace
oi app install @oikapi/crm
# Install a specific version
oi app install @oikapi/crm@1.2.0
# Install from a directory or a .oikapp file
oi app install ./my-app
oi app install ./my-app-1.0.0.oikapp
# Fork an app under a different name as a customizable template
oi app install @oikapi/crm --as my-crm

See Installing Apps for update, downgrade, and uninstall workflows.

Terminal window
# List permissions for a table
oi admin permission list --table customers
# Grant and revoke operations for a role
oi admin permission grant --table customers --role manager --operation read
oi admin permission revoke --table customers --role manager --operation delete
Terminal window
# Import records from a JSON file (array of record objects)
oi record import customers ./data/customers.json
# Control conflict handling
oi record import products ./data/products.json --on-conflict update
# Read from stdin
cat data.json | oi record import customers -
Terminal window
# Health check
oi api GET /health
# Current user info
oi api GET /api/auth/me