Getting started
Add prime to an existing site in about two minutes, or start a new one from a template, and try any plan free for 14 days.
prime edits the Markdown and MDX files your site already builds from. It adds an admin at /prime, a typed schema in one config file, and an optional agent that proposes changes for you to review.
Add it to an existing site
From your project root:
bunx @getprimecms/cli init
init does the setup in one pass and says what it did:
prime init Astro, bun
Found 4 collections in src/content/:
essays: 3 files in essays/.
notes: 8 files in notes/.
pages: 2 files in pages/.
site: 2 files in site/.
✓ Created prime.config.ts
Installing @getprimecms/core @getprimecms/server @getprimecms/astro with bun...
✓ Installed 3 packages with bun
✓ Added the integration to astro.config.mjs
✓ Added prime's local files to .gitignore
- It detects your framework and finds your content, then writes
prime.config.tswith one collection per folder. Existing sites covers what it looks for and how it reads your frontmatter. - It installs the packages your framework needs with the package manager your lockfile names (bun, pnpm, yarn or npm). Pass
--no-installto skip that step and get the command to run yourself. - It connects prime to your framework: it edits the Astro, Vite or VitePress config, creates the SvelteKit hook or the Next.js route, and adds prime’s local files to
.gitignore. A config it cannot edit safely is left alone, with the lines to add by hand. See Frameworks. - For Hugo, Jekyll and Eleventy there is nothing to connect: you run the admin next to your generator with
bunx @getprimecms/cli dev.
Open the config and adjust anything it guessed wrong. Anything prime does not model is kept exactly as it is on every save.
Or start from a template
bunx @getprimecms/cli new # list the templates
bunx @getprimecms/cli new astro my-site
Every framework has a primer: a small free site with posts, pages and a design of its own. Designed templates are on sale at primecms.dev/templates. See Templates.
Open the admin
Start your dev server as usual and open /prime. Every save writes the file directly, so your dev server hot-reloads the page you are editing. The admin asks for a license key the first time. Start a free 14-day trial from it, or paste a key. A key works on local addresses without a domain.
Before you deploy
Production needs three things: a license key for your domain, a way to sign in, and storage that fits your host. Start a trial at primecms.dev/trial, set PRIME_LICENSE in your host’s environment, and see Deploying for authentication and storage.
What to read next
- Configuration covers collections and every field type.
- The agent explains proposals and how to connect a model.
- Command line lists every command.