Use Neopress from the command line
Install the CLI, sign in, target a site explicitly, and move from a page draft to a verified publication.
The Neopress CLI lets you manage site resources from a terminal or an AI coding environment. Start with the installed command reference, then use explicit site targeting so each command applies to the intended site.
Install and sign in
Use Node.js 24 or later. Install or update the published CLI package and check its version:
pnpm add -g @neopress/cli@latest
neopress --version
neopress login
neopress whoami
Login opens a browser and receives the authentication result through a local callback. The CLI saves the session and refreshes it when needed. If you are using a remote terminal without a usable callback, run neopress login --manual and follow its instructions to paste the callback URL into that terminal.
The account needs access to an eligible site. Developer access starts at Launch, including an active trial with Launch access. Individual commands also respect your site permissions.
Confirm the target site
neopress sites list
neopress --site 123 sites current
neopress --site 123 sites get
neopress --site 123 pages list
Replace 123 with an ID from your own site list. The --site flag accepts an ID or handle and applies only to that invocation. sites current explains how the target was selected; it is a local configuration check. sites get actually reads the site and confirms access.
For repeated work, you can put {"siteId":123} in a project file named .neopressrc.json. Site selection follows this order: --site, NEOPRESS_SITE_ID, the nearest project configuration, then the global site saved by neopress sites use. Separate project configurations are useful when working on several sites.
Read the available commands
neopress guide
neopress guide --json
neopress pages create --help
neopress entries publish --help
Command groups cover sites, pages, layouts, collections, entries, forms, assets, redirects, analytics, and templates. Some administrative commands require additional privileges; their presence in help does not grant access. Use --json when passing output to another program or AI tool.
Create and review a page draft
Prepare a page component that follows the Neopress runtime contract and save it as about.tsx. Then create the draft:
neopress --site 123 pages create --path /about --title About --tsx ./about.tsx
Use the page ID returned by that command. In this example, 456 is only a placeholder:
neopress --site 123 pages get 456
neopress --site 123 pages compile 456
neopress --site 123 publish preview
Compilation checks the page code. Publish preview lists pending changes; inspect the page visually in the dashboard as well. JSON options such as --i18n and --query-config accept inline JSON or an @file.json argument. The --tsx option reads an ordinary file path without the @ prefix.
Publish when the reviewed changes are ready
neopress --site 123 publish
This publishes pending site changes, including other pending pages or layout changes on the same site. CMS entry drafts require their own entries publish command. Site publication through the CLI currently requires an owner or admin account. After success, open the real page URL and check its content, links, and layout.
For later edits, use pages update 456 --tsx ./about.tsx with the same explicit site flag, then repeat compilation and review. Run neopress logout when you want to clear the locally saved login.