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.
npx @nicia-ai/cli helpnpm install -g @nicia-ai/cliCheck a public GitHub repository for stale instructions in your browser. Skill-Rot Audit
Audit local instructions
Section titled “Audit local instructions”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.
npx @nicia-ai/cli auditnpx @nicia-ai/cli audit ./other-repo --markdownnpx @nicia-ai/cli audit --json --ci --fail-on warnThe 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.
Sign in and out
Section titled “Sign in and out”npx @nicia-ai/cli loginnpx @nicia-ai/cli logoutlogin 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.
Migrate files
Section titled “Migrate files”From your repo, preview the files and then upload them to the space you choose.
npx @nicia-ai/cli migrate ./docs ./CLAUDE.md --space team-acme --dry-runnpx @nicia-ai/cli migrate ./docs ./CLAUDE.md --space team-acme --connect claude-codeWith 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.
Connect an agent
Section titled “Connect an agent”npx @nicia-ai/cli connect team-acme --client claude-codenpx @nicia-ai/cli connect team-acme --client codex --read-onlynpx @nicia-ai/cli connect team-acme --client cursor --dry-runconnect 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.
List and manage spaces
Section titled “List and manage spaces”npx @nicia-ai/cli spaces --jsonnpx @nicia-ai/cli space listnpx @nicia-ai/cli space create team-ops --name "Operations" --mode reviewednpx @nicia-ai/cli space info team-opsnpx @nicia-ai/cli space connect team-ops --client codexspaces 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}.
Sync committed files
Section titled “Sync committed files”Install the Git post-commit hook and run the first sync from your repository.
npx @nicia-ai/cli hook install --space team-acmenpx @nicia-ai/cli sync --dry-runnpx @nicia-ai/cli syncThe 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.
npx @nicia-ai/cli hook uninstall