
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 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 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 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.
develop, prepare work in it, and merge it back through review. Each draft runs with its own version token and a sampled slice of your feed data, so you can iterate end to end without disturbing develop for the rest of the team. Multiple drafts can exist in parallel, and a draft is removed only when it merges. Use 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.
If you work with multiple environments, pass --env to target a specific one (otherwise the CLI prompts):
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
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
Manage the develop / preview / public release stages of a project
frontic release status
Show develop, preview, public, and any in-flight drafts
Usage
frontic release preview
Create or overwrite the preview snapshot from develop
Usage
frontic release publish
Promote the current preview to public (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: