Skip to main content
The Frontier CLI is a powerful command-line tool for managing your Frontier instance. It provides commands for server management, database migrations, and resource management including users, organizations, projects, groups, roles, permissions, and policies.

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:
frontier <command> <subcommand> [flags]

Example Commands

# Start the server
frontier server start -c config.yaml

# Run migrations
frontier server migrate

Authentication

Most CLI commands require authentication via header flags. The authentication header is configured in your server config and typically looks like:
frontier user create --file user.json --header X-Frontier-Email:[email protected]
The header format is <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:
  1. Configuration Files - Use -c or --config flag to specify server config
  2. Client Config - Initialize with frontier config init
  3. Environment Variables - See Environment Variables

Environment Variables

RAYSTACK_CONFIG_DIR
string
Directory where Frontier stores configuration files. Default: $XDG_CONFIG_HOME/raystack or $HOME/.config/raystack
NO_COLOR
string
Set to any value to disable ANSI color output
CLICOLOR
string
Set to 0 to disable ANSI colors in output

Getting Help

Get help for any command using the --help flag:
frontier --help
frontier server --help
frontier user create --help

Help Topics

Frontier provides additional help topics:
# View environment variables
frontier help environment

# View authentication help
frontier help auth

Common Workflows

Setting Up a New Frontier Instance

  1. Initialize server configuration:
    frontier server init -o config.yaml
    
  2. Run database migrations:
    frontier server migrate -c config.yaml
    
  3. Start the server:
    frontier server start -c config.yaml
    
  4. Seed sample data (optional):
    frontier seed -H X-Frontier-Email:[email protected]
    

Managing Users and Organizations

  1. Create a user:
    frontier user create --file user.json -H X-Frontier-Email:[email protected]
    
  2. Create an organization:
    frontier organization create --file org.json -H X-Frontier-Email:[email protected]
    
  3. Create a project in the organization:
    frontier project create --file project.json -H X-Frontier-Email:[email protected]
    

Next Steps

Installation

Install the Frontier CLI on your system

Commands Reference

Complete reference of all CLI commands

Shell Autocomplete

Enable command autocompletion

Build docs developers (and LLMs) love