CLI reference
Five commands, installed with @editsy/cli. Run them with npx, or add them as scripts in package.json.
editsy init
npx editsy init [--root <dir>]Scaffolds a project in one go: an editsy.config.ts with commented defaults, the /editsy route file (when it finds a Next.js App Router), a next.config.ts with the deployment blocks, a .env.example, and an AGENTS.md carrying the conventions that keep the site editable when AI agents work on it. It also generates a fresh EDITSY_SECRET for you to paste into your host.
Strictly create-only: files that already exist are never touched. Where a file you own would need changes (an existing next.config), init prints the exact snippet to add instead of editing it.
editsy doctor
npx editsy doctor [--root <dir>]Checks the whole setup and says what's wrong in plain words: content files found and valid, the editor UI present, EDITSY_SECRET and the editors list configured (with a warning for plaintext passwords), the Next.js route and config in place, and, when GitHub credentials are set, a live test of the token, which catches the expired and read-only tokens that otherwise fail silently at publish time.
It reads your .env files for presence checks but never prints a secret's value. Exit code 1 when something needs fixing, so it can gate CI too.
editsy edit
npx editsy edit [--port <n>] [--root <dir>] [--no-open]Serves the local editor over your project's content files and opens it in your browser. It binds to 127.0.0.1 only and runs without a login, because it never leaves your machine.
--port: which port to serve on. Default 4499.--root: the project directory to edit. Default: where you ran the command.--no-open: print the URL instead of opening a browser.
The preview pane iframes your dev server (siteUrl in editsy.config.ts, default http://localhost:3000), so run your site's dev alongside it for live preview.
editsy check
npx editsy check [--root <dir>]Validates that every content file holds only plain, serializable values: no functions, no JSX, no spreads, no computed keys. Exit code 1 on problems, with file, line, and column in the output, so it slots straight into CI. It also mentions (without failing) files that use plain exports instead of the defineContent wrappers, in case you want the extra type safety.
editsy hash-password
npx editsy hash-passwordPrompts for a password without echoing it, then prints a ready-to-paste editor entry with a scrypt hash. Run with no argument like above and the password stays out of your shell history; editsy hash-password <password> and piped stdin also work, for scripts.
The output is a JSON ARRAY with one editor in it. Keep the square brackets even for a single editor, and add more {...} entries for more people. Use it as the value of EDITSY_EDITORS, or as the contents of a committed editsy.editors.json. Hashes are safe to commit; plaintext passwords in that file are refused outright.