@cendor/init
v0.2.2
Published
Make your project Cendor-ready and Cendor-fluent for your AI assistant in one step — writes assistant rules files, optional MCP config, and a correct starter, plus a `doctor` that catches wiring mistakes. Offline, no key, no network.
Maintainers
Readme
@cendor/init
One command to make your project Cendor-ready and Cendor-fluent for your AI assistant — plus a
doctor that catches the wiring mistakes before they bite. Offline: no network, no API key.
npx @cendor/init # detect + write assistant rules files (idempotent)
npx @cendor/init doctor # validate the wiring; exit 1 on hard problems (CI-usable)Optional developer tooling. It writes files and inspects your project — it makes no network call and no Cendor library depends on it at runtime. (Python users:
uvx cendor-init.)
What init does
Detects your project — Node (
package.json) or Python (pyproject.toml/requirements), which provider SDKs you have, and which@cendor/*/cendor-*packages are installed.Writes the matching assistant rules file(s) so your assistant reads the correct Cendor call-shapes on every edit — no need to paste anything. Detected by default;
--allfor every one:.github/copilot-instructions.md(GitHub Copilot).cursor/rules/cendor.mdc(Cursor)AGENTS.md(the cross-tool default — always written)- a marked section in
CLAUDE.md(Claude Code) .windsurf/rules(Windsurf)
Idempotent and safe: re-running updates a marker-delimited block in place — it never duplicates, and never clobbers your surrounding content. A dedicated file it didn't create is left alone unless you pass
--force.Offers MCP setup (
--mcp) — drops the connect config for the Cendor MCP server (remotemcp.cendor.aior localnpx @cendor/mcp/uvx cendor-mcp) where it's absent.Optional starter (
--scaffold) — a minimal, correct starter in your language: a governedAgentloop (budget + guardrails +guard+ audit) when@cendor/sdk/cendor-sdkis detected, otherwise aninstrument()+ budgeted-call example.
The rules content is a copy of section 3 of the docs source of truth,
for-ai-assistants — the single place these traps live.
What doctor checks
Static checks only — it never mutates your project, and exits non-zero on hard problems so it works in CI:
- Namespace — flags a stray
cendor/__init__.pyin your tree, or a bareimport cendor(the namespace has no module body — importfrom cendor.<tool>). - Provider deps — a provider SDK your code imports but hasn't installed (Cendor never pulls one for you).
instrument()once — warns if Cendor is imported but the client is never wrapped (nothing is observed).- Money — flags coercing a price/cost to
float/number(it should stayDecimal/decimal.js). - Versions — warns when an installed/pinned
@cendor/*version trails the latest release.
npx @cendor/init --helpOptions
| Flag | Effect |
|---|---|
| --all | write every assistant rules file, not just the detected ones |
| --assistant <list> | comma-separated subset: copilot,cursor,agents,claude,windsurf |
| --mcp | also drop MCP connect config where absent |
| --scaffold | also write a correct starter — a governed Agent when the SDK is present, else instrument()+budget |
| --force | overwrite an owned file (.cursor/rules/cendor.mdc) even if not ours |
| --dry-run | show what would change without writing |
Apache-2.0 · cendor.ai · For AI assistants · MCP
