Install and log in
frontic login opens a browser to authenticate. frontic project shows you a picker to select which Frontic project you’re working against. Both commands persist their state in a .frontic-local/ directory at your project root. The frontic tab assumes a one-time global install; the other tabs use each package manager’s one-off runner so no install is needed.
Work with your project API
Thefrontic generate command pulls the current state of your project’s API - every block, listing, and page - and writes a typed JavaScript client into a .frontic/ directory in your project:
.frontic/generated-client.js, .frontic/generated-types.d.ts, and a few supporting files. Import the client in your frontend code - every block, listing, and page in your project becomes a typed method:
- Client SDK
- Nuxt Module
frontic generate. If the stack changes - new block, renamed field, adjusted listing filter - regenerate with the same command and commit the updated files. They’re the contract between your frontend code and your Frontic project at that specific revision.
Sync your Context Base
Your Context Base lives in Frontic - Skills and Rules you’ve defined for your project. To make them available to your editor’s AI agent (Claude Code, Cursor), the CLI can sync them into your repository as files the agent reads on every session.What gets written where
.claude/rules/: a .md file there that no longer matches a Context Rule is removed on the next sync. Keep your own rule files elsewhere.
For Cursor, pass --agent cursor. Skills go to .cursor/skills/ instead; everything else is written to the same paths as above.
Choosing a profile
--profile picks which workspace you sync for. Skills and Context Rules come through only when their Profile is empty or includes that workspace.
Running it safely
Runningfrontic context init repeatedly is safe. When nothing changed in Frontic since the last sync, the CLI leaves your rules, CLAUDE.md, tokens and locales alone. Skills are written fresh on every run. To overwrite everything, use --force:
--force when you’ve edited local files by hand and want to reset them back to the canonical versions from Frontic.
Syncing Skills only
frontic context skills syncs only your skills, with the same --agent and --output options. It takes no --profile and syncs every skill, whatever its Profile.
Checking in the synced files
The synced files are the authoritative copy for your editor. Check them into git so everyone on the team gets the same Context Base when they clone the repo - and so your CI and other developers can see what rules the agents are reading. The files are safe to commit: they’re generated from Frontic but they’re intentionally stable, and re-runningfrontic context init without --force leaves them alone until something changes in Frontic.
Other commands
The CLI also provides:frontic mcp init --client <client>- wire up the Frontic MCP servers in your editor’s config in one command (Cursor, Claude Code, Windsurf, VS Code, Codex). See MCP Tools.frontic info- show the current org/project/user you’re authenticated asfrontic login/frontic logout- session management;login --token <token>for non-interactive login in CI/CDfrontic project- switch between projects
Related
Project Context
What the CLI is syncing, conceptually.
Frontic CLI reference
Complete per-command reference with all flags and options.
MCP Tools
Connect Claude Code or Cursor to Frontic for agent-driven project work.