More CLI commands
Check what is live, generate your integration, inspect a catalog, and read what your workspace lets the agent do — without opening the dashboard.
Beyond init, the CLI covers four jobs: signing in and choosing a workspace, checking what is actually live, writing your integration for you, and reading your workspace’s configuration from a terminal or a CI job.
Sign in and out
Sign in with your browser: the CLI opens the dashboard, you approve the device, and a session tied to your account is saved to ~/.syncanix/credentials (readable only by you) — the CLI then acts with your role, in your workspaces. Use --key for a workspace machine key instead (CI; admin approval), check who you're signed in as with syncanix whoami, and sign out with syncanix logout — it also revokes the session server-side.
npx syncanix login
npx syncanix logoutCheck who you are and where you are writing
A session acts as you, so the same command can write to a different workspace depending on which one is active. syncanix whoami answers both questions at once — your identity, the active workspace and your role in it, when the session expires, and every workspace you can act in. It resolves that live from the server, so it doubles as a check that your session still works. syncanix workspace list shows the same list on its own, and syncanix workspace use <slug> changes which one the next command writes to. Run whoami before anything that uploads.
npx syncanix whoami
npx syncanix workspace list
npx syncanix workspace use acmeImport a schema
Already have an OpenAPI or GraphQL schema? Build a catalog from it directly, with no code scan. Pass --offline to skip uploading, or --env to target an environment.
npx syncanix import --openapi ./openapi.json
npx syncanix import --graphql ./schema.graphqlIs my checkout in sync?
Compares what a fresh scan of this checkout finds with what your workspace is currently serving, and prints the difference. This is the command to reach for when the assistant is doing something you did not expect: it answers “is production running what I think it is running” without opening anything.
npx syncanix statusCatch a change before your customers do
Compares your working tree with the catalog you committed and exits with an error if they have diverged. Put it in your continuous-integration pipeline and a change to something the assistant depends on fails the build rather than surfacing in a conversation.
npx syncanix driftIs the widget actually on the page?
Loads a URL and reports whether the Syncanix embed is live on it. Faster than opening a browser, and useful in a deploy check — the most common reason chat is missing is a build that dropped the script tag.
npx syncanix embed check https://app.acme.comWrite the integration files for me
Writes a small set of Syncanix files into your project — the embed, the configuration, and whatever else your stack needs. It only ever creates files that are not there, so running it twice is safe and it can never overwrite something you have edited.
npx syncanix generateWire the widget into a frontend
A guided version of the same job for an existing frontend, in four steps you run one at a time: it scans your app, plans the change, shows you the plan to approve, and only then applies it.
npx syncanix integrate scan
npx syncanix integrate plan
npx syncanix integrate applyRead a catalog from the terminal
List what a catalog file contains — filtered by risk class, by method, by framework — compare two of them, or export a compliance report listing every capability with its risk and what it touches. Useful in review, and the export is a document you can hand to somebody who is asking.
npx syncanix catalog list --side-effect destructive
npx syncanix catalog diff ./before.json ./after.json
npx syncanix catalog compliance --format mdThe same command can read or change the name and description the agent is served for a capability — the plain-language wording a person approving an action sees. Useful for fixing one awkward description without opening the dashboard.
Read what the agent is allowed to do
Three read-only commands for the questions an audit asks: every capability with whether it is enabled and its risk class, any capability change waiting for a second approver, and the API keys your workspace has issued — prefixes only, never a secret.
npx syncanix governance list
npx syncanix approvals
npx syncanix keys listLocal dev harness
Run a local page that embeds the widget against a development backend and live-reloads as your catalog changes. Flags let you set the port, backend origin, widget source, publishable key, and catalog path.
npx syncanix dev --port 4321Diagnose your setup
Check your environment for common problems — Node version, a detected framework, a valid config, and a resolvable API key. It exits non-zero if anything is wrong.
npx syncanix doctorRegister an external MCP server
If your workspace already runs its own MCP server, register it so Syncanix can forward tool calls to it. You’ll need to be signed in; the credential is stored securely and never echoed back.
npx syncanix byomcp register --server-url https://mcp.example.comCatalog-as-code overlays
Manage a committed syncanix.yaml overlay: init scaffolds one, validate checks it, and apply merges it onto a discovered catalog.
npx syncanix yaml init
npx syncanix yaml validate
npx syncanix yaml apply --catalog ./.syncanix/catalog.jsonVersion
Print the CLI, Node, and build versions — handy when reporting an issue.
npx syncanix version