Skip to content
Beta. This surface may change before GA; breaking changes are dated in the changelog.

Nicia CLI

The Nicia CLI (@nicia-ai/cli@0.4.0) runs on Node.js 22 or later. Run it with npx or install it globally to use the nicia executable.

Terminal window
npx @nicia-ai/cli help
npm install -g @nicia-ai/cli

Check a public GitHub repository for stale instructions in your browser. Skill-Rot Audit

No account or API key required. The scan uses local files and available Git history. It checks agent instructions and skill files for broken paths and script references, stale instructions, conflicting defaults, oversized context, and uncited facts.

Terminal window
npx @nicia-ai/cli audit
npx @nicia-ai/cli audit ./other-repo --markdown
npx @nicia-ai/cli audit --json --ci --fail-on warn

The path selects the enclosing Git worktree or, outside Git, the directory itself. --json writes a schema v1 report and --markdown writes a GitHub-flavored report. With --ci, errors fail the command by default. --fail-on warn includes warnings in that threshold. Use --stale-days to change the default 45-day minimum age. For pull requests, see the GitHub Action.

Terminal window
npx @nicia-ai/cli login
npx @nicia-ai/cli logout

login opens the browser. Choose an organization and click Authorize Nicia CLI within five minutes. On SSH, open the printed URL on your own computer and paste the key from the authorization page into the waiting terminal. The CLI saves the key with mode 0600 in ~/.config/nicia/credentials.json or $XDG_CONFIG_HOME/nicia/credentials.json and uses it for the matching API URL.

For CI, provide NICIA_API_KEY as an environment secret. It takes precedence over saved credentials. If you use a custom API, set NICIA_API_URL and use NICIA_APP_URL to point login at its matching app. Interactive connect and migrate can also prompt you to sign in or paste a key for that run.

logout deletes the saved local login. To revoke the key itself, open Settings → Public API access. See Authentication.

From your repo, preview the files and then upload them to the space you choose.

Terminal window
npx @nicia-ai/cli migrate ./docs ./CLAUDE.md --space team-acme --dry-run
npx @nicia-ai/cli migrate ./docs ./CLAUDE.md --space team-acme --connect claude-code

With no paths, migrate scans the current repository for agent instruction files such as AGENTS.md, CLAUDE.md, SKILL.md, Cursor rules, and Copilot instructions. Explicit directories can also contain Markdown, MDX, and text. Migrations default to 50 files (adjust with --max-files), with a 12 MiB limit per file. Reruns use stable document IDs. --dry-run works offline and --json emits the summary on stdout. To create a new space, choose the handle with --space and optionally set --name and --mode open|reviewed.

Terminal window
npx @nicia-ai/cli connect team-acme --client claude-code
npx @nicia-ai/cli connect team-acme --client codex --read-only
npx @nicia-ai/cli connect team-acme --client cursor --dry-run

connect creates the space if needed, provisions and verifies a space key, then merges one MCP entry into your client config. Claude Code is the default client. Choose --read-only for retrieval or --capabilities with a comma-separated list of read, write, review, and admin. The default is read,write. Use --dry-run to preview the plan or --print to print the configuration. Follow the CLI’s environment-variable instructions for Codex and restart your client after setup. See MCP URLs for manual setup.

Terminal window
npx @nicia-ai/cli spaces --json
npx @nicia-ai/cli space list
npx @nicia-ai/cli space create team-ops --name "Operations" --mode reviewed
npx @nicia-ai/cli space info team-ops
npx @nicia-ai/cli space connect team-ops --client codex

spaces and space list both list the organization’s spaces. space info shows one space by handle. The HTTP API uses that same handle under /v1/brains/{handle}.

Install the Git post-commit hook and run the first sync from your repository.

Terminal window
npx @nicia-ai/cli hook install --space team-acme
npx @nicia-ai/cli sync --dry-run
npx @nicia-ai/cli sync

The installer creates or updates .nicia.json. Edit paths to choose the files or directories to watch.

{
"space": "team-acme",
"paths": ["CLAUDE.md", "AGENTS.md", "docs"]
}

The hook syncs committed changes in the background. Sync uses each repository-relative path as the document ID and records the commit SHA. A deleted or renamed path keeps its prior document in Nicia. Cite synced documents by path, such as docs/pricing.md. Sync can report reopened records when the credential has Review access.

Use sync --changed-only to check the latest commit, sync --dry-run --json for an offline preview, and sync to catch up after a missed hook. hook uninstall removes the hook’s Nicia block and keeps the config for manual sync.

Terminal window
npx @nicia-ai/cli hook uninstall