Local capability CLI, daemon lifecycle manager, and MCP router for RUDI.
Node.js, plain JavaScript. Package: @learnrudi/cli.
RUDI owns local tools, secrets, package/index state, MCP access, durable artifacts, safe workspaces, and bounded detached-launch lifecycle. Claude, Codex, Gemini, and other native hosts own normal model execution, sessions, transcripts, and provider-native orchestration.
The default help is deliberately divided into four groups. Keep new commands in the narrowest appropriate group and update the command-surface contract tests when the grouping changes.
rudi init, search, install, remove, update, listrudi skills, home, status, doctor, run, secretsrudi integrate, instructions, indexrudi agent hosts|models|launch|resume|list|status|attach|stop|diff|promote|discard|grouprudi auth, check, info, local-llm, mcp, runtimerudi daemon, shims, studio, which, lanes, leveragerudi serve is the daemon process entrypoint. Users should manage it with
rudi daemon.apply, db, database, import, logs, par, parallel, project,
projects, run-group, run-groups, session, and sessions are bounded
migration notices. They exit nonzero and never load retired runtime code. Do
not reintroduce implementations or compatibility routes behind these names.
src/index.js
├── src/commands/ CLI validation, dispatch, presentation
├── src/agent-host/ provider adapters and launch/workspace core
├── src/daemon/ loopback HTTP API and lifecycle runtime
├── src/router-mcp.js installed-stack MCP router
└── packages/* reusable installer/runner/env/MCP packages
Important boundaries:
/agent-host/v1 but does not become the model
loop or transcript authority.src/agent-host/lifecycle.js is a stable facade over separate process and
workspace lifecycle modules.src/commands/daemon.js is a terminal adapter; lifecycle orchestration lives
in src/daemon/runtime/lifecycle.js.src/commands/serve.js composes only health, environment, local-LLM,
package, and Agent Host routes.packages/db remains an isolated compatibility package for checked-in
Studio consumers. CLI production code and packages/runner must not import
it. Existing ~/.rudi/rudi.db files are preserved but never opened,
migrated, repaired, or deleted by the CLI.The active home connection files are ~/.rudi/daemon.port and
~/.rudi/daemon.token. The loopback API uses x-rudi-token; never put tokens
in URLs or logs.
Canonical sources:
src/contracts/daemon-openapi.jsdocs/daemon/openapi.jsonsrc/daemon/routes/index.jsRetained route families are:
GET /health/ready, /version, /daemon/status, /env/local-llm/* and /packages/*/agent-host/v1/*Removed /agent/*, /sessions/*, filesystem, shell, terminal, analytics,
notes, projects, plans, and WebSocket sidecar contracts must return the normal
authenticated 404. Do not add compatibility adapters.
MCP config, managed instructions, and native skill projections are separate:
rudi integrate <agent> writes one MCP server entry for
~/.rudi/bins/rudi-router.rudi instructions <agent> --install updates the managed instruction block.~/.rudi/skills is the canonical installed package layer. rudi install
skill:<id> reconciles that exact skill to configured native hosts by default;
use --no-sync-skills to opt out or --sync-skills=<host[,host]|all> to
select hosts explicitly.rudi skills sync <agent> reconciles complete derived trees in the host’s
native skill directory and records ownership receipts under
~/.rudi/state/native-skills/<host>/. Receipts bind the canonical source,
complete package, and rendered tree digests to the exact host target. Managed unchanged trees update
automatically; drifted and unmanaged trees are preserved unless exact scoped
--force is supplied. Whole-inventory force also requires --all.restartRequired; RUDI does not claim host hot reload.$RUDI_HOME/native-skills.json.
Package IDs and receipt filenames remain stable. Receipt schema 3 separates
package ID from native name; schema 2 remains readable. Never infer ownership
from a matching name, move old targets automatically, or overwrite private
variants during a rename. Keep naming policy in the shared native lifecycle,
not individual command adapters.Discover installed stacks with rudi list stacks --json or inspect
~/.rudi/cache/tool-index.json. Rebuild with rudi index --json. Do not use or
document rudi mcp --list; it is unsupported.
https://raw.githubusercontent.com/learnrudi/registry/main/index.jsoncatalog/stacks/{id}/manifest.jsonfile:// paths or RUDI_REGISTRY_ROOTUse the repository commands, not ad hoc substitutes:
pnpm test
pnpm build
node scripts/agent-debt-runner.mjs --changed-since origin/main --no-log
npm pack --dry-run
After editing JS/TS, run the focused debt scan described by the global
instructions. Build output under dist/ is tracked; refresh it in a dedicated
build commit. CI in .github/workflows/quality.yml enforces tests, build
reproducibility, changed-file debt scanning, and package contents.
The change author owns documentation impact; the reviewer checks it before acceptance. Update the current guide in the same change as observable behavior, commands, contracts, schema, configuration or operating procedures. A dated compliance record is evidence, not a replacement for current guidance.
| Changed surface | Current documentation to review |
|---|---|
| Commands, flags, installation, runtime requirements | README.md, docs/cli-layout-and-installation.md, package.json |
| Native hosts, registered tasks, permissions | docs/frontier-agent-hosts.md, docs/agent-task-execution.md, docs/compute-trusted-access.md |
| Daemon routes | docs/rudi-local-daemon-architecture.md; generate docs/daemon/openapi.json from src/contracts/daemon-openapi.js |
| Registry/runtime or Compute bridge compatibility | The owning Registry/Compute contract and the affected CLI guide; record the peer revision inspected |
.github/pull_request_template.md for the review record. This checklist
requires review; existing CI does not establish semantic documentation
correctness or ongoing freshness.