NxisAI CLI
How this fits: the CLI is the terminal side of agentic onboarding. It handles the two steps that need you, signing in and choosing a plan, then nxis mcp install gives your coding agent the same tools as the provisioning MCP server, under your sign-in, for the skills to use.
@nxisai/cli installs the nxis command. It sets NxisAI up from the terminal: sign in, choose a plan, onboard a site, and wire NxisAI's onboarding tools into your coding agent. No API key ever appears in an agent transcript.
Two steps of onboarding belong to a person: signing in and paying. The CLI does everything around them, and stops at those two in a way an agent can detect without seeing the browser.
The current release is 0.1.0-beta.2. Commands and --json reason codes may still change between betas. Check nxis --help for the version you have installed.
Install
Requires Node.js 20 or later.
npx -y @nxisai/cli signup
Or install it globally:
npm install -g @nxisai/cli
nxis status
The package is licensed Apache-2.0, and its README ships with it on npm.
Quick start
nxis signup # sign in, create or reuse an organization, list plans
nxis subscribe free # activate a plan (paid tiers open a payment page and wait)
nxis sites create https://example.com
nxis sites verify --token # the META tag to deploy to production
# … deploy …
nxis sites verify --check # exits 2 until the tag is live; run it again after the deploy
nxis crawl submit --wait # crawl the sitemap
nxis autofill plan # how many resources, and your credit balance
nxis autofill submit --wait # spends credits: asks first, then submits once
nxis publish # make the generated data live: asks first
nxis mcp public on # let agents read the site's records without a key
nxis mcp install # give your coding agent the onboarding tools
nxis status tells you where you are at any time, so you (or an agent) know which steps to skip.
Commands
Getting set up
| Command | What it does |
|---|---|
nxis signup | Sign in, create an organization, and list plans |
nxis login [--web] | Sign in. Uses the device code flow by default; --web uses a browser redirect on this machine |
nxis status | Where you are in setup. Safe to run any time |
nxis plans | Plans available to buy |
nxis subscribe <tier> | Activate a free plan, or pay for a paid one |
nxis credits | Credit balance |
nxis credits packs | Credit packs available to buy |
nxis credits buy <sku> | Buy a top-up. Needs an active plan, including the free one, first |
nxis whoami | Who is signed in |
nxis logout | Forget stored credentials |
Organizations
nxis orgs create --name <name> [--website <url>]
nxis orgs list
nxis orgs use <org-id>
nxis orgs update [--name <name>] [--website <url>] [--industry <text>]
Sites
The site steps of the Site Onboarding skill, one command each. Each acts on the current site: --site <id|domain>, or else the one sites create or sites use saved.
| Command | What it does |
|---|---|
nxis sites create <url> [--name <name>] | Create the site and make it current |
nxis sites list | The organization's sites. * marks the current one |
nxis sites use <id|domain> | Pick the site the other commands act on |
nxis sites verify --token | The verification <meta> tag to add and deploy to production |
nxis sites verify --check | Check the tag is live. Exits 2 until it is |
nxis sites name <name> | The name the site is listed under in the NxisAI Hub |
nxis sites list-in-app [--preview] [--off] | List the site in the NxisAI Hub, or unlist it. --preview changes nothing |
nxis sites tag [status|issue] [--domain <host>]… [--webmcp-mode browser|ssr|none] | The JS tag token, for a verified site |
www.example.com and example.com are different sites. Create the site on the host production serves. A site created on the wrong host has to be deleted, not edited.
A deploy preview never verifies. verify --check fetches the site's own production URL, so it reports site_not_verified until the tag is live there. If the site can't be reached at all, it reports site_unreachable instead.
Site data: crawl, autofill, publish
| Command | What it does |
|---|---|
nxis crawl submit [<sitemap-url>] [--wait] | Check that every URL in the sitemap is on the site's own host, then crawl it |
nxis crawl status [<sitemap-url>] [--wait] | Follow the crawl |
nxis autofill plan [--existing import_and_complete|import|generate] [--media-type HTML|IMAGE|VIDEO|AUDIO] [--pattern <path>] | Count what structured data would cover. Changes nothing |
nxis autofill submit [same options] [--yes] [--wait] | Generate it. Spends credits, asks first, and submits once |
nxis autofill status [--batch <id>] [--wait] [--recent] | Follow a batch. --recent lists the site's latest batches |
nxis publish [--dry-run] [--type <schema-type>] [--yes] | Make generated data live. Asks first; --dry-run only counts |
A few things are worth knowing:
- The sitemap must name the site's own host. A sitemap that lists a deploy's generated host (
*.netlify.app,*.vercel.app,*.pages.dev) fails withsitemap_off_host. Fix the origin, deploy, and crawl again. - Wait for the crawl before planning. The plan counts what the crawl found.
--existingdefaults toimport_and_complete. Each page's own JSON-LD is imported, and only what's missing is generated.plannever estimates a total for generated modes, because the price per generated page varies.- Submit runs once. If a submit doesn't answer, the CLI never sends it again. It exits
2(submit_unconfirmed) and looks for the batch the submit may have started. PAUSEDmeans the credits ran out. The CLI never resumes a paused batch. Buy credits (nxis credits packs), and publish what was already generated.- Generated data is a draft until it's published.
nxis publishmakes it live.
See Bulk AutoFill for how generation and pricing work.
Your site's MCP server, actions and discovery
| Command | What it does |
|---|---|
nxis mcp public on|off | Make the site's MCP server public (readable without a key), or not. Prints its endpoint |
nxis mcp settings [--set key=value …] | Show the MCP settings, or change public, listed_in_app or on_page_agent |
nxis actions bind <action|default> --webhook <url> | --gateway | --self-page | Where an action's submissions go. A new webhook's signing secret is shown once |
nxis actions on|off | Turn the site's action tools on or off, keeping every route and secret |
nxis discovery files [--write] [--out <dir>] | Print llms.txt, agents.md and the AI catalogs. --write merges them into public/ or static/ (or --out), shows a diff, and never overwrites |
nxis types | The types the site's MCP server serves, with counts |
nxis query <type> [--text <q>] [--filter path=op:value …] [--limit n] | Typed records from the site's public MCP endpoint. --text runs a semantic search, which is billed to the organization |
nxis types and nxis query read the site's public endpoint without a key, so run nxis mcp public on first. --filter accepts eq, ne, gt, gte, lt, lte, contains, in (comma separated) and exists. A quoted value is always sent as text, for example address.postalCode=eq:"48067".
See Actions & Bindings and Agent Protocols and Standards for what these settings and files do.
Give your coding agent the onboarding tools
nxis mcp install registers NxisAI's onboarding tools with your agent under the server name nxis-onboarding.
Local (the default). The agent's config gets a command and no key:
{ "mcpServers": { "nxis-onboarding": { "command": "/usr/local/bin/nxis", "args": ["mcp", "serve"] } } }
The agent starts nxis mcp serve, which speaks MCP over stdio and runs each tool through the CLI's own sign-in. It lists the same tools, under the same names and schemas, as the remote provisioning server. Nothing secret is written into the agent's config.
By hand, for Claude Code:
claude mcp add --scope local nxis-onboarding -- nxis mcp serve
# or, for an agent that should only read:
claude mcp add --scope local nxis-onboarding -- nxis mcp serve --read-only
Risky calls ask you first. These calls spend credits or change what the public sees:
- an autofill submit
- a publish that isn't a dry run
- making the MCP server public
- routing actions to a webhook
- listing the site in the NxisAI Hub
Before any of them, the local server asks you directly through your agent (MCP elicitation), naming what's at stake. Only an explicit accept goes ahead. A client that can't ask gets confirmation_unavailable, along with the terminal command that does the same thing. To let such calls run on the client's own per-call approval instead, start the server with --allow-unconfirmed. --read-only refuses every call that may change something.
Remote (--remote). The CLI mints an MCP key and writes it, with the provisioning endpoint's URL, into the agent's config. Use this for an agent that can't start a local process.
| Option | Effect |
|---|---|
--agent claude-code|cursor|mcp-json | Which agent to configure (detected by default). Claude Code is configured at local scope. mcp-json writes ./.mcp.json and adds it to .gitignore |
--stdio / --remote | The local server (default), or the remote endpoint with a key |
--force | Replace an existing nxis-onboarding entry |
--print | Print the config instead of installing it |
--read-only, --allow-unconfirmed | Passed on to nxis mcp serve |
.mcp.json is never committedWhenever mcp install writes a project .mcp.json, it adds the file to .gitignore unless git already ignores it. If git already tracks it, --remote refuses to write a key into it.
Global options
| Option | Effect |
|---|---|
--json | Machine-readable output: exactly one object on stdout |
--verbose | Print every request before it's sent, with credentials removed (to stderr) |
--dry-run | Show what would be sent without changing anything. Reads still run |
--api <url> | Point at another NxisAI environment |
--org <id> | Act on this organization instead of the saved one |
--site <id|domain> | Act on this site instead of the saved one |
--no-open | Print payment links instead of opening a browser |
--timeout <minutes> | How long to wait for a payment (default 15), a crawl (30) or an autofill batch (60) |
--yes | Skip the confirmation for autofill submit or publish, once the user has seen the plan or the count |
Exit codes and JSON
The exit code tells an agent what to do next:
| Exit | Meaning | What an agent should do |
|---|---|---|
0 | Done | Continue |
2 | Needs the user (sign-in, payment or a choice pending) | Relay the message. Don't retry |
3 | Not authorized | Run nxis login |
1 | Failed | Report the error |
With --json, failures include "ok": false and a stable reason to branch on, plus the details needed to continue. Progress messages go to stderr, so nxis plans --json | jq works while a person still sees what's happening.
A payment timeout isn't a failure. subscribe and credits buy exit 2 with the payment URL. Run nxis status next, not a second subscribe, which would open a second checkout.
Sign-in and credentials
nxis loginuses the OAuth device flow. It prints a URL and a short code, and you sign in in any browser. This works in containers, SSH sessions and cloud dev boxes.nxis login --webuses a local browser redirect with PKCE instead.- Tokens are stored in the OS keychain (
securityon macOS,secret-toolon Linux). Without a keychain, or withNXIS_NO_KEYCHAIN=1, they go in~/.config/nxis/credentials.jsonwith mode0600. - Tokens are never printed, not in
--jsonand not in errors. A remote MCP key is reported only as a short preview, except with--print. - Credentials are only sent to the environment they were issued for.
| Variable | Effect |
|---|---|
NXIS_API | Base URL for every service, same as --api |
NXIS_TOKEN | Use this access token instead of signing in. It's never written to disk |
NXIS_NO_BROWSER=1 | Print URLs instead of opening a browser |
NXIS_NO_KEYCHAIN=1 | Store credentials in a 0600 file instead of the OS keychain |
Telemetry
This version sends none. Nothing leaves your machine except the NxisAI API calls needed to run the command you typed. If usage events are added later, the package README will say exactly what's collected before the release that first sends anything, and DO_NOT_TRACK=1 will be honored.
Related
- Agentic Onboarding: the same steps, driven by a coding agent
- Agent Skills Library:
nxis-account-setupandagentic-site-onboarding - Provisioning MCP Server: the tools
nxis mcp serveexposes locally - NxisAI Hub: where
sites list-in-applists your site