CLI Command Groups
CLI Command Groups
Section titled “CLI Command Groups”This page maps each xrmghost CLI command group to its purpose, known sub-commands, and the intended shape of future generated reference pages. It is a manual IA artifact: it defines structure and intent, not executable command documentation.
Reader-facing purpose: Prepare the machine to run plugins, or repair the installation — the first command after extracting xrmghost-cli-<version>-full.zip. Checks Windows and .NET Framework 4.7.2, resolves the Framework Host (bundle bin\ > managed install root > legacy), installs or repairs it in the managed root only, and names the next step. Exits 0 when the host is healthy or repaired, 1 when the state cannot be repaired.
Group type: Top-level command (no sub-commands).
Known flags (from source — not authoritative): --no-interactive.
Reference page: docs/cli/reference/init.mdx
Reader-facing purpose: Execute a Dataverse plugin out-of-process via FrameworkHost using a scenario file.
Group type: Top-level command (no sub-commands).
Known flags (from source — not authoritative): -a/--assembly-path, -t/--plugin-type, -s/--scenario, -f/--framework-host-path, --data-source, -n/--normal, -v/--verbose, -d/--debug, --debug-mode, -w/--debug-plugin-wait, -c/--continue-on-unlicensed, --unsecure-config, --secure-config, --no-interactive.
Data-source routing and caller identity: --data-source (auto by default) routes Retrieve, RetrieveMultiple and RetrieveMultipleRequest, not only RetrieveMultiple; auto is live-first, not mock-first. The contract — including what CreateOrganizationService(null) and an explicit user ID read as — is stated once, in the xg run reference.
Intended reference-page shape:
- Path:
docs/cli/reference/run.mdx - Sections: Synopsis, Description, Options, Exit codes, Examples
- Generated from:
xrmghost run --helpor structured command manifest inxrmghost-cli
generate-scenario
Section titled “generate-scenario”Reader-facing purpose: Generate a template JSON scenario file for a specified Dataverse plugin assembly and type, ready to use with run.
Group type: Top-level command (no sub-commands).
Known flags (from source — not authoritative): -p/--plugin-assembly-path, -t/--plugin-type, -o/--output, -f/--framework-host-path, -d/--debug-mode, --no-default-user-settings, --no-default-owner, --online, --no-interactive.
Intended reference-page shape:
- Path:
docs/cli/reference/generate-scenario.mdx - Sections: Synopsis, Description, Options, Output format, Examples
- Generated from:
xrmghost generate-scenario --helpor structured command manifest inxrmghost-cli
doctor
Section titled “doctor”Reader-facing purpose: Diagnose CLI configuration, FrameworkHost connectivity, AKMS reachability, and license validity. Verbose mode includes JWT subscription claims diagnostics. Read-only unless --fix, which installs a missing host and repairs or updates the managed install, never a bundled or explicit host.
Group type: Top-level command (no sub-commands).
Known flags (from source — not authoritative): -v/--verbose, -f/--framework-host-path, --fix, --no-interactive.
Intended reference-page shape:
- Path:
docs/cli/reference/doctor.mdx - Sections: Synopsis, Description, Options, Checks performed, Examples
- Generated from:
xrmghost doctor --helpor structured command manifest inxrmghost-cli
privacy
Section titled “privacy”Reader-facing purpose: Display information about the data collected by the tool, including telemetry scope and retention policy.
Group type: Top-level command (no sub-commands).
Known flags (from source — not authoritative): None documented.
Intended reference-page shape:
- Path:
docs/cli/reference/privacy.mdx - Sections: Synopsis, Description, What data is collected, Retention, Examples
- Generated from:
xrmghost privacy --helpor structured command manifest inxrmghost-cli
license
Section titled “license”Reader-facing purpose: Manage XrmGhost license status, activation, and machine identity. All licensing operations are grouped under this command.
Group type: Command group with sub-commands.
Sub-commands
Section titled “Sub-commands”| Sub-command | Purpose |
|---|---|
license status | Show current license tier, expiration date, and subscription claims |
license activate | Activate a license using a bootstrap key |
license get-platform-id | Display the unique machine identifier required for licensing |
Intended reference-page shape (per sub-command):
- Paths:
docs/cli/reference/license-status.mdx,docs/cli/reference/license-activate.mdx,docs/cli/reference/license-get-platform-id.mdx - Sections per page: Synopsis, Description, Options, Examples
- Generated from:
xrmghost license <sub-command> --helpor structured command manifest inxrmghost-cli
TODO (ADO-1158 dependency): The exact flag names for
license activate(bootstrap key flag) andlicense status(output format flags) are not fully resolved in the current contract. Document the dependency rather than inventing signatures. Resolve against thexrmghost-clisource before generating reference pages.
Reader-facing purpose: Manage Dataverse environment configurations — add, edit, delete, list, switch, and refresh environment metadata.
Group type: Command group with sub-commands.
Sub-commands
Section titled “Sub-commands”| Sub-command | Purpose |
|---|---|
env list | List all configured Dataverse environments |
env add | Interactive wizard to add a new Dataverse environment |
env edit | Edit an existing environment configuration |
env delete | Remove an environment configuration |
env activate | Set a specific environment as the active one |
env deactivate | Deactivate the currently active environment |
env status | Show the status of configured environments |
env import | Import environment configurations from a JSON file |
env export | Export environment configurations to a JSON file |
env template | Output a blank environment configuration template |
env refresh | Refresh the Dataverse metadata cache for an environment |
Intended reference-page shape (per sub-command):
- Paths:
docs/cli/reference/env-list.mdx,docs/cli/reference/env-add.mdx,docs/cli/reference/env-edit.mdx,docs/cli/reference/env-delete.mdx,docs/cli/reference/env-activate.mdx,docs/cli/reference/env-deactivate.mdx,docs/cli/reference/env-status.mdx,docs/cli/reference/env-import.mdx,docs/cli/reference/env-export.mdx,docs/cli/reference/env-template.mdx,docs/cli/reference/env-refresh.mdx - Sections per page: Synopsis, Description, Options, Examples
- Generated from:
xrmghost env <sub-command> --helpor structured command manifest inxrmghost-cli
Reader-facing purpose: Advanced: install or update the FrameworkHost in the managed install root. Not the first setup — that is init. On a winget or ZIP install the bundled host in bin\ takes precedence, so setup host does not change the host used by run.
Group type: Command group with sub-commands.
Sub-commands
Section titled “Sub-commands”| Sub-command | Purpose |
|---|---|
setup host | Advanced: install or update the FrameworkHost in the managed install root, from GitHub Releases |
Known flags for setup host (from source — not authoritative): --check, --update.
Intended reference-page shape:
- Path:
docs/cli/reference/setup-host.mdx - Sections: Synopsis, Description, Options, Examples
- Generated from:
xrmghost setup host --helpor structured command manifest inxrmghost-cli