Client editing for Next.js
Let clients edit your Next.js site.
A marketing site in Next.js is a joy to build and a chore to keep editing for someone else. A headless CMS is the usual answer, and then you own a schema, an API, a fetch layer and a monthly bill for a site with eleven pages.
Tusk is a client editing layer for sites you already built. You keep the code, the repo and the hosting. Tusk marks the text, photos and downloads the client may change, and the client changes them on their own live page. Nothing of Tusk runs between a visitor and the site.
Where your Next.js site needs to be
- No export, no schema. Tusk marks the elements in your JSX, and one script pulls the published content into the project before next build, where your pages read it.
- Deploy on Vercel or anywhere with a hook. App router, pages router, static export: all fine, because the content arrives as files before the build, whatever renders them.
Connecting it, step by step
- Add the Tusk MCP to whichever agent you use (Claude Code, Cursor, Codex, Windsurf), or mark by hand: one data-tusk attribute per element.
- Log in once, for this site: npx @tuskcms/mcp login --site <slug>.
- Say “Connect this site to Tusk CMS.” or wire it yourself: tusk-pull.mjs fetches the published content and photos before the build and your pages read .tusk/published.json; on a static export, tusk-apply.mjs writes it into the built HTML instead.
- Invite the client. Their Publish triggers your Vercel deploy hook.
The MCP config, for Claude Code, Cursor, Codex or Windsurf. Nothing to install: it runs from npm on demand.
{ "mcpServers": { "tusk": { "command": "npx", "args": ["-y", "@tuskcms/mcp"] } } }No MCP? Paste this one line into any AI tool that can read a URL and edit files:
Connect this site to Tusk CMS. Read https://tuskcms.com/llms-full.txt first and follow it exactly.
Start from a template
The Tusk starter is a GitHub template: a three-page business site in plain HTML, already marked up, with the build step and Vercel and Netlify config in place. Use the template, deploy it, say “Connect this site to Tusk CMS.”, and hand it to the client. Then reshape it into their site, or copy the marks and the build step into your Next.js project.
Starting from a prompt instead? Ask your tool to build the site with the marks in from the start: the first-prompt version works in any builder.
What the client gets
- Their own login. They open an editor with a live preview of their real website beside the fields you marked, click a heading, a paragraph, a photo or a download, change it, and press Publish.
- Nothing of yours. No repo, no Next.js, no code, no layout or styles. What you did not mark cannot be edited.
- History of the last 30 days, with any version restored as a draft, so a bad edit is never permanent.
- A Publish that reaches the live site through your own host, and a dashboard that tells you both whether it did.
What you keep
- The codebase, the hosting and the deploy. Tusk triggers a deploy hook you own, and that link, encrypted, is all it holds of your host.
- A static site that stays static: published content and images are written into your build by two zero-dependency scripts. The deployed site never calls Tusk.
- The retainer. The client pays you; you pay Tusk by site. Clients never pay for their login.
- The exit. Export gives you a site’s words, photos, fields and 30 days of versions as files; disconnect cuts every tie and the site keeps serving.
Questions Next.js developers ask
How is this different from a headless CMS?
There is no API in your runtime path and no schema to design. The content lives in Tusk only until build time, when it is saved as files in your own build. Your site fetches nothing. You can disconnect at any time and keep every word.
I already use MDX / a content folder.
Keep it. The marks go on the elements your MDX renders into, and your MDX stays as the text the page falls back to. The client still clicks on the live page; the build puts their published words in place of the fallback.
Images?
The client uploads a photo in the editor; Tusk re-encodes it to WebP, strips EXIF, and the build step downloads it into your public folder so the deployed site serves it from your own host.
Also built with v0, Astro, Claude Code? Tusk works the same way. All builders: Lovable, v0, Bolt, Replit, Claude Code, Codex, Cursor, Windsurf, Astro, Eleventy, Framer, plain HTML, and any site with a build step or deploy hook.