Commands Reference¶
All commands share the same output format and exit-code contract.
Output format: JSON on stdout (success and failure), except help/version output and interactive prompts.
Exit codes: 0 = success, non-zero = failure.
Prerequisite for all commands: cube must be installed and on PATH.
Global options¶
Place global options before the command name, for example:
cube agentic-ai --verbose progress machine-bootstrap --dry-run
Option |
Default |
Description |
|---|---|---|
|
|
Control diagnostics on stderr. |
|
off |
Print human-readable help. Use |
|
off |
Print the installer version. |
Output envelope¶
Non-interactive command execution writes exactly one JSON object to stdout. The envelope fields are identical regardless of success or failure.
Interactive commands can print prompts before the final JSON result. For JSON-only automation, use
non-interactive service selection and deployment modes, and project-remove --confirm-always when
confirmation would otherwise be required. Help and version requests print text instead of an envelope.
Success¶
{
"ok": true,
"command": "<stable-command-id>",
"timestamp": "<ISO-8601 UTC>",
"data": {}
}
Field |
Type |
Description |
|---|---|---|
|
|
Always |
|
string |
Stable command identifier, e.g. |
|
string |
ISO-8601 UTC timestamp of command execution, e.g. |
|
object |
Command-specific payload. Shape varies per command; each command section below documents its fields and status codes. |
Failure¶
{
"ok": false,
"command": "<stable-command-id>",
"timestamp": "<ISO-8601 UTC>",
"error": {
"code": "UPPERCASE_ERROR_CODE",
"message": "Human-readable description of the failure.",
"cause": "Root-cause detail for diagnostics.",
"details": {}
}
}
Field |
Type |
Description |
|---|---|---|
|
|
Always |
|
string |
Stable command identifier. |
|
string |
ISO-8601 UTC timestamp of command execution. |
|
string |
Stable uppercase error code, e.g. |
|
string |
Human-readable failure description. |
|
string |
Root-cause detail intended for diagnostics. |
|
object? |
Optional structured context (present only when additional machine-readable detail is available). |
Parsing guidance¶
Read
okfirst to branch between success and failure paths.On success, the command-specific payload is always under
data.On failure, the structured reason is always under
error.codeanderror.message. Do not try to parseerror.messageprogrammatically. Useerror.codefor branching.ok: truedoes not always mean every sub-operation succeeded. Multi-item commands can report partial outcomes insidedata. Inspect command-specific aggregate status fields and per-item statuses as documented in each command section.timestampis informational. Do not use it for flow control.In non-interactive command execution, no other text is written to stdout. Progress messages and diagnostics go to stderr.
Key concepts¶
See Concepts for the conceptual model (bundle lifecycle, SemVer/version selection, machine vs project scope, lock files, orchestration catalog, and additive deployment behavior).
Commands¶
setup and doctor are the entry commands: they cover the whole journey of installing the toolkit and
checking that it works. The other commands are the building blocks they use, for advanced control
(pinned versions, selected services, presets, removal, upgrades).
Only setup and doctor handle the requirements that contexts declare: Python packages, tool bundles
such as the STM32CubeMX2 application, and VS Code extensions. The building blocks (machine-bootstrap,
machine-install, project-add, project-deploy, project-deploy-installed) never check or resolve
them. After one of them, run cube agentic-ai doctor <project_top_folder> --fix to install what the
deployed contexts need, and read its data.nextSteps for what only you can do.
setup¶
Install the toolkit on the machine and deploy it into a project in one run: install the contexts the target can use, resolve the dependencies they declare, create the project folder, deploy the contexts into it, and diagnose the result. The request is the consent: nothing is asked during the run.
cube agentic-ai setup [options]
Option |
Default |
Description |
|---|---|---|
|
|
Project top folder, created when missing. The home folder and file system roots are refused ( |
|
all contexts the target can use |
Install only these catalog bundles. The installer bundle, which carries the housekeeping and doctor skills, is always added. A context that needs VS Code fails with another IDE target ( |
|
|
Python used for context packages: |
|
the Default profile |
VS Code target only. Profile that receives the extensions; repeat the option for several profiles. The exact profile name is used; invalid names are refused. |
|
|
IDE target. See Target selection. |
|
|
Agentic system target. |
|
off |
Deploy under the |
|
|
|
|
off |
Opt-in. The installer runs |
|
off |
Report what |
Behavior:
A project folder may already contain user files, but if it has a services lock (
.cube-ai/services-lock.json) setup refuses it withSETUP_PROJECT_ALREADY_DEPLOYED, before anything is installed. Use setup only for a folder not yet deployed by this installer. To change contexts in a deployed project, useproject-addorproject-remove, thendoctor <project_top_folder> --fix.A bundle that fails to install does not stop the others. In that case,
data.statusisPARTIAL. Readdata.bundles[],data.deploymentFailures[]anddata.nextSteps[]. The next steps give completeproject-addand bundle-scopeddoctor --fixcommands to retry a failed installation or deployment. Setup itself cannot be rerun after any context was deployed. If every bundle installation fails, setup returnsALL_BUNDLES_FAILEDbefore creating the project folder, and can be retried after fixing the cause.Python choices are project-scoped and made once, when
setupcreates the project. Setup cannot change the choice of a deployed project. Setup passes the target project folder to declared Python checks and resolutions, and stores the selected interpreter under.cube-ai/esw-python/<bundle>@<version>.json. The Python executable itself is never installed. A new ESW bundle version without a choice file starts from the project’s most recent choice. Another project can choose a different interpreter. See Python of the eSW context.An ESW setup checks and applies its idempotent Python dependency resolution even when the declared package ranges already pass, so the requested choice is recorded for that project.
--dry-rundoes not write the setting.Progress goes to stderr: a line per step and per bundle, and a line every 10 seconds while a bundle installs or a resolution runs. A fresh installation can take several minutes: allow a long timeout, or run it in the background. Running it again resumes when it stopped before deploying. Once it has deployed, finish with
doctor <project_top_folder> --fix. stdout carries only the JSON result.--verbose nonesilences stderr.All services of each context are deployed. To select services or pin versions, use
project-add.
Outcome:
Returns:
data.status(ALL_DEPLOYEDorPARTIAL),data.readiness(READY,CHECK_MANUALLYorACTION_REQUIRED),data.bundles[],data.deployed[],data.deploymentFailures[],data.resolutions[],data.licenses[],data.requirements[],data.blockedServices[],data.unavailableContexts[],data.notices[], anddata.nextSteps[].ALL_DEPLOYEDdescribes bundle deployment, not requirement readiness. Readdata.readinessanddata.nextStepsfor remaining work.data.licenses[]reports the identifiers declared by installed bundles. The context bundles declareSLA0044 Rev 7 - February 2026. STM32CubeCLI remains under SLA0048.VS Code target: when an installed context declares an extension,
data.vscodeExtensions[]lists the declared extensions.data.vscodeProfiles[]gives, for each profile, averifyCommandto list its extensions, oneinstallCommandsentry per declared extension (VS Code leaves an installed one unchanged), and anopenCommand.data.openCommandopens the project in the first profile ofdata.vscodeProfiles[](the Default profile when none is named): run theverifyCommandof that profile first, and do not run the open command if the profile is not found, because VS Code would create an empty profile of that name.data.recommendationsreports the update of.vscode/extensions.json:statusisADDED,UNCHANGEDorNOT_UPDATED. A file that has comments or an unexpected shape is not rewritten:statusisNOT_UPDATED,reasonsays why, and the extensions to add are thedata.vscodeExtensions[]entries.RECOMMENDATIONS_NOT_WRITTENis raised only when writing the file fails. During setup,coderuns only with--install-vscode-extensions; otherwise the agent or user runs the returned commands after verifying the profile.Who runs
code: setup returns extension commands unless--install-vscode-extensionsis supplied. Doctor returns commands unless both--fixand an explicit--vscode-profile "<name>"are supplied. That combination verifies the named profile and installs missing declared extension dependencies there. Doctor never installs into an implicit Default profile. The commands follow the VS Code command line reference:Purpose
Command
Notes
List the extensions of a profile (
verifyCommand)code --list-extensions --profile "<name>"Without
--profile, the Default profile. For a profile that does not exist it reports that it was not found and creates nothing. Compare the extension ids without case.Install an extension (
installCommands)code --install-extension <publisher.extension> --profile "<name>"An extension that is already installed is left as it is.
--forceis never used, because it would update an extension that the user already has.Open the project (
openCommand)code "<project folder>" --profile "<name>"For a profile that does not exist, VS Code creates an empty profile of that name, so run it only after the verification.
Every path and profile name is in double quotes, so the commands can be pasted in PowerShell, cmd, bash and zsh. VS Code Insiders is started with
code-insiders, whichsetupdoes not look for.No declared extension: nothing needs
code, sodata.vscodeProfilesis empty, there is nodata.openCommand, and the next step says to open the project folder in VS Code. A--vscode-profileoption has no effect then, and a next step says so.codenot on the PATH:data.vscodeCli.onPathisfalseand the warningVSCODE_CLI_NOT_FOUNDis raised. Run none of the VS Code commands: the extensions were not checked, so they are not necessarily missing. Install them from the Extensions view, or accept the proposal that VS Code makes when the folder opens. To getcode: on macOS, run the Command Palette command “Shell Command: Install ‘code’ command in PATH” (named “Install ‘code’ and optionally ‘copilot’ commands in PATH” in recent versions); on Windows and Linux, reinstall VS Code or add itsbinfolder to thePATH(Windows default:AppData\Local\Programs\Microsoft VS Code\bin).Routing instruction:
data.hostInstructionUpdateholds the instruction to add to the host instruction file so that the agent consults the routing skill.data.hostInstructionUpdate.instructionFilenames that file for the selected agentic system (.github/copilot-instructions.mdfor GitHub Copilot,CLAUDE.mdfor Claude Code,AGENTS.mdfor Cursor). A next step repeats it.Other IDE targets: the next step is to start your agent in the project folder.
Exit code:
0whenever the installation ran, including with unmet prerequisites. Readdata.readiness.Machine level: installs Cube bundles and runs the commands that bundles declare as resolutions.
Project level: creates the project folder, deploys the contexts, writes both project locks, recommends extensions, and stores the ESW Python choice under
.cube-ai/esw-python/when an ESW Python dependency is resolved.
Dry run limits (--dry-run): the requirements of a bundle are declared in the bundle itself and can be read only once it is installed. A dry run therefore cannot show the requirements of a bundle that would be installed: those bundles are listed in data.requirementsAfterInstall, and the real run can still end with unmet prerequisites (for example Python) that the plan does not show.
For a bundle that would be updated, requirements are read from the version installed today, not from the new one (each requirement carries
readFromVersion).Licenses of bundles that are not installed yet are unknown (warning
LICENSES_UNKNOWN_BEFORE_INSTALL).Versions to install come from the online index (warning
ONLINE_INDEX_UNREACHABLEwhen it cannot be read).With
--dry-run,data.modeisDRY_RUN, each entry ofdata.bundles[]isINSTALL,UPDATE,KEEPorUNKNOWN, anddata.applyCommandis the command that applies the plan.Every command that
setupanddoctorprint (applyCommand, the--fixcommand, the VS Code commands) is safe to copy and paste in PowerShell, cmd, bash and zsh: each path and profile name is in double quotes, spaces and Chinese, Japanese or Korean characters included. A value that a shell would interpret inside double quotes (a double quote,$, a backtick,%,!, a line break, a trailing backslash, or consecutive backslashes such as a UNC path) is never written wrongly: the command is left out and the next step says to run the same command yourself.
Example:
cube agentic-ai setup --dry-run
cube agentic-ai setup --project-folder ~/work/my-board
cube agentic-ai setup --contexts cube-agentic-ai-st-docs,cube-agentic-ai-sidekick-kb --project-folder ~/work/my-board
doctor¶
Check the requirements that the installed contexts declare: tools, Cube bundles, Python packages, extensions. Use it when an issue arises, or to verify an installation.
cube agentic-ai doctor [<project_top_folder>] [options]
Argument / option |
Default |
Description |
|---|---|---|
|
machine scope |
Check the contexts and services deployed in this project. Omit it to check the contexts installed on the machine, with all their services. |
|
all |
Check only these catalog bundles. |
|
off |
Resolve the unmet dependencies, then check again. |
|
the Default profile |
VS Code profile of the project, one at most, written in the extension commands of |
Requirement kinds:
prerequisite: something the user must ensure. The installer reports its remediation text and link but never acts on it.
dependency: something the installer can resolve.
--fixresolves it, unless an unmet prerequisite of the same services blocks it.
Statuses: satisfied, unmet, manual (check by hand), unknown (the check could not run). Read-only extension checks are manual and carry extensionId. With --fix --vscode-profile "<name>", successful verification/installation makes them satisfied for that invocation; failed installations are unmet, while an unavailable profile or code leaves them unknown. A subsequent read-only run returns extension checks to manual because it does not inspect the active window.
Doctor starts with an activity line on stderr, before checking the contexts. Progress and diagnostics never go to stdout. stdout remains JSON-only. Pass --verbose none to suppress stderr progress and diagnostics explicitly.
Outcome:
Returns:
data.readiness,data.contexts[].requirements[],data.blockedServices[](services that cannot work because of an unmet requirement),data.skipped[](contexts not checked, with the reason:NOT_INSTALLED,NOT_DEPLOYED,BUNDLE_VERSION_NOT_PRESENT_ON_MACHINEorAI_METADATA_INVALID),data.warnings[],data.nextSteps[], anddata.fixes[]with--fix.Skipped contexts: a skipped context is not known to be fine, so
data.readinessisACTION_REQUIREDwhile one is skipped. The only exception is a catalog context that is not installed when the whole machine is checked without--bundles, which is a choice (setup --contexts). ForNOT_DEPLOYED,data.nextStepsgivesproject-addanddoctor --fixcommands for this folder and preserves the target recorded by another deployed context when available.BUNDLE_VERSION_NOT_PRESENT_ON_MACHINEis an error: the version deployed in the project is not installed on the machine (it was removed), so the scripts and the catalog that its services need may be missing and it cannot be checked. The entry carriesdeployedVersionand, when one is installed,installedVersion; its next step starts withERRORand offers two ways out: restore the exact version withcube bundle install <bundle>@<deployed version>, or replace it with the latest installed one,project-removethenproject-add <bundle>@<installed version> --services all; either way followed bydoctor <project_top_folder> --bundles <bundle> --fix, because neither command resolves requirements (a restored ESW version, for example, has lost its Python environment).No deployed contexts: when the project has never been deployed,
doctorsuggestssetup. If it has a services lock left after its contexts were removed,setuprefuses it. The fielddata.nextStepssays so and suggests adding a context withproject-add <bundle> <project_top_folder>using the intended target, then runningdoctor --fix.Not on the latest version: several versions of a bundle can coexist on a machine. When the version deployed in the project is installed but a newer one is installed too, the context is checked as usual, carries the warning
NOT_LATEST_MACHINE_VERSIONandlatestInstalledVersion, and a next step gives the same replacement commands, ending with thedoctor --fixcommand. It is a notice, not an error.setupnever moves a deployed context by itself.VS Code extensions:
data.vscodeProfilegives verify/install/open commands for the named profile, or Default when omitted. With--fixand an explicit profile, doctor runs verification and installs missing dependency extensions automatically.data.vscodeInstallreports the profile result (PROCESSED,PROFILE_UNAVAILABLE, orCODE_FAILED) and each extension (INSTALLED,ALREADY_INSTALLED, orFAILED); matchingdata.fixes[]entries carrytype: "vscode-extension"and the status afterwards. It never creates a profile, uses--force, opens a window, or reloads VS Code. Without an explicit profile, extensions stay manual even with--fix; run the returned commands manually if desired. Reload the VS Code window after installation.Exit code:
0whenever the diagnosis ran, including with unmet requirements. A failure to run it returnsok: false.Machine level: read-only without
--fix. With--fix, installs Cube bundles (never recorded in a project lock) and runs declared resolutions. With an explicit--vscode-profile, it also installs declared extension dependencies in that profile. A project-scoped Python choice needs a project folder. Use project-scope doctor for that dependency. Without a project folder, that check isunknown, not a claim that Python packages are missing.Project level: read-only without
--fix. With--fix, it applies only declared dependency resolutions. An ESW resolution can write its Python choice under that project’s.cube-ai/esw-python/. It does not deploy contexts or change project locks.
Example:
cube agentic-ai doctor ~/work/my-board
cube agentic-ai doctor ~/work/my-board --bundles cube-agentic-ai-esw --fix
cube agentic-ai doctor ~/work/my-board --vscode-profile "STM32 dev"
cube agentic-ai doctor ~/work/my-board --vscode-profile "STM32 dev" --fix
machine-bootstrap¶
Install all STM32Cube Agentic Context bundles supported by the installer on the machine. Any required Cube tool dependency bundles are installed automatically by the cube bundle manager.
Scope note:
--upgrade-installed-in-rangeapplies to installer-catalog context bundles only.Transitive tool dependency bundles are resolved and installed by the
cubebundle manager according to its standard dependency resolution policy.
cube agentic-ai machine-bootstrap [options]
Option |
Default |
Description |
|---|---|---|
|
off |
Report what would be installed without installing |
|
|
When |
Outcome:
Returns: command-level
data.status, plus per-bundle status (WOULD_INSTALL,WOULD_UPDATE,ALREADY_INSTALLED,INSTALLED,UPDATED, orFAILED) indata.results[]for every context in the set.Partial failure: if at least one context is installed, updated, already installed, or would be installed/updated, the command returns
ok: true,data.status: "PARTIAL", and any failed context is reported asstatus: "FAILED"indata.results[]with areason.All failed: if every processed context fails, the command returns
ok: falsewitherror.code: "ALL_BUNDLES_FAILED". Per-bundle failure details are available inerror.details.results.Machine level: context bundles are installed, kept as-is, or updated. Required tool dependencies are resolved and installed by the
cubebundle manager.Project level: none.
Requirements: not checked or resolved. Use
setup, or rundoctor --fixafter the deployment.
Boolean value handling:
For
--upgrade-installed-in-range [true|false], accepted values are case-insensitive:true,false,1,0,yes,no,y,n.If
--upgrade-installed-in-rangeis provided without a value, it is interpreted astrue.
Command status codes (in data.status):
Status code |
Meaning |
|---|---|
|
Every processed context was installed, updated, or already installed. |
|
At least one context succeeded and at least one context failed. Inspect |
|
No context was processed, for example because the catalog was empty. |
|
|
Per-bundle status codes (in each data.results[] entry’s status field):
Status code |
Meaning |
|---|---|
|
Bundle was not present and has been successfully installed. |
|
Bundle was already present and has been upgraded to a newer eligible version. |
|
Bundle was already present on the machine; nothing changed. |
|
|
|
|
|
Installation attempt failed. A |
Idempotency and version update behaviour
machine-bootstrap behavior depends on the catalog versionSpec and on --upgrade-installed-in-range:
Catalog |
Matching rule |
Action when |
Action when |
|---|---|---|---|
absent |
any installed version accepted |
Missing bundles are installed. Already-installed bundles are left unchanged. |
Missing bundles are installed. Already-installed bundles can be upgraded when a newer eligible version is available. |
exact |
must match exactly |
Missing or non-compliant bundles are moved to |
Same as |
range |
must satisfy the range |
Missing or non-compliant bundles are moved to a compliant version. |
Missing or non-compliant bundles are moved to a compliant version; already-installed compliant bundles can be upgraded to a newer eligible version. |
The command remains machine-scoped and idempotent for repeated runs with the same options and unchanged bundle availability.
Idempotency by situation:
Situation |
Outcome |
|---|---|
All catalog contexts already installed at a version satisfying their spec |
All |
Newer within-range version available on server; installed version still satisfies spec; |
|
Newer within-range version available on server; installed version still satisfies spec; |
|
Installed version does NOT satisfy the spec (range raised, exact version changed) |
The bundle is moved to a compliant version; reported as |
New contexts added to the catalog |
New entries |
machine-install¶
Install one STM32Cube Agentic Context bundle on the machine. The installer verifies that the bundle is supported before proceeding. To install another kind of bundle, use cube bundle install directly.
If the context requires a STM32Cube tool delivered as a bundle, the cube bundle manager installs that tool dependency automatically — no separate install command is needed.
cube agentic-ai machine-install <bundle_name>
Argument |
Description |
|---|---|
|
Context bundle identifier, for example |
Outcome:
Returns: install status and resolved context bundle version.
Machine level: the context bundle is installed or reused. Required Cube tool dependencies are installed by
cube.Project level: none.
Requirements: not checked or resolved. Use
setup, or rundoctor --fixafter the deployment.
machine-discovery¶
Show what is currently installed on the machine. Context bundles installed through this installer are marked IN_SCOPE. Tool dependency bundles required directly by installed contexts are marked DIRECT_AI_DEPENDENCY. All remaining bundles are marked OUT_OF_SCOPE.
cube agentic-ai machine-discovery [options]
Option |
Default |
Description |
|---|---|---|
|
on |
Generate a machine catalog JSON file in addition to stdout command JSON |
|
off |
Disable machine catalog JSON file generation |
|
off |
Exclude |
|
|
Output path for the generated machine catalog JSON file |
Outcome:
Returns: command-result JSON on stdout with discovered bundles (
name,version,category). Category values areIN_SCOPE,DIRECT_AI_DEPENDENCY, orOUT_OF_SCOPE.Generated file: when
--jsonis enabled (default), writes a JSON file containing only the bundle list array (no command envelope fields likeokorerror).Validation: passing
--json-filetogether with--no-jsonfails with a structured option-combination error.Environment scope: discovery uses
CUBE_BUNDLE_PATHas the machine root and intentionally ignoresCUBE_BUNDLE_PATH_EXTRAfor listing and metadata classification.Machine level: none (read-only).
Project level: none.
Machine-discovery error codes:
Error code |
Meaning |
|---|---|
|
|
|
|
|
Context catalog file is missing. |
|
Context catalog file is not valid JSON. |
|
Context catalog fails schema validation. |
|
|
|
Failed to read installed context metadata for direct dependency classification. |
|
Machine catalog JSON output file could not be created or written. |
|
Unexpected machine-discovery failure not covered by a specific typed error code. |
show-catalog¶
Display the installer context catalog to discover which STM32Cube Agentic Context bundles it supports.
Purpose note:
This command reads the catalog bundled with the installer. It does not query the online registry.
cube agentic-ai show-catalog [options]
Option |
Default |
Description |
|---|---|---|
|
|
|
Boolean value handling:
For
--short [true|false], accepted values are case-insensitive:true,false,1,0,yes,no,y,n.If
--shortis provided without a value, it is interpreted astrue.
Outcome:
Returns: command-result JSON on stdout with
data.shortanddata.items.Machine level: none (read-only).
Project level: none.
Prerequisites:
cubemust be installed and onPATH.The installer bundle’s local catalog must be available. No network connectivity is required.
Show-catalog error codes:
Error code |
Meaning |
|---|---|
|
Context catalog file is missing. |
|
Context catalog file is not valid JSON. |
|
Context catalog fails schema validation. |
|
Unexpected show-catalog failure not covered by a specific typed error code. |
list-supported-targets¶
Display the deployment targets supported by this installer release, that is the accepted values of the
--ide and --agentic-system options used by the project commands.
cube agentic-ai list-supported-targets
This command takes no option.
Outcome:
Returns: command-result JSON on stdout with
data.ides,data.agenticSystems,data.defaultsanddata.canonical.Machine level: none (read-only).
Project level: none.
Each entry of data.ides and data.agenticSystems carries the id to pass to the option and a
human-readable label. data.defaults reports the values applied when the option is omitted.
data.canonical documents the --canonical option: instead of the native layout selected by --ide
and --agentic-system, --canonical deploys a generic folder structure under the canonical root
folder (.cube-ai/). The agentic system in use can then reshuffle that structure per its own needs.
Values are read from the installer deployment-targets catalog. A target appears only when it is marked
supported for the release. This release supports the IDE targets vscode and none, and the
agentic-system targets github-copilot and claude-code. To use Claude Code without an IDE binding,
pass --ide none --agentic-system claude-code.
List-supported-targets error codes:
Error code |
Meaning |
|---|---|
|
Target matrix catalog is missing or fails schema validation. |
|
Target matrix catalog flags no supported IDE or agentic-system target. |
|
Unexpected failure not covered by a specific typed error code. |
project-add¶
Add one STM32Cube Agentic Context bundle to a project: installs it on the machine if needed, then deploys its files into the project folder and assembles the routing file.
cube agentic-ai project-add <bundle_name> <project_top_folder> [options]
Argument |
Description |
|---|---|
|
Context bundle reference: |
|
Absolute or relative path to the project top folder |
Option |
Default |
Description |
|---|---|---|
|
— |
Deploy only the listed service IDs (plus required ones). Special value: |
|
false |
Prompt for service selection when |
|
|
IDE target for artifact placement |
|
|
Agentic system target |
|
off |
Force deployment under |
|
|
Detect IDE and agentic system from the project environment. |
|
|
Version-resolution policy for unpinned |
|
|
Routing catalog assembly mode. |
Boolean value handling:
For
--interactive [true|false], accepted values are case-insensitive:true,false,1,0,yes,no,y,n.If
--interactiveis provided without a value, it is interpreted astrue.
Outcome:
Returns: deployment result with selected services, artifact paths, and deployment layout status.
Advisory mode: when
--autodetect-targets advisorystops early, the JSON result usesstatus: ADVISORY_ONLYandinstallStatus: SKIPPEDand does not install or deploy anything.Machine level: bundle installed if not already present.
Version selection is based on the CLI
bundle_namereference passed toproject-add(name,name@version, orname@<semver range>). An explicit reference is honored.If
bundle_nameis unpinned (no@reference), the command reuses the highest installed semantic version for that bundle name.An unpinned
project-add <bundle>intentionally does not enforce installer-catalogversionSpecranges, so it can select any installed version. Use an explicitname@<semver range>when the catalog constraint must be respected, including after a failedsetupinstallation.Under
lock-driven, unpinnedproject-add <name>uses the version already locked in the project when available. If that locked version is no longer installed locally, the command fails withBUNDLE_LOCKED_VERSION_NOT_INSTALLED.Explicit pinned references (
name@version) remain authoritative and bypass policy fallback.Project level: deployment folder updated, project lock updated, routing catalog regenerated, and
mcp.jsonmerged.Requirements: not checked or resolved: the Python packages, tool bundles and VS Code extensions that the context declares are not installed. Run
cube agentic-ai doctor <project_top_folder> --bundles <bundle_name> --fixafterwards.Idempotency note: idempotency is guaranteed only for repeated successful executions with identical inputs. After any failure or partial execution, the command resumes from the current state and may apply changes on top of existing artifacts.
Machine install status codes (in data.installStatus):
Status code |
Meaning |
|---|---|
|
Bundle was not present and has been installed as part of this command. |
|
A satisfying version was already installed; no install was performed. |
Cube project lock status codes (in data.cubeProjectLockStatus):
Status code |
Meaning |
|---|---|
|
Bundle reference recorded in |
|
Bundle listed in |
See Lock files for the rationale.
Tool dependency output (in data.dependencies):
Each entry reports the dependency
name, lockedversion(omitted when removed),lockStatus(ADDED,UPDATED,UNCHANGED, orREMOVED), andmachineStatus(INSTALLEDorREUSED).previousVersionis included when the project-lock version changed or the dependency was removed.newerInstalledVersionidentifies a newer installed version that satisfies the declared range but is not selected by the project lock. The command remains successful and addsTOOL_DEPENDENCY_PINNED_BY_PROJECT_LOCKtodata.warnings, with the refresh hint indata.warningMessages. Runcube bundle update --projectfrom the workspace when you intend to refresh its tool dependencies.
Target resolution priority for project-add:
The effective --ide, --agentic-system, and --canonical values are resolved in this strict priority order:
Priority |
Source |
Condition |
|---|---|---|
1 (highest) |
Explicit CLI flag |
Flag was passed on the command line. Always wins. |
2 |
Autodetection |
|
3 (lowest) |
ST default |
No CLI flag or autodetection result resolved the dimension. Defaults: |
Canonical layout interaction:
--canonical is orthogonal to --ide and --agentic-system. When --canonical is specified:
Target resolution still runs for
--ideand--agentic-system(following the priority above).After resolution,
--canonicaloverrides the deployment family: all artifacts are written under.cube-ai/regardless of the resolved IDE and agentic system values.Target specific host folders such as
.github/skills/or.vscode/are not created or updated for deployed artifacts.The services lock records
ide: noneandagenticSystem: noneto reflect that no native placement was performed.
For the full list of --ide/--agentic-system pairings and file placement rules, see Target selection.
Deployment layout status codes (in data.deploymentLayout.status):
Status code |
Meaning |
|---|---|
|
Artifacts were placed directly in the locations expected by the selected IDE and agentic system. No further action required. |
|
|
project-deploy¶
Deploy supported STM32Cube Agentic Context bundles into a project in one pass.
cube agentic-ai project-deploy <project_top_folder> [options]
Argument |
Description |
|---|---|
|
Absolute or relative path to the project top folder |
Option |
Default |
Description |
|---|---|---|
|
|
Propose bundles one by one, or deploy all at once. Implicitly |
|
— |
Path to a JSON preset file that specifies exact context bundle versions and service provenance. Accepts the output of |
|
off |
Exact preset replay mode. Valid only with |
|
|
Install missing bundles automatically as prerequisites |
|
|
Service selection strategy. Ignored when |
|
|
IDE target |
|
|
Agentic system target |
|
off |
Force canonical deployment layout; overrides |
|
|
Detect IDE and agentic system from the project environment. |
|
off |
Report what would be deployed without deploying |
|
|
Forwarded to child |
|
|
Forwarded unchanged to each child |
Boolean value handling:
For
--auto-install-missing [true|false], accepted values are case-insensitive:true,false,1,0,yes,no,y,n.If
--auto-install-missingis provided without a value, it is interpreted astrue.
Interactive yes/no handling (--mode interactive):
Each bundle prompt is interpreted as:
Enter= yes (default),y/yes= yes, any other non-empty answer = no.Parsing is case-insensitive.
Prompts are handled through stdin/stdout and are printed before the final result JSON. Callers that need machine-readable stdout must combine
--mode allwith--services-mode defaultor--services-mode all, or use--preset.
Bundle version input model for project-deploy:
This command has no positional
<bundle_name>argument.Without
--preset, bundle names and optional version specs come from the installer context catalog.With
--preset, each bundle entry carries an exact pinned version (name+version) from the preset file.
Outcome:
Returns: full deployment summary with per-bundle service selections, artifact paths, and deployment layout status.
Machine level: missing context bundles are installed if
--auto-install-missingis on. Required tool dependency bundles are installed bycube.Version-selection behavior:
In non-preset mode, per-bundle deployment is executed through
project-addusing bundle name references from the installer catalog. This intentionally does not enforce catalogversionSpecduring deployment, so users can deploy newer bundle versions even when the local installer catalog is outdated.As a consequence, when multiple versions are installed and no exact version is pinned in the effective bundle reference passed to
project-add, the highest installed semantic version for that bundle name is reused.In preset mode, the exact version declared in the preset entry is used (
name@version) and is authoritative.project-deployforwards--bundle-version-policyto childproject-addcalls.With
--bundle-version-policy lock-drivenin non-preset mode, bundles already present in project lock are replayed with their locked version; bundles not yet in project lock fall back toflexiblefor first introduction.
Project level: deployment folder updated, project lock updated, routing catalog regenerated, and
mcp.jsonmerged.Requirements: not checked or resolved, for any deployed context. Run
cube agentic-ai doctor <project_top_folder> --fixafterwards.Idempotency note: idempotency is guaranteed only for repeated successful executions with identical inputs. After any failure or partial execution, the command resumes from the current state and may apply changes on top of existing artifacts.
Routing-authority output fields:
When ok: true, data.hostInstructionUpdate provides a post-deploy action payload that helps enforce authoritative routing behavior in the host agentic system:
Field |
Type |
Description |
|---|---|---|
|
string |
Mandatory statement to place in host instructions so the |
|
string |
Explicit action message requesting to add the mandatory statement to the host instruction file. |
Target resolution with --preset:
The effective --ide, --agentic-system, and --canonical values are resolved in this strict priority order for every project-deploy invocation, whether or not --preset is used:
Priority |
Source |
Condition |
|---|---|---|
1 (highest) |
Explicit CLI flag |
Flag was passed on the command line. Always wins. |
2 |
Preset file field |
|
3 |
Autodetection |
|
4 (lowest) |
ST default |
No CLI flag, preset field, or autodetection result resolved the dimension. Defaults: |
Examples:
--ide nonepassed + preset has"ide": "vscode"→ effective IDE isnone(CLI wins).No
--idepassed + preset has"ide": "none"→ effective IDE isnone(preset fallback).No
--idepassed + preset has noidefield → effective IDE isvscode(ST default).--ide nonepassed + no preset → effective IDE isnone(CLI wins, ST default for others).
Canonical layout interaction:
--canonical is orthogonal to --ide and --agentic-system. When --canonical is specified (via CLI or preset):
Target resolution still runs for
--ideand--agentic-system(following the priority above).After resolution,
--canonicaloverrides the deployment family: all artifacts are written under.cube-ai/regardless of the resolved IDE and agentic system values.Target specific host folders such as
.github/skills/or.vscode/are not created or updated for deployed artifacts.The services lock records
ide: noneandagenticSystem: noneto reflect that no native placement was performed.--canonicalin a preset can be overridden by passing--canonicalexplicitly on the CLI (CLI priority 1 always wins).
For the full list of --ide/--agentic-system pairings and file placement rules, see Target selection.
Output ok field and partial success:
ok: true does not mean every bundle succeeded. The command continues after a per-bundle failure so that other bundles are not blocked. Check data.status and inspect data.bundles[].outcome to know the result for each bundle:
|
|
Meaning |
|---|---|---|
|
|
Every accepted bundle was deployed successfully. |
|
|
At least one bundle succeeded and at least one failed. Partially deployed bundles remain in the project. |
|
|
No bundles were accepted (all rejected interactively, or the catalog/preset contained no contexts). |
|
|
|
— |
|
Command-level failure (bad project root, catalog unavailable, preset invalid) that prevented any bundle from being attempted. |
When ok: true and status: PARTIAL, each failed bundle has outcome: "FAILED" and an error object in its data.bundles[] entry.
Deployment warning output:
data.warningscontains warning codes propagated from childproject-addoperations, such as lock-consistency warnings.TOOL_DEPENDENCY_PINNED_BY_PROJECT_LOCKmeans a newer compatible installed tool dependency is not selected because the project lock preserves its current version.Each successful
data.bundles[]entry exposes the same dependency array underdetail.dependencies.data.warningMessagescontains human-readable, non-fatal deployment warnings. It is omitted when there are no such warnings.If every attempted bundle fails, warning messages discovered during candidate resolution are returned under
error.details.warningMessagesinstead.When present, these fields are included in the JSON result regardless of
--verbose. With--verbose standardor--verbose debug, warning messages are also written to stderr.
For project-deploy-installed, installed-inventory resolution detects catalog entries marked required that have no eligible installed version. The command returns each missing bundle in a human-readable data.warningMessages entry, but leaves it out of the candidate set and does not install it. The warning explains that installed-only behavior is being honored. Run machine-bootstrap to install catalog bundles, then rerun project-deploy-installed when appropriate. This warning does not change candidate selection or make the command fail.
project-deploy-installed¶
Deploy into a project using only bundles already installed on the machine as the candidate set.
Use this command when you have deliberately installed exactly the bundles you want (via machine-bootstrap or machine-install) and want to deploy only those — nothing more, nothing less. Unlike project-deploy, which proposes from the full supported set, this command is driven entirely by your machine inventory, so there are no unexpected bundles and no automatic installs.
cube agentic-ai project-deploy-installed <project_top_folder> [options]
Argument |
Description |
|---|---|
|
Absolute or relative path to the project top folder |
Option |
Default |
Description |
|---|---|---|
|
|
Propose candidates one by one, or deploy all |
|
|
Service selection strategy applied per selected bundle |
|
|
IDE target |
|
|
Agentic system target |
|
off |
Force canonical deployment layout; overrides |
|
|
Detect IDE and agentic system from the project environment. |
|
off |
Report what would be deployed without deploying |
|
|
Forwarded unchanged to each child |
Out-of-scope bundles discovered on the machine are never deployment candidates for this command.
Target resolution priority for project-deploy-installed:
The effective --ide, --agentic-system, and --canonical values are resolved in this strict priority order:
Priority |
Source |
Condition |
|---|---|---|
1 (highest) |
Explicit CLI flag |
Flag was passed on the command line. Always wins. |
2 |
Autodetection |
|
3 (lowest) |
ST default |
No CLI flag or autodetection result resolved the dimension. Defaults: |
Canonical layout interaction:
--canonical is orthogonal to --ide and --agentic-system. When --canonical is specified:
Target resolution still runs for
--ideand--agentic-system(following the priority above).After resolution,
--canonicaloverrides the deployment family: all artifacts are written under.cube-ai/regardless of the resolved IDE and agentic system values.The services lock records
ide: noneandagenticSystem: noneto reflect that no native placement was performed.
For the full list of --ide/--agentic-system pairings and file placement rules, see Target selection.
project-deploy-installed has no --preset option. The only sources for target resolution are CLI flags, autodetection, and ST defaults (no preset field can override a CLI flag here).
Selection behavior:
--modecontrols bundle candidate selection (interactiveprompts per bundle,allaccepts all candidates).--services-modecontrols per-bundle service selection (default,all,interactive).When the bundle reference does not pin an exact version and several installed versions of the same bundle are eligible, the highest installed semantic version is selected for deployment.
This command is effectively pinned by construction (
name@versioncandidates), so it does not expose--bundle-version-policy.
Outcome:
Returns: deployment summary with per-bundle service selections, artifact paths, and deployment layout status.
Successful bundle details include
detail.dependencieswith project-lock and machine-install statuses for transitive tool dependencies.A newer compatible installed version that is not used because of the project lock adds
TOOL_DEPENDENCY_PINNED_BY_PROJECT_LOCKtodata.warnings. Deployment remains successful.Machine level: none (no bundle install).
Project level: deployment folder updated, project lock updated, routing catalog regenerated, and
mcp.jsonmerged.Requirements: not checked or resolved, for any deployed context. Run
cube agentic-ai doctor <project_top_folder> --fixafterwards.Idempotency note: idempotency is guaranteed only for repeated successful executions with identical inputs. After any failure or partial execution, the command resumes from the current state and may apply changes on top of existing artifacts.
Routing-authority output fields:
When ok: true, data.hostInstructionUpdate provides the same post-deploy action payload as project-deploy:
Field |
Type |
Description |
|---|---|---|
|
string |
Mandatory statement to place in host instructions so the |
|
string |
Explicit action message requesting to add the mandatory statement to the host instruction file. |
project-lock-show¶
Display the current project lock state, including deployed context bundle versions, selected services, and the exact versions of required tool dependency bundles.
The command output is machine-readable JSON and is a valid preset file for project-deploy --preset. It captures context bundle versions and resolved tool dependency bundle versions so the same environment can be replayed on another machine or project.
cube agentic-ai project-lock-show <project_top_folder>
Argument |
Description |
|---|---|
|
Absolute or relative path to the project top folder |
Outcome:
Returns: machine-readable lock state including context bundle versions, resolved tool dependency bundle versions, selected services, deployment target per bundle, and managed file ownership records.
Machine level: none (read-only).
Project level: none.
State model: reports the current merged state per bundle from
services-lock.json. Ifproject-addorproject-deployis run multiple times for the same bundle with different service selections, all selected services remain listed until removed byproject-remove.Warnings and integrity: when consistency issues are detected (for example context version drift between locks), output remains
ok: trueand includes warning information. If present,services-lock.json.integrityis also reported so automation can detect degraded lock reliability.Warning field location: warnings are emitted in the command stdout JSON success payload under
data.warnings.
project-remove¶
Remove one deployed STM32Cube Agentic Context bundle from a project, reverting the effect of project-add.
cube agentic-ai project-remove <bundle_name> <project_top_folder> [options]
Argument |
Description |
|---|---|
|
Context bundle identifier to remove from the project |
|
Absolute or relative path to the project top folder |
Option |
Default |
Description |
|---|---|---|
|
— |
Remove only the listed service IDs. If omitted, all deployed services of the bundle are removed. |
|
off |
Bypass the confirmation prompt when removing a required service while other services from the same context remain. Not needed when removing the whole bundle or all deployed services. |
|
off |
Report what would be removed without removing anything |
|
|
Routing catalog assembly mode used when regenerating the routing catalog after removal. See the |
Outcome:
Returns: list of removed files, updated lock paths, and remaining deployed services (if partial removal).
Machine level: none (bundle remains installed on the machine).
Project level: selected deployment files removed, project lock updated, routing catalog regenerated.
Project-remove error codes:
Error code |
Meaning |
|---|---|
|
The requested bundle has no entry in |
|
|
|
A partial removal includes a service recorded with the |
|
One or more managed artifact paths are missing from lock metadata or missing on disk during remove preflight. |
|
One or more managed artifact paths cannot be removed due to filesystem permission checks. |
|
Deletion failed during the remove commit phase after preflight succeeded. |
|
After partial deletion failure, writing degraded-state marker ( |
|
|
|
Writing |
|
Unexpected project-remove failure not covered by a more specific typed error code. |
For recovery steps, see Troubleshooting → Error codes.
Behavior notes:
Removal authority:
project-removeuses<project_top_folder>/.cube-ai/services-lock.jsonas the source of truth to determine removable services and managed files.Required services: each
selectedServiceProvenanceentry in the lock ends in either|requiredor|optional, copied from the deployed bundle manifest. When--serviceswould remove a required service while another service from the same context remains, the command warns that the remaining services may be impeded and requires explicit confirmation. Removing the whole bundle or all deployed services does not require this confirmation. The tag is metadata only. The installer does not store a dependency graph.Path authority model: removal candidates are derived from lock-recorded per-service managed artifact records (
managedArtifacts).Out-of-band content: files or services added manually outside installer commands are not tracked by
services-lock.jsonand are not removed automatically.Requirements are kept: what
setupanddoctor --fixinstalled for the context stays, because other projects can use it: Cube bundles such as the STM32CubeMX2 application, Python packages and the ESW environment of the bundle version (removed with that version bycube bundle remove), and VS Code extensions. The project keeps its.cube-ai/esw-python/choice files, which a later version of the context reuses, and the.vscode/extensions.jsonrecommendations.Canonical reshuffle caveat: if deployment was done with
--canonicaland files were later moved to non-canonical locations,project-removeresolves removal candidates from canonical-managed paths. Moved files may remain and require manual cleanup.Tainted lock state: after remove-time I/O failures with partial deletion, or when lock-source drift is detected,
services-lock.jsonmay be marked tainted (integrity.state = UNRELIABLE). Subsequent mutating commands still run but emit warning information.No manifest consistency check: the command does not validate lock-versus-bundle-manifest consistency before removal.
Project scope only: this command never uninstalls bundles from machine inventory. It only updates project deployment state.
get-user-manual¶
Access the installer user manual.
cube agentic-ai get-user-manual [--format <tldr|markdown|html>]
Option |
Description |
|---|---|
|
Return a concise quick reference directly in JSON ( |
|
Return the on-disk paths to the Markdown source files (for AI agent use) |
|
Open the HTML documentation in the system default browser (for human use) |
Outcome:
Returns: one of: concise TLDR content (
tldr), Markdown folder path(s) (markdown), or HTML entry point path (html).Machine level: none.
Project level: none. (
--format htmlopens the browser as a side effect.)