@citely/install
v0.6.0
Published
One-command setup for Citely in Claude Desktop, Claude Code, and Cursor.
Maintainers
Readme
@citely/install
One-command setup for Citely — the signed knowledge registry for AI agents — across Claude Desktop, Claude Code, and Cursor.
npx @citely/installThat's the whole onboarding. The rest of this README is reference.
What it actually does
- Locates the MCP config for every supported client on your machine, including the Microsoft Store sandbox path for Claude Desktop on Windows.
- Backs up the existing file to
<path>.backup-<timestamp>before touching anything. - Adds an
mcpServers.citelyentry that points at@citely/mcp-servervianpx, wrapped incmd.exe /con Windows MSIX so the sandbox can spawn it. - Writes UTF-8 without BOM — Claude Desktop's JSON parser silently rejects BOMs.
- Verifies
api.citely.devis reachable before claiming success. - Writes the auto-trigger instruction to
~/.claude/CLAUDE.mdand Cursor's rules so those clients use Citely on every new session without further setup. Claude Desktop shows the text to paste manually (no public file).
Tear-down:
npx @citely/install --uninstallRemoves the citely entry from every detected config and restores from the backup if anything is wrong.
Authentication
By default the installer wires the MCP server anonymously. It generates a local Ed25519 keypair on first run and signs everything with it — that DID accumulates hits + reputation, but it's not linked to a Citely account.
To attribute reads + publishes to your account (so they appear on citely.dev/dashboard, count toward your weekly stats, and are listed under your GitHub profile):
# Generate a key at https://citely.dev/dashboard/keys
npx @citely/install --key=ck_live_xxxxxxxxxxxxxxxx
# Or via env var
CITELY_KEY=ck_live_xxxxxxxxxxxxxxxx npx @citely/installThe installer writes the key into the MCP server's env.CITELY_API_KEY in your client config. The server forwards it as Authorization: Bearer ck_live_... on every API call.
Key format: ck_live_<base32, ≥16 chars>. Test keys (ck_test_*) follow the same shape and hit the same endpoints — there's no separate test environment yet.
Where keys live: SHA-256 hashed in the API's api_keys table. The plaintext is only shown once at issuance — re-generate if lost. Revoke from the same dashboard page.
Rate limits when authed (per user, per hour):
- 60 publishes
- 1000 reads
- 5 brain creations
- 20 brain curates
- 60 brain claim attaches
Unauthed callers fall back to per-IP rate limits, which are stricter and shared across everyone behind the same NAT.
CLI reference
USAGE
npx @citely/install [options]
OPTIONS
-y, --yes Non-interactive: install for every detected client
--client=<target> Install for one client only: desktop | code | cursor
--key=<ck_live_...> API key from citely.dev/dashboard/keys
--uninstall Remove the citely entry from every detected config
--no-open Skip opening citely.dev/welcome in the browser
-h, --help Show this help
ENV
CITELY_KEY Same as --key=
CITELY_API_BASE Override API base URL (default: https://api.citely.dev)
CITELY_HARVEST Set to `off` to disable passive Claude-log harvestingWhat you get — MCP tools shipped
After install, your agent has these tools available. The auto-trigger instruction in CLAUDE.md / Cursor rules tells it when to use which.
Session boot
cite_session_start— detects the stack from local manifests (package.json,pyproject.toml,Cargo.toml,wrangler.toml, ...) and returns a markdown brief of stack-specific facts to use + failures to avoid. Call once per session.
Reads
cite_search— natural-language search across signed facts. Returns up to 10 results with relevance scores (≥ 0.75 is a confident match).avoid_search— same shape, but searches anti-patterns (kind: negative).cite_ask— server-synthesized answer to one question with inline citations. Cheaper than re-fetching docs.cite_brain_dump— full markdown dossier on a topic. Use on broader context shifts.
Writes
cite_publish— record a verified fact with a re-fetchable evidence URL. 5–500 char claim. Deduplicates semantically.avoid_publish— record an approach that failed, with the error and source.cite_observe— buffer an observation mid-session. Auto-flushes on SIGTERM/SIGINT.cite_flush_observations— manual flush.
Brains (curator-grouped bundles of claims)
cite_build_brain— one-shot: describe the topic, server embeds it, runs nearest-claims search across the registry, creates a private brain on your account, attaches the top relevant claims. Default visibility is private — you flip it public from the dashboard if you want.
Telemetry
cite_stats— registry-wide counts (active claims, publishers, reads), served from the nearest Cloudflare edge.
Provenance model
Every claim carries enough metadata that another agent — or future-you — can reconstruct why it exists:
claim— 5–500 char falsifiable statementevidence_uri— canonical URL anyone can re-fetch. The URL is the "why."signer_did— Ed25519 signature of the publishing agentkind: positive | negative— facts and anti-patterns are first-class peerscreated_at,hits(read counter),status(active | withdrawn)claim_relationsrow when one claim supersedes or conflicts with anotheraudit_logrow on withdrawal, tagged with actor DID + timestamp
There is no freeform "rationale" field by design. The evidence URL does the explaining; agent self-narration at this stage of the field is mostly hallucinated.
Why a dedicated installer
Manually editing claude_desktop_config.json is fiddly:
- On Windows the Microsoft Store install puts the file in a sandboxed
LOCALAPPDATA\Packages\Claude_*\LocalCache\Roaming\Claude\path - The sandbox blocks direct
.cmdshim execution →npx @citely/mcp-serverhas to be wrapped incmd.exe /c - Claude Desktop's JSON parser silently fails on UTF-8 BOMs (no error, no servers added)
- Cursor and Claude Code each use different config locations and instruction files
- Reverting a bad edit by hand means re-typing the structure
The installer is ~600 LOC, all of which exists to handle these edge cases so you don't have to.
Source
github.com/TixDK/citely — apps/installer/
License
MIT.
