primo-cli) lets you build and edit Primo sites from local files using your own editor and version control. It runs a local CMS, syncs according to your chosen author mode, and provides commands for deployment. By default, a push saves a hosted draft. Publish it separately with primo publish, or combine both steps with primo push --publish.
The CLI is optional. You can still build everything in the in-browser editor — the CLI is for developers who prefer working in files and Git.
Installation
- A supported Node.js LTS release, version 22.13 or later. The CLI’s interactive dependencies do not support Node 18.
- For
primo deploy: Railway CLI or Fly.io CLI
Quick Start
primo init creates the workspace and offers to connect your AI agent to the Primo MCP tools (skip with --no-mcp). In an interactive terminal, primo new then starts the local CMS, with the site at http://my-site.localhost:3000. From scripts and CI, or with --skip-dev, it only creates the files; start the CMS yourself with primo dev.
Workspace Structure
A Primo workspace contains one or more sites and a shared block library:site-one.localhost:3000, site-two.localhost:3000.
Command Summary
When to Use Which Command
Next Steps
Local Development
Run the local CMS and learn the file/CMS sync model
Sync with a Hosted Server
Use
primo push and primo pull against a deployed instanceDeploy
Deploy your workspace to Railway, Fly.io, or any static host
MCP Server
Let AI agents work inside your Primo workspace safely