@intutic/cli-control-plane
v3.2.3
Published
The intutic commands that only work against a control plane (login, connect, guardrails, keys, org, ...). @intutic/cli loads this package at startup when it is installed next to it.
Readme
@intutic/cli-control-plane
The intutic commands that only work against a control plane: login, logout, whoami,
connect, sync-context, decisions-log-refresh, sops, guardrails, keys, attenuate,
org, team, gateway, credentials, settings, mcp, notifications, siem, tasks,
compliance, usage, github, inventory, gate-liveness, findings, incidents,
integrity, routing, predict-cost, optimizer, loop, decision, enterprise, judge,
and the subcommands budget set|keys|key|members|member, policy snapshot|replay and
enforce report.
Install it next to the CLI, with the same version:
npm install -g @intutic/cli @intutic/cli-control-planeThe public @intutic/cli does not contain any of this code: it loads this package at startup
when it is installed next to it, and without it prints where a control-plane command comes from.
This package is proprietary: see LICENSE. It is a client. What it can do is decided by the
control plane it signs in to, so it holds no entitlement and no secret.
How it is loaded
tools/cli/src/lib/controlPlanePlugin.ts (shared with the public repository) does
await import('@intutic/cli-control-plane') at startup, by a variable specifier, and calls this
package's register(program, ctx) (src/index.ts) before the command line is parsed. If the
package is not installed the CLI has no such commands; any other failure to load it is an error.
- In this repository the root
package.jsonlists the package as a devDependency, so the workspace link puts it wheretools/clifinds it. The CLI's own tests then load it, soturbo.jsonmakes@intutic/cli#testwait for this package's build; runningvitestintools/clidirectly needs it built first. - Installed from npm.
publish.yml'spublish-plugin-npmjob publishes the tarball eachv*release of this repository carries, after the public release, whose packages it depends on.npm install -gputs it in the samenode_modulesas the CLI, so Node resolves it from there.
What it builds on
The plugin imports the CLI's internals (credentials, the API client, paths, ...) from
@intutic/cli/<subpath>. The subpaths are the explicit exports of tools/cli/package.json:
add one only for a module a plugin command needs. The plugin API version (PLUGIN_API_VERSION in
controlPlanePlugin.ts) is checked on register; bump both sides when the contract changes.
Keeping the CLI's list of names in step
A CLI without this package answers a control-plane command from a list of names
(CONTROL_PLANE_COMMANDS in controlPlanePlugin.ts). src/registration.test.ts holds that list to
what register adds, and the CLI's cliReference.test.ts holds it to apps/docs/reference/cli.md.
Adding a command here means adding its name there, in the public repository first.
Tests
pnpm --filter @intutic/cli-control-plane run testsrc/cli.plugin.test.ts runs the real CLI entrypoint with the plugin loaded. The rest are the
tests that moved with the commands.
Enterprise-edition binary
pnpm turbo build --filter=@intutic/cli-control-plane
pnpm --filter @intutic/cli-control-plane run build:binary -- --targets node22-linux-x64,node22-macos-arm64scripts/build-binary.mjs bundles the CLI and this package into one module with esbuild and
packages it with pkg; see the script for why a plain pkg of tools/cli cannot include a plugin.
The public release job (tools/cli alone) is unchanged and produces a binary without these commands.
