What is the Frontier CLI?
Frontier CLI is a unified command-line interface for:- Server Management - Start, configure, and manage Frontier server instances
- Database Operations - Run migrations and manage database schema
- Resource Management - Create and manage users, organizations, projects, and groups
- Authorization - Configure roles, permissions, and policies
- Development - Seed sample data and generate configuration files
Key Features
Server Commands
Manage your Frontier server with ease:- Initialize server configuration
- Start and run the server
- Perform database migrations
- Generate RSA keys for authentication
Resource Management
Full CRUD operations for all Frontier resources:- Users - Create, update, view, and list users
- Organizations - Manage organizations and their admins
- Projects - Handle project lifecycle within organizations
- Groups - Organize users into groups
- Service Users - Manage service accounts for API access
Authorization
Configure fine-grained access control:- Permissions - Define what actions can be performed
- Roles - Group permissions into roles
- Policies - Assign roles to users and resources
- Namespaces - Organize permissions by domain
Development Tools
- Seed Command - Bootstrap sample data for testing
- Config Management - Initialize and manage client configurations
- Preferences - Set platform-wide and resource-specific preferences
Command Structure
Frontier CLI follows a hierarchical command structure:Example Commands
Authentication
Most CLI commands require authentication via header flags. The authentication header is configured in your server config and typically looks like:<key>:<value> where the key is your configured identity proxy header.
The authentication header key is configured in your Frontier server configuration under
app.identity_proxy_header. Common values include X-Frontier-Email or X-Auth-Email.Configuration
The CLI can be configured using:- Configuration Files - Use
-cor--configflag to specify server config - Client Config - Initialize with
frontier config init - Environment Variables - See Environment Variables
Environment Variables
Directory where Frontier stores configuration files. Default:
$XDG_CONFIG_HOME/raystack or $HOME/.config/raystackSet to any value to disable ANSI color output
Set to
0 to disable ANSI colors in outputGetting Help
Get help for any command using the--help flag:
Help Topics
Frontier provides additional help topics:Common Workflows
Setting Up a New Frontier Instance
-
Initialize server configuration:
-
Run database migrations:
-
Start the server:
-
Seed sample data (optional):
Managing Users and Organizations
-
Create a user:
-
Create an organization:
-
Create a project in the organization:
Next Steps
Installation
Install the Frontier CLI on your system
Commands Reference
Complete reference of all CLI commands
Shell Autocomplete
Enable command autocompletion