Ciiteddocs

Getting started

Run the Ciited CLI and MCP server locally.

Prerequisites

  • Node.js 20+
  • A Ciited account with at least one workspace
  • Env vars from .env.local.example

Environment file

Put headless vars in .env.local at the repo root (same file as Next.js). The ciited command loads it automatically — you do not need to export each variable.

Minimum for CLI/MCP:

CIITED_ACCESS_TOKEN=eyJ...          # Supabase user JWT (see below)
NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=...
NEXT_PUBLIC_API_BASE_URL=...

Shell variables already set in your environment override .env.local (useful for one-off tokens).

Access token

Use a personal access token (recommended), like GitHub:

  1. Settings → CLI & MCP
  2. Add a note, choose expiration (7 / 30 / 60 / 90 days or custom, up to 366 days)
  3. Generate tokenCopy (shown once)
  4. Paste into .env.local as CIITED_ACCESS_TOKEN=ciited_pat_...

The server must have SUPABASE_JWT_SECRET set (Supabase → Project Settings → API → JWT Secret) so PATs can be exchanged for RLS-safe JWTs.

You can still use a browser session JWT from the same page (expires ~1 hour).

Global ciited command

One-time setup from this repo:

npm install
npm link

Then from any directory:

ciited workspaces
ciited metrics sov --workspace <uuid>

ciited always reads this checkout’s .env.local (the repo you linked), not the directory you run the command from.

You can still use npm run ciited -- workspaces inside the repo — it uses the same loader.

If you belong to multiple workspaces, pass --workspace on every command that needs a tenant scope.

MCP

See MCP install. Root .mcp.json registers the server for Claude Code when run from this repo.

npm run smoke-mcp   # requires CIITED_ACCESS_TOKEN

On this page