Skip to main content
The Frontic CLI is a command-line interface for interacting with your Frontic Account and generating project-specific files such as the Client SDK.
Frontic CLI Hero

Setup

You can use the Frontic CLI in two ways:
  1. Install the CLI globally (enables the frontic command).
  2. Run it ad-hoc through your package manager’s runner (pnpm dlx, npx, yarn dlx, bunx).
# Install once globally
npm install -g @frontic/cli

# Then use the `frontic` command
frontic <command>
  • Global install — pin to a specific version, run frequently. You manage upgrades manually.
  • One-off runner (pnpm dlx, npx, etc.) — always uses the latest version (or your package manager’s cache). No global state.

Commands

frontic login

Login to your Frontic account. In most cases, run this from your project directory (where your package.json lives) so the CLI can place generated files correctly.

Usage

frontic login
Opens a browser window to complete the login flow. Creates a token in .frontic-local/. Add this directory to .gitignore to keep credentials out of the repo.

Options

--token
string
An existing Frontic token, for non-interactive use (CI/CD pipelines, headless environments).

frontic logout

Log out of your Frontic account.

Usage

frontic logout

frontic project

Select the active project for SDK generation and Context Base sync. The selection is stored in .frontic-local/.

Usage

frontic project

Options

--project, -p
string
The id of the project to select. If omitted, the CLI prompts you to pick.

frontic generate

Generate the typed Client SDK for the current project.

Usage

frontic generate
If you work with multiple environments, pass --env to target a specific one (otherwise the CLI prompts):
frontic generate --env develop

Options

--env, -e
develop | preview | public
Target environment alias.
--output, -o
string
default:".frontic"
Output base directory for generated files.
--persist-oas, -s
boolean
default:"false"
Persist the OpenAPI specification file alongside the generated client.
--verbose, -v
boolean
default:"false"
Verbose output and full error messages.

frontic info

Display the current organization, project, and authenticated user.

Usage

frontic info

frontic context

Sync your project’s Context Base (Skills and Rules) into your repository so your editor’s AI agent reads them on every session. Three subcommands.

frontic context init

Sync both Skills and Rules in one shot. By default, targets Claude Code and writes to .claude/skills/, .claude/rules/, and .claude/CLAUDE.md. For Cursor, pass --agent cursor and the files go to .cursor/skills/ and .cursor/rules/. Re-running without --force skips unchanged files — safe to run repeatedly.
Usage
frontic context init
Options
--agent
claude-code | cursor
default:"claude-code"
Target agent.
--output, -o
string
default:"."
Output base directory.
--force
boolean
default:"false"
Overwrite all files. Without --force, unchanged files are skipped.

frontic context skills

Sync only Skills.
Usage
frontic context skills
Options
--agent
claude-code | cursor
default:"claude-code"
Target agent.
--output, -o
string
default:"."
Output base directory.

frontic context rules

Sync only Rules.
Usage
frontic context rules
Options
--agent
claude-code | cursor
default:"claude-code"
Target agent.
--output, -o
string
default:"."
Output base directory.
--force
boolean
default:"false"
Overwrite all files. Without --force, unchanged files are skipped.

frontic mcp init

Initialize Frontic MCP configuration for an AI coding client. Writes the Frontic MCP server entries directly into your client’s MCP config file. The command merges with any existing MCP config rather than overwriting it. When run, the CLI prompts you to choose what to install:
  • Tools & Docs — both project tools and documentation MCP servers (default).
  • Tools onlyfrontic-tools (authenticated project access).
  • Docs onlyfrontic-docs (read-only documentation).

Usage

frontic mcp init --client cursor

Options

--client
cursor | claude | windsurf | vscode | codex
required
Target AI coding client. claude resolves to Claude Code.

Config file paths

ClientPath
cursor.cursor/mcp.json (project-local)
claude.mcp.json (project root, for Claude Code)
windsurf~/.codeium/windsurf/mcp_config.json (global)
vscode.vscode/mcp.json (project-local)
codex~/.codex/config.toml (global, TOML format)
See MCP Tools for a guided walkthrough of the editor setup flow.

frontic credentials load

Pull the project’s Studio credentials into a local .env file so the same secrets your Studio workspace uses are available when you run the code on your own machine. The command merges credentials into the file under a delimited block so re-running the command updates only that block — anything else in the file stays put. If a .gitignore exists, the env file is added to it automatically. For Studio workspaces, credentials are injected automatically — frontic credentials load is for local development.

Usage

frontic credentials load

Options

--env-file
string
default:".env.studio"
Path (including filename) to the env file the credentials are written to. Created if it doesn’t exist.The default is .env.studio rather than .env so the command never overwrites an existing .env or .env.local. Pass --env-file to write to a different filename — for example --env-file .env.local if your setup expects everything in one place — or rename the file afterwards.
--export
boolean
default:"false"
Print export VAR=value shell statements to stdout instead of writing a file. Useful for sourcing into the current shell:
eval "$(frontic credentials load --export)"

Getting help

Pass --help to any command to see its options:
frontic --help
frontic generate --help
frontic context init --help