
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
Global options
These go before or after any command, for examplefrontic generate --non-interactive.
--non-interactive is for scripts, CI, and any machine without a person at the keyboard. The CLI then never opens a browser or a picker. Where it would have asked, it stops with an [ERROR] line and a non-zero exit code instead:
frontic loginwithout--tokenfails with “Browser login needs a terminal”. Log in withfrontic login --token <token>instead.frontic projectwith more than one project to pick from fails and asks for-p <project-id>. With exactly one project, it selects that one.frontic generatefails when no project is selected, or when the existing client was generated for a different project, instead of asking whether to switch or overwrite. Without a version, it generates against the public version, or the develop version before anything is published, instead of asking which API version.frontic generate draftwithout a name fails and lists the drafts.
--json option of the release and draft commands turns on the same behaviour for that command.
Whether or not the flag is set, a Frontic backend the CLI can’t reach ends the command with Cannot reach <url>, or <url> answered <status>, and exit code 1. Logging in again can’t fix that, so the CLI doesn’t offer it.
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. Two subcommands.
frontic context init
Sync Skills, Context Rules and brand tokens in one shot. Skills go to .claude/skills/ (.cursor/skills/ with --agent cursor), Context Rules to .claude/rules/. Project Rules go to .claude/CLAUDE.md only with --profile studio or --profile designer; the default profile, custom, has none. See Choosing a profile.
Re-running without --force leaves rule files alone when nothing changed in Frontic - safe to run repeatedly.
Usage
frontic context skills
Sync only Skills.
Usage
frontic credentials
Manage project credentials
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.
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 instead.
Pass --export to print export VAR=value statements to stdout instead of writing a file, which is useful for sourcing into the current shell:
Usage
frontic draft
Preview - drafts are in active development. Specifics may change before general availability. Unlike the rest of Release Control, drafts are currently planned to be exclusive to the Scale plan.
frontic generate draft <name> to generate an SDK against one without changing your active project.
frontic draft create
Split a new draft from develop (prompts for name if omitted)
Usage
string
name
frontic draft list
List drafts of the current develop project
Usage
frontic draft diff
Show what the draft has changed vs develop (interactive picker if no name given)
Usage
string
name
frontic draft check
Check whether a draft will merge cleanly into develop (interactive picker if no name given)
Usage
string
name
frontic draft merge
Merge a draft back into develop (interactive picker if no name given). The draft is removed after merge.
Usage
string
name
frontic generate
Generate the typed Client SDK for the current project.
Pass the API version to generate against: develop, preview or public. Without one, the CLI uses the public version, or the develop version before anything is published, and prints which. In an interactive terminal it also opens a picker with that version preselected.
frontic generate draft <name>. Without a name, the CLI opens a picker; in CI it fails and lists the drafts.
Rerun frontic generate after upgrading the CLI or the Nuxt module. The module reads a newer layout of the generated types and warns at build time when your .frontic/ folder was generated by an older CLI.
If generation fails with Invalid API specification. The API specification must be a valid YAML file., rerun with --debug - it writes the raw spec response to fetch-api.debug.yaml so you can inspect exactly what the backend returned.
Usage
string
API version to generate against: develop, preview or public (default: public when it exists, else develop); or draft <name> for a draft
string
With draft: the draft to generate against
frontic info
Display the current team (printed as Organization), project, and authenticated user.
Usage
frontic library
Sync the brand tokens Context Setup wrote into your repository, so the colors, fonts, and radii your agent uses come from the project rather than from memory.
frontic library tokens
Sync the brand tokens Context Setup wrote, and any you’ve published since in the Design Library.
Usage
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.
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.Usage
frontic logout
Log out of your Frontic account.
Usage
frontic mcp
Configure Frontic MCP servers for your AI coding client
frontic mcp init
Initialize Frontic MCP configuration for an AI coding client (claude resolves to Claude Code). 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).
Config file paths
See MCP Tools for a guided walkthrough of the editor setup flow.
Usage
frontic project
Select the active project for SDK generation and Context Base sync. The selection is stored in .frontic-local/. If you omit --project, the CLI prompts you to pick.
Usage
frontic release
Preview and publish versions of a project: the develop, preview and public versions
frontic release status
Show develop, preview, public, and any in-flight drafts
Usage
frontic release preview
Preview a version: generate a fresh preview version from the current workspace configuration and your data, replacing the old one
Usage
frontic release publish
Publish the preview version as the public version (irreversible)
Usage
frontic release diff
Show what publishing will change (develop → public by default)
Usage
Getting help
Pass--help to any command to see its options: