Skip to content

Latest commit

 

History

History
1613 lines (1100 loc) · 43.2 KB

commands.md

File metadata and controls

1613 lines (1100 loc) · 43.2 KB

spa commands

Generated from spa agent schema. Do not edit this file; regenerate with spa --no-agent agent schema --markdown. Workflows stay in the user guide.

Playbooks are not listed here. Discover them with spa --agent run list and spa run NAME --help.

init

Alias of spa environment init (spa init --example TOPOLOGY or --architecture FILE [--provider ccm|aws|external|virtualbox] NAME)

Flag Description
--example Topology example id (exclusive with --architecture)
--architecture Confirmed schema 1 architecture JSON (exclusive with --example)
--provider ccm, aws, external, or virtualbox. Required unless a default is saved (spa environment set --provider NAME)
--from Migrate an existing SPA environment

Example:

spa init --architecture examples/architectures/c3.json --provider aws my-lab

init list

List topology examples. Bare spa init still scaffolds; it does not list.

Example:

spa init list

config

Read, explain, or transactionally edit splunk_config.yml. Agents use config search QUERY, then config explain PATH. Bare spa config exits 2. Writes include set, add, unset, merge, move, topology, provider, and migrate.

Example:

spa --agent config explain

config explain

Describe one config path and its immediate fields. Leaves may include recommended, discover, related, and from the parent setting or provider. data.next is present when allowed or discover exists. A deeper level is a longer path. The same data is the future GUI payload.

Argument Required Description
PATH no User path such as splunk_hosts or os.packages

Example:

spa --agent config explain splunk_hosts

config search

Find config paths. Each hit is a path and a one-line description.

Argument Required Description
QUERY yes Search text

Example:

spa --agent config search packages

config keys

Catalog coverage of schema keys. Maintainer check, not the discovery walk.

Example:

spa config keys

config schema

Human documentation generation for docs/config.md. Not an agent payload. Agents use config search QUERY, then config explain PATH.

Flag Description
--markdown Print GitHub-flavored markdown (human stdout only; regenerate docs/config.md)

Example:

spa --no-agent config schema --markdown

config get

Read authored config state; pathless agent output is a compact identity outline

Flag Description
--effective Report the schema default when the path is unset
--full Return the full redacted authored document
Argument Required Description
PATH no Schema path with optional identity selectors

Example:

spa --agent config get splunk_defaults.splunk_version

config audit

Compare the config SHA-256 to the last spa write stamp

Flag Description
--check-hand-edits Report ok, hand_edited, or unknown from the spa write stamp

Example:

spa --agent config audit --check-hand-edits

config templates

Shipped fragment catalog. Bare spa config templates exits 2.

Example:

spa --agent config templates list

config templates list

List shipped reusable config fragments and their leading summaries

Example:

spa --agent config templates list

config set

Transactionally replace one schema-backed value

Flag Description
--value-file Read a JSON or YAML 1.2 value
--from-env Write an environment lookup for a secret path
--explicit-default Author a value equal to its schema default
--dry-run Preview without writing
--expect-revision Require the current SHA-256 revision
--resolve Supply PATH VALUE for an unresolved dependency; repeatable
--resolve-file Supply a sparse YAML/JSON dependency fragment
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Skip the human confirmation prompt
Argument Required Description
PATH yes A config path. Find one: spa config search QUERY. Then read it: spa config explain PATH. Example: spa config set os.time_zone Europe/Berlin
VALUE no String or strict JSON value

Example:

spa --agent config set os.time_zone Europe/Berlin

config add

Append one new non-app identity-list entry. Fails when that identity already exists.

Flag Description
--value-file Read a JSON or YAML 1.2 object
--from-env FIELD NAME. Write an environment lookup for a secret field; repeatable
--dry-run Preview without writing
--expect-revision Require the current SHA-256 revision
--resolve Supply PATH VALUE for an unresolved dependency; repeatable
--resolve-file Supply a sparse YAML/JSON dependency fragment
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Skip the human confirmation prompt
Argument Required Description
SELECTOR yes A config path for a new list entry. Find one: spa config search QUERY. Then read it: spa config explain PATH. Example: spa config add 'splunk_hosts[name=lm]' '{"roles":["license_manager"]}'
JSON_OBJECT no Strict JSON object for the new entry

Example:

spa --agent config add 'splunk_hosts[name=lm]' '{"roles":["license_manager"]}'

config unset

Transactionally remove one or more authored paths

Flag Description
--dry-run Preview without writing
--expect-revision Require the current SHA-256 revision
--resolve Supply PATH VALUE for an unresolved dependency; repeatable
--resolve-file Supply a sparse YAML/JSON dependency fragment
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Skip the human confirmation prompt
Argument Required Description
PATH yes A config path. Find one: spa config search QUERY. Then read it: spa config explain PATH. Example: spa config unset os.time_zone

Example:

spa --agent config unset os.time_zone

config merge

Transactionally merge a partial splunk_config.yml

Flag Description
--file Local YAML or JSON fragment, or - for stdin
--explicit-default Author values equal to schema defaults
--dry-run Preview without writing
--expect-revision Require the current SHA-256 revision
--resolve Supply PATH VALUE for an unresolved dependency; repeatable
--resolve-file Supply a sparse YAML/JSON dependency fragment
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Skip the human confirmation prompt
Argument Required Description
TEMPLATE no Shipped fragment name from examples/templates

Example:

spa --agent config merge remote-provider --yes

config move

Move a role between hosts, or rename host identities. Bare spa config move exits 2 and names role and host.

Example:

spa --agent config move role license_manager --from cm --to lm --yes

config move role

Move one AllowedRole instance from a host onto another host in one transaction.

Requires confirmation: yes (--yes).

Flag Description
--from Host that currently has ROLE
--to Destination host name (created if missing)
--dry-run Preview without writing
--expect-revision Require the current SHA-256 revision
--resolve Supply PATH VALUE for an unresolved dependency; repeatable
--resolve-file Supply a sparse YAML/JSON dependency fragment
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Skip the human confirmation prompt
Argument Required Description
ROLE yes AllowedRole to relocate

Example:

spa --agent config move role license_manager --from cm --to lm --yes

config move host

Rename one host, or prefix/postfix every host identity. Rewrites hosts_whitelist and hosts_blacklist.

Requires confirmation: yes (--yes).

Flag Description
--to New host name (with OLD)
--prefix Prepend to every host name, iter.prefix, and list entry
--postfix Append to every host name, iter.postfix, and list entry. A leading hyphen needs --postfix=-lab
--dry-run Preview without writing
--expect-revision Require the current SHA-256 revision
--resolve Supply PATH VALUE for an unresolved dependency; repeatable
--resolve-file Supply a sparse YAML/JSON dependency fragment
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Skip the human confirmation prompt
Argument Required Description
OLD no Current host name

Example:

spa --agent config move host --prefix acme- --yes

config topology

List catalog topology ids, or replace topology-owned sections from one

Flag Description
--dry-run Preview without writing
--expect-revision Require the current SHA-256 revision
--resolve Supply PATH VALUE for an unresolved dependency; repeatable
--resolve-file Supply a sparse YAML/JSON dependency fragment
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Skip the human confirmation prompt
Argument Required Description
TOPOLOGY no A topology feature id or an example stem. List them: spa init list. Example: spa config topology topology.c1

Example:

spa --agent config topology topology.c1

config provider

Replace provider-owned config sections from an example template

Flag Description
--dry-run Preview without writing
--expect-revision Require the current SHA-256 revision
--resolve Supply PATH VALUE for an unresolved dependency; repeatable
--resolve-file Supply a sparse YAML/JSON dependency fragment
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Skip the human confirmation prompt
Argument Required Description
PROVIDER yes ccm, aws, external, or virtualbox, or a provider feature id. List them: spa init list. Example: spa config provider aws

Example:

spa --agent config provider aws

config migrate

Stamp schema_version to the current schema and apply pending migrations. Does not change operator config_version.

Flag Description
--dry-run Preview without writing
--expect-revision Require the current SHA-256 revision
--resolve Supply PATH VALUE for an unresolved dependency; repeatable
--resolve-file Supply a sparse YAML/JSON dependency fragment
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Skip the human confirmation prompt

Example:

spa --agent config migrate --yes

config header set

Replace the leading comment on splunk_config.yml. Omitted fields are removed.

Requires confirmation: yes (--yes).

Flag Description
--intent Why this environment exists
--requirements Constraints the design must meet
--sva SVA target for this environment
--placement Where the deployment runs
--license How Splunk is licensed
--installer Installer used for Splunk
--os Operating system for the hosts
--aws AWS placement notes
--deploy Command that deploys this environment
--dry-run Preview without writing
--expect-revision Require the current SHA-256 revision
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Confirm the header write (required in agent mode)

Example:

spa --agent config header set --intent config-test --deploy "spa deploy --yes" --yes

validate

Validate splunk_config.yml (schema, Software/baseconfig/local apps, inventory)

Flag Description
--config Validate this file instead of the environment config
--check-licenses Validate configured license files
--details Include the full license inventory
--splunk-config Check this provider's selections from the environment config. aws today.

Example:

spa validate --splunk-config aws

version

Print the installed SPA version from SPA_HOME/VERSION. Does not contact the network.

Example:

spa --agent version

version check

Compare the installed SPA version to the latest GitHub Release. Read-only. Exit 0 when outdated.

Example:

spa --agent version check

self

Update this prefix install of SPA from GitHub Releases. Bare spa self exits 2.

Example:

spa self update --yes

self update

Replace a prefix install of SPA from GitHub Releases (or --from FILE) with the prefix's own install.sh, then refresh recorded IDE skill copies. Clone and unknown installs refuse, as do Software, Baseconfigs, Apps, or Envs inside SPA_HOME.

Requires confirmation: yes (--yes).

Flag Description
-y, --yes Confirm replacing the SPA install prefix
--version Release tag or X.Y.Z (default: latest)
--from Install from a local spa-framework tar.gz instead of GitHub (offline hosts)

Example:

spa self update --yes

doctor

Host prerequisite checks

Flag Description
--provider ccm, aws, external, or virtualbox. Repeatable. Example: spa doctor --provider ccm
--strict Treat optional-tool warnings as failures

skills

Install, update, or remove SPA agent skills from $SPA_HOME/skills/spa/ into user IDE directories

Example:

spa skills install

skills install

Copy SPA skill packages into the user IDE skill directory. Platform defaults to SPA_SKILLS_PLATFORMS, then auto-detect.

Flag Description
--name Install one package
--all Install every SPA skill package (default)
Argument Required Description
PLATFORM no One platform or a comma-separated list (cursor,claude), or all

Example:

spa skills install cursor

skills update

Refresh IDE skill copies recorded in ~/.config/spa/skills.yml from $SPA_HOME/skills/spa and remove recorded packages the framework dropped. Does not auto-detect platforms.

Example:

spa --agent skills update

skills remove

Remove SPA skill packages from the user IDE skill directory. Other skill names are left alone.

Requires confirmation: yes (--yes).

Flag Description
--name Remove one package
--all Remove every SPA skill package (default)
-y, --yes Confirm removing SPA skills
Argument Required Description
PLATFORM no One platform or a comma-separated list (cursor,claude), or all

Example:

spa skills remove --all --yes

venv

Inspect or manage the shared SPA_HOME/.venv (default) or this environment's .venv

Example:

spa venv path

venv path

Print the shared SPA_HOME/.venv path, or this environment's .venv with --environment

Flag Description
--shared Target SPA_HOME/.venv (default)
--environment Target this environment's .venv

Example:

spa venv path

venv create

Create the venv when missing

Requires confirmation: yes (--yes).

Flag Description
--shared Target SPA_HOME/.venv (default)
--environment Target this environment's .venv
--python Python interpreter used to create the venv
--no-install Create without package or collection installs
-y, --yes Confirm creating the venv

Example:

spa venv create --shared --yes

venv reinstall

Install requirements into the existing venv

Requires confirmation: yes (--yes).

Flag Description
--shared Target SPA_HOME/.venv (default)
--environment Target this environment's .venv
--python Python interpreter used when the venv must be created
--no-install Skip package and collection installs
-y, --yes Confirm reinstalling the venv

Example:

spa venv reinstall --shared --yes

venv upgrade

Upgrade packages and Ansible collections in the existing venv

Requires confirmation: yes (--yes).

Flag Description
--shared Target SPA_HOME/.venv (default)
--environment Target this environment's .venv
--python Python interpreter used when the venv must be created
--no-install Skip package and collection installs
-y, --yes Confirm upgrading the venv

Example:

spa venv upgrade --shared --yes

venv rebuild

Delete, recreate, and install the venv

Requires confirmation: yes (--yes).

Flag Description
--shared Target SPA_HOME/.venv (default)
--environment Target this environment's .venv
--python Python interpreter used to create the venv
--no-install Rebuild without package or collection installs
-y, --yes Confirm rebuilding the venv

Example:

spa venv rebuild --shared --yes

environment list

List registered environments (alias: spa env list)

Example:

spa environment list

environment init

Scaffold or migrate an env dir; name-only uses the default parent (~/Splunk-Platform-Automator/Envs or paths.yml env_dir)

Flag Description
--example Topology example id (exclusive with --architecture)
--architecture Confirmed schema 1 architecture JSON (exclusive with --example)
--provider ccm, aws, external, or virtualbox. Required unless a default is saved (spa environment set --provider NAME)
--from Migrate an existing SPA environment
--env-dir One-off parent (requires --name); does not change the default parent
--name Registry name (default: folder basename)
--force Adopt/refresh an existing env and register it (keep splunk_config.yml unless --example; keep Software/baseconfig/apps dirs unless --reset-paths)
--reset-paths Skip existing .spa.yml Software/baseconfig/apps dirs; re-resolve from --*-dir, then paths.yml, then discovery
--software-dir Splunk installers directory for this env (.spa.yml). If omitted, uses existing .spa.yml unless --reset-paths, then ~/.config/spa/paths.yml then discovery. Seeds paths.yml only when that key is unset.
--baseconfig-dir PS baseconfig apps directory for this env (.spa.yml). If omitted, uses existing .spa.yml unless --reset-paths, then ~/.config/spa/paths.yml then discovery. Seeds paths.yml only when that key is unset.
--apps-dir Local source: local apps directory for this env (.spa.yml). If omitted, uses existing .spa.yml unless --reset-paths, then ~/.config/spa/paths.yml then discovery. Seeds paths.yml only when that key is unset.

Example:

spa environment init --architecture examples/architectures/c3.json --provider aws my-lab

environment init list

List topology examples (same catalog as spa init list)

Example:

spa environment init list

environment set

User-level defaults in paths.yml (env parent, Software, baseconfig, apps) and the default provider for init in providers.yml

Flag Description
--create-defaults Create ~/Splunk-Platform-Automator/{Software,Apps,Baseconfigs,Envs} and write missing paths.yml keys
-y, --yes Create the default workspace without prompting
--env-dir Default parent for name-only init
--software-dir Shared installers directory (saved in paths.yml)
--baseconfig-dir PS baseconfig apps directory (saved in paths.yml)
--apps-dir Local apps directory
--default Registered environment used when cwd does not select one
--provider Save the default provider for init: ccm, aws, external, or virtualbox. Saved even for aws, so init then accepts no --provider

Example:

spa environment set --create-defaults --yes

environment cleanup

Remove registry entries whose env directory is missing. Lists them first; no directories are deleted

Requires confirmation: yes (--yes).

Flag Description
-y, --yes Remove the listed registry entries (no directories are deleted)

Example:

spa environment cleanup --yes

environment remove

Unregister and delete the env directory (not spa destroy)

Requires confirmation: yes (--yes).

Flag Description
-y, --yes Confirm deleting the env directory
--force Allow deleting a dir that looks deployed (local only)
Argument Required Description
NAME yes Registered environment name

environment

Environment family. spa resolves cwd or --env itself; --export is for external tools

Flag Description
--export Print shell exports for external tools

Example:

spa environment --export

deploy

Deploy Splunk (deploy_site.yml). After you confirm, ping with become before the playbook. Requires Software/baseconfig and local app sources

Requires confirmation: yes (--yes).

Flag Description
-y, --yes Confirm deploy (required in agent mode)
--hosts only these hosts (names or roles from this env)
--ansible-output Show captured Ansible output live or from stored logs (not in agent output)
--timestamps Prefix --ansible-output lines with their stored event time
--color Color --ansible-output. Live runs use Ansible color; stored logs are recolored
-v, --verbose Increase Ansible verbosity and show native output; repeat through -vvvv

destroy

Destroy infrastructure using the configured provider

Requires confirmation: yes (--yes).

Flag Description
-y, --yes Confirm destroy
--ansible-output Show captured Ansible output live or from stored logs (not in agent output)
--timestamps Prefix --ansible-output lines with their stored event time
--color Color --ansible-output. Live runs use Ansible color; stored logs are recolored
-v, --verbose Increase Ansible verbosity and show native output; repeat through -vvvv

suspend

Stop managed instances without destroying disks or provider state

Requires confirmation: yes (--yes).

Flag Description
-y, --yes Confirm power change
--no-wait Return after requesting stop
--hosts only these hosts (names or roles from this env)
--ansible-output Show captured Ansible output live or from stored logs (not in agent output)
--timestamps Prefix --ansible-output lines with their stored event time
--color Color --ansible-output. Live runs use Ansible color; stored logs are recolored
-v, --verbose Increase Ansible verbosity and show native output; repeat through -vvvv

resume

Start managed instances and refresh inventory if needed

Requires confirmation: yes (--yes).

Flag Description
-y, --yes Confirm power change
--hosts only these hosts (names or roles from this env)
--ansible-output Show captured Ansible output live or from stored logs (not in agent output)
--timestamps Prefix --ansible-output lines with their stored event time
--color Color --ansible-output. Live runs use Ansible color; stored logs are recolored
-v, --verbose Increase Ansible verbosity and show native output; repeat through -vvvv

hosts

Inventory actions. List hosts, SSH, provision, or copy. Bare spa hosts exits 2.

Example:

spa hosts list

hosts list

List inventory hosts and roles

Flag Description
-s, --status Include runtime power state and connectivity
--hosts only these hosts (names or roles from this env)

Example:

spa hosts list --status

hosts ssh

SSH using inventory

Argument Required Description
NAME yes Inventory hostname or role

Example:

spa hosts ssh idx1

hosts copy

Copy files with scp: SRC DST, remote side HOST:PATH (-r for directories)

Example:

spa hosts copy local.txt idx1:/tmp/

hosts register

Register an existing Linux host over SSH. Does not create the machine.

Requires confirmation: yes (--yes).

Flag Description
-y, --yes Confirm register
--ssh-host IP, hostname, or FQDN. Must be reachable by SSH.
--ssh-port SSH port
--ip-addr Address other Splunk hosts use. Omit to use the SSH host.
--user SSH login user
--key Path to the SSH private key
--role Splunk role. Repeat to add more.
Argument Required Description
NAME yes Inventory hostname

Example:

spa hosts register NAME --ssh-host HOST --user USER --key PATH --yes

hosts unregister

Remove one external host from inventory. The config entry stays. Does not shut the machine down.

Requires confirmation: yes (--yes).

Flag Description
-y, --yes Confirm unregister
Argument Required Description
NAME yes Inventory hostname

Example:

spa hosts unregister NAME --yes

hosts provision

Create or update managed hosts. SSH is ready before this returns. Lab bring-up is spa deploy --yes.

Requires confirmation: yes (--yes).

Flag Description
-y, --yes Confirm hosts provision
--ansible-output Show captured Ansible output live or from stored logs (not in agent output)
--timestamps Prefix --ansible-output lines with their stored event time
--color Color --ansible-output. Live runs use Ansible color; stored logs are recolored
-v, --verbose Increase Ansible verbosity and show native output; repeat through -vvvv

Example:

spa hosts provision --yes

hosts check

Ansible ping with become to root, then compare splunk_architecture with the host. The check spa deploy runs. Does not deploy.

Flag Description
--hosts only these hosts (names or roles from this env)

Example:

spa hosts check

shell

Alias of spa hosts ssh. Extra ssh arguments after --.

Argument Required Description
NAME yes Inventory hostname or role

Example:

spa shell idx1 -- -L 8000:localhost:8000

provider

Provider discovery. Bare spa provider exits 2 and names AWS, then CCM when CCM is in play.

Example:

spa --agent provider aws check-auth

provider aws

AWS discovery for terraform.aws. Bare spa provider aws exits 2.

Example:

spa --agent provider aws check-auth

provider aws check-auth

Verify AWS credentials via STS. No --region required.

Example:

spa --agent provider aws check-auth

provider aws latest-ami

Resolve the latest AMI for a recommended OS.

Flag Description
--region AWS region. Defaults to AWS_REGION, AWS_DEFAULT_REGION, or the region in ~/.aws/config.
--os Recommended OS: rhel, ubuntu, amazon_linux, debian (or all). Aliases: al2023, rhel10, ubuntu2404

Example:

spa provider aws latest-ami --os rhel --region eu-central-1

provider aws describe-ami

Describe one AMI.

Flag Description
--region AWS region. Defaults to AWS_REGION, AWS_DEFAULT_REGION, or the region in ~/.aws/config.
--ami-id AMI ID

Example:

spa provider aws describe-ami --ami-id ami-xxx

provider aws validate

Validate AMI, key pair, security groups, and instance type in a region.

Flag Description
--region AWS region. Defaults to AWS_REGION, AWS_DEFAULT_REGION, or the region in ~/.aws/config.
--details Include the full validation checks
--ami-id AMI ID for validate
--key-name Key pair name for validate
--security-groups Comma-separated security group names for validate
--instance-type Instance type for validate

Example:

spa provider aws validate --region eu-central-1 --security-groups Splunk_Basic

provider aws survey

Combined discovery report for a region.

Flag Description
--region AWS region. Defaults to AWS_REGION, AWS_DEFAULT_REGION, or the region in ~/.aws/config.

Example:

spa provider aws survey --region eu-central-1

provider aws regions list

List enabled regions. Marks the region from --region, AWS_REGION, AWS_DEFAULT_REGION, or ~/.aws/config.

Example:

spa provider aws regions list --json

provider aws amis list

List AMIs in a region

Flag Description
--region AWS region. Defaults to AWS_REGION, AWS_DEFAULT_REGION, or the region in ~/.aws/config.
--name-filter AMI name wildcard
--owners Comma-separated AMI owners
--max-results Max AMIs to return
--os Recommended OS, or all

Example:

spa provider aws amis list --region eu-central-1 --json

provider aws instance-types list

List instance types offered in a region

Flag Description
--region AWS region. Defaults to AWS_REGION, AWS_DEFAULT_REGION, or the region in ~/.aws/config.
--family Instance type family prefix (e.g. t3)

Example:

spa provider aws instance-types list --region eu-central-1 --family t3

provider aws key-pairs list

List EC2 key pairs

Flag Description
--region AWS region. Defaults to AWS_REGION, AWS_DEFAULT_REGION, or the region in ~/.aws/config.

Example:

spa provider aws key-pairs list --region eu-central-1

provider aws security-groups list

List security groups

Flag Description
--region AWS region. Defaults to AWS_REGION, AWS_DEFAULT_REGION, or the region in ~/.aws/config.

Example:

spa provider aws security-groups list --region eu-central-1

provider ccm

CCM discovery. Bare spa provider ccm exits 2.

Example:

spa --agent provider ccm check-auth

provider ccm check-auth

Verify CCM_TOKEN is set and CCM accepts Bearer via GET /api/v1/deployments. Reports the env var as set / not set.

Example:

spa --agent provider ccm check-auth

provider ccm survey

Combined CCM meta dump plus GUI closed sets (operating systems, instance types, disk storage, business purposes, operation hours).

Example:

spa --agent provider ccm survey

provider ccm operating-systems list

List CCM operating systems from GET /api/v1/meta.

Example:

spa --agent provider ccm operating-systems list

provider ccm instance-types list

List CCM instance types from GET /api/v1/meta.

Example:

spa --agent provider ccm instance-types list

provider ccm disk-storage list

List CCM disk storage sizes from GET /api/v1/meta.

Example:

spa --agent provider ccm disk-storage list

provider ccm business-purposes list

List GUI business purposes. Not a CCM meta attribute.

Example:

spa --agent provider ccm business-purposes list

provider ccm operation-hours list

List GUI/API operation hours. Not a CCM meta attribute.

Example:

spa --agent provider ccm operation-hours list

provider ccm operation-hours set

PATCH the CCM deployment operation_hours. Mutating. Does not change hours on spa resume.

Requires confirmation: yes (--yes).

Flag Description
-y, --yes Confirm without prompting
Argument Required Description
HOURS yes manual or business_hours

Example:

spa --agent provider ccm operation-hours set manual --yes

provider ccm ssh-keys list

List CCM SSH key names and fingerprints, and whether ccm.ssh_private_key_file exists locally. Never prints public_key bodies.

Example:

spa --agent provider ccm ssh-keys list

provider ccm ttl extend

PATCH the CCM deployment ttl to now plus --days (1-30). Mutating. Fail if not provisioned or already terminated.

Requires confirmation: yes (--yes).

Flag Description
--days New TTL in days from now (1-30)
-y, --yes Confirm without prompting

Example:

spa --agent provider ccm ttl extend --days 7 --yes

architecture

Architecture file actions. Bare spa architecture exits 2 and names plan, apply, and check.

Example:

spa --agent architecture plan examples/architectures/c3.json

architecture plan

Validate a splunk.architecture schema 1 file and print the overlay plan (read-only). Needs no environment.

Argument Required Description
FILE yes Architecture JSON file

Example:

spa --agent architecture plan examples/architectures/c3.json

architecture apply

Overlay a confirmed architecture file onto the current environment config.

Requires confirmation: yes (--yes).

Flag Description
--dry-run Preview without writing
--expect-revision Require the current SHA-256 revision
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Confirm without prompting
Argument Required Description
FILE yes Architecture JSON file

Example:

spa --agent architecture apply examples/architectures/c3.json --yes

architecture check

Subset-match a splunk.architecture schema 1 file against the current environment config.

Argument Required Description
FILE yes Architecture JSON file

Example:

spa --agent architecture check examples/architectures/c3.json

licenses

License discovery. List or add Software licenses. Bare spa licenses exits 2.

Example:

spa --agent licenses list

licenses list

Inspect license type, expiration and ITSI/ES entitlements

Flag Description
--software-dir Software directory (default: ../Software from SPA_ENV_DIR, SPA splunk_software_dir)
--config splunk_config.yml path to detect ITSI/ES and validate current license settings
--details Include the full license inventory
--no-env-recommend Do not mention optional licenses when ITSI is not in config

Example:

spa --agent licenses list

licenses add

Copy a license file into Software. A newer NFR auto-retargets the canonical symlink. Does not edit splunk_config.yml.

Requires confirmation: yes (--yes).

Flag Description
--software-dir Software directory (default: ../Software from SPA_ENV_DIR, SPA splunk_software_dir)
--force Overwrite an existing destination basename
--replace Retarget matching canonical names even when auto-replace does not fire
-y, --yes Confirm without prompting
Argument Required Description
FILE yes License file (.lic or .license) to copy into Software

Example:

spa --agent licenses add FILE --yes

run

Run a playbook by stem. Discover: spa --agent run list then spa run NAME --help. Honor data[].requires_confirmation with --yes.

Flag Description
--hosts only these hosts (names or roles from this env)
-y, --yes Confirm a mutating playbook (required in agent mode)
--apps-playbook For splunk_apps_playbook_run: curated stem or env-relative path (sets apps_playbook and app_name)
--ansible-output Show captured Ansible output live or from stored logs (not in agent output)
--timestamps Prefix --ansible-output lines with their stored event time
--color Color --ansible-output. Live runs use Ansible color; stored logs are recolored
-v, --verbose Increase Ansible verbosity and show native output; repeat through -vvvv
Argument Required Description
NAME no Playbook stem from spa run list

Example:

spa run NAME --help

run list

Catalog playbooks with summaries. --dir is valid here and on spa run NAME.

Flag Description
--dir Extra playbook directory

Example:

spa run list

logs

List or show per-environment run transcripts under $SPA_ENV_DIR/logs (newest first)

Flag Description
--last Show the most recent run
--follow Follow the latest jsonl file
--wait With --follow, wait for a jsonl newer than this invocation
--ansible-output Show captured Ansible output live or from stored logs (not in agent output)
--timestamps Prefix --ansible-output lines with their stored event time
--color Color --ansible-output. Live runs use Ansible color; stored logs are recolored
Argument Required Description
RUN_ID no Run id from spa logs list

Example:

spa logs --last

logs list

Index of run transcripts, newest first. Do not combine with --last or --follow.

Example:

spa logs list

apps

Discover, configure, or download Splunk apps and ITSI content packs.

Example:

spa --agent apps search unix

apps search

Search Splunkbase (compact rows: app_id, name, title, type, kind, version, summary). An itsi query lists Core ITSI 1841 and Content Library 5391 first. ITSI content packs are not in search rows: list the packs in 5391 with spa apps content-packs list 5391.

Flag Description
--limit Max hits (default 10)
--type Filter Splunkbase type (app, addon)
--kind Filter SPA kind (ta, premium_itsi, itsi_content_library, itsi_content_pack_single, premium_es)

Example:

spa --agent apps search itsi

apps content-packs list

List ITSI content packs in Content Library 5391 from --archive, apps_dir, an existing install archive, or cached pack app.conf files. An install archive is left in place. --version selects the release (default latest).

Flag Description
--version Content Library release to inspect (default latest). A newer latest release replaces the cached app.conf files.
--archive Inspect a local 5391 archive without environment credentials

Example:

spa --agent apps content-packs list 5391

apps snippet

Print apps[] YAML for a Splunkbase app_id or local custom app folder

Flag Description
--version Release version (default latest)
--roles Comma-separated target_roles (TA only)
--source Snippet source: splunkbase or local; local checks apps_dir
--local Shorthand for --source local
--customize Include matching curated apps_playbooks customizations in the YAML
--set Set another schema-backed app FIELD VALUE; repeatable

Example:

spa --agent apps snippet 833

apps add

Idempotently add or update one apps[] entry; edits config and does not deploy

Flag Description
--version Release or local archive version to author (default latest)
--roles Comma-separated target_roles; required only for normal apps and rejected for ITSI/ES/content packs
--new Append another apps[] row for this app_id; without it, extra copies match by exact --roles
--source Use Splunkbase metadata, or a folder/archive already in apps_dir (default splunkbase). Mutually exclusive with --local
--local Shorthand for --source local. Mutually exclusive with --source
--customize Attach matching curated SPA playbook(s) to the app entry or named content pack
--set Set another schema-backed app FIELD from strict JSON; repeatable
--content-pack 5391 only: add exact bundled folder NAME; repeatable and mutually exclusive with --install-all-content-packs
--install-all-content-packs 5391 only: install every bundled pack; mutually exclusive with --content-pack
--explicit-default Write omit-safe default values that SPA normally leaves absent
--dry-run Plan dependencies and show the result without prompting or writing
--expect-revision Write only when the config still has this SHA-256 revision
--resolve Supply one unresolved dependency PATH VALUE; VALUE uses strict JSON; repeatable
--resolve-file Supply unresolved dependencies from sparse YAML/JSON; use - for stdin
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Skip the human config-edit confirmation; agent mode never prompts

Example:

spa --agent apps add 833 --roles search_head,indexer

apps remove

Remove an authored app entry; does not uninstall deployed files

Flag Description
--roles When the app is defined more than once, remove the copy whose target_roles match (one role or the exact set)
--content-pack Remove one named pack under Content Library 5391
--dry-run Preview without writing
--expect-revision Require the current SHA-256 revision
--resolve Supply PATH VALUE for an unresolved dependency; repeatable
--resolve-file Supply a sparse YAML/JSON dependency fragment
--show-diff Print the redacted unified diff after the status line (no-op in agent mode)
-y, --yes Skip the human confirmation prompt
Argument Required Description
APP_ID_OR_NAME yes A Splunkbase id or an app name in this config. Find one: spa apps search QUERY. Example: spa apps remove 833

Example:

spa --agent apps remove 833

apps download

Download a Splunkbase archive into apps_dir (does not edit config or print a snippet)

Requires confirmation: yes (--yes).

Flag Description
-y, --yes Confirm download (required in agent mode)
--version Release version (default latest)
--extract Safely extract a folder-backed app into apps_dir and delete the archive (TA/ES only)
--overwrite With --extract, replace an existing app folder in apps_dir

Example:

spa apps download 833 --yes

agent schema

This schema (JSON envelope; --markdown prints a human catalog)

Flag Description
--markdown Print GitHub-flavored markdown instead of JSON (human stdout; regenerate docs/commands.md)

Example:

spa --no-agent agent schema --markdown

completion

Print a bash or zsh completion function. Human shell setup. Bare spa completion exits 2. Agents use spa agent schema.

Example:

spa completion zsh

completion bash

Print a bash function for eval. Does not edit the shell startup file. Agents use spa agent schema.

Example:

spa completion bash

completion zsh

Print a zsh function for eval. Does not edit the shell startup file. Agents use spa agent schema.

Example:

spa completion zsh