
Setup
You can use the Frontic CLI in two ways:- Install the CLI globally (enables the
fronticcommand). - Run it ad-hoc through your package manager’s runner (
pnpm dlx,npx,yarn dlx,bunx).
Which option should I choose?
Which option should I choose?
- 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.
Video tutorial 🎬
Video tutorial 🎬
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
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
An existing Frontic token, for non-interactive use (CI/CD pipelines, headless environments).
frontic logout
Log out of your Frontic account.
Usage
frontic project
Select the active project for SDK generation and Context Base sync. The selection is stored in .frontic-local/.
Usage
Options
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
--env to target a specific one (otherwise the CLI prompts):
Options
Target environment alias.
Output base directory for generated files.
Persist the OpenAPI specification file alongside the generated client.
Verbose output and full error messages.
frontic info
Display the current organization, project, and authenticated user.
Usage
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
Options
Target agent.
Output base directory.
Overwrite all files. Without
--force, unchanged files are skipped.frontic context skills
Sync only Skills.
Usage
Options
Target agent.
Output base directory.
frontic context rules
Sync only Rules.
Usage
Options
Target agent.
Output base directory.
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 only —
frontic-tools(authenticated project access). - Docs only —
frontic-docs(read-only documentation).
Usage
Options
Target AI coding client.
claude resolves to Claude Code.Config file paths
| Client | Path |
|---|---|
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) |
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
Options
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.Print
export VAR=value shell statements to stdout instead of writing a file. Useful for sourcing into the current shell:Getting help
Pass--help to any command to see its options: