Skip to main content

CLI Installation

The Faces CLI lets you generate projects from your terminal.

Install

npx @facesapp/cli
This installs the faces command. Or install globally:
npm install -g @facesapp/cli

Authenticate

Run the login command to create and store an API key:
faces login
This will:
  1. Open your browser to sign in to Faces
  2. Create an API key named “CLI”
  3. Save it to ~/.config/faces/credentials.json (mode 0600)
You can also pass an API key directly with --api-key or set the FACES_API_KEY environment variable.

Verify

faces list
If authentication is working, you’ll see your projects (or an empty list).

Configuration

The CLI reads configuration in this order:
  1. --api-key and --api-url flags (highest priority)
  2. ~/.config/faces/credentials.json (created by login)
  3. FACES_API_KEY and FACES_API_URL environment variables
# Using environment variables
export FACES_API_KEY="faces_your_key_here"
faces list

# Using flags
faces list --api-key faces_your_key_here

# Custom API URL (for self-hosted or staging)
faces list --api-url https://staging.faces.app