Skip to main content

CLI Reference

Complete reference for the Expanse command-line interface.

Core Commands

CommandDescription
expanse loginAuthenticate with Expanse
expanse init <name>Initialise a new project
expanse run <node|workflow>Execute a node or workflow
expanse statusShow status of running jobs
expanse cancel <job-id>Cancel a running job
expanse logs <job-id>Stream logs from a job

Run Command

expanse run <target> [options]

Options

OptionDescription
--cluster <name>Override target cluster
--dry-runValidate without executing
--waitBlock until completion
--verboseShow detailed output
--param KEY=VALUEOverride node parameters

Examples

# Run a workflow
expanse run full_pipeline

# Run on a specific cluster
expanse run solver --cluster archer2

# Validate without executing
expanse run full_pipeline --dry-run

# Wait for completion
expanse run training --wait

# Override parameters
expanse run solver --param mesh_size=fine --param iterations=1000

Node Commands

CommandDescription
expanse nodes listList all nodes in the current project
expanse nodes validateValidate all node configurations
expanse nodes show <name>Display details for a specific node
expanse nodes deps <name>Show dependency graph for a node
expanse nodes push <name>Publish a node to the central registry
expanse nodes pull <ref>Fetch a node from registry into your project
expanse nodes publish <name>Release a new version of a registered node

Examples

# List all nodes
expanse nodes list

# Validate configuration
expanse nodes validate

# Show node details
expanse nodes show solver

# View dependency graph
expanse nodes deps postprocess

# Pull from registry
expanse nodes pull registry://expanse/cfd-preprocessor@v2.1

Workflow Commands

CommandDescription
expanse workflows listList all workflows in the project
expanse workflows validateValidate all workflow configurations
expanse workflows show <name>Display workflow stages and dependencies

Job Commands

CommandDescription
expanse jobs listView recent job history
expanse jobs show <job-id>Display job details
expanse jobs show <job-id> --provenanceShow full provenance chain
expanse jobs logs <job-id>Stream job logs
expanse jobs cancel <job-id>Cancel a running job
expanse jobs exportExport audit trail
expanse jobs report <job-id>Generate compliance report
expanse jobs certificate <job-id>Generate reproducibility certificate

Export Formats

# JSON export
expanse jobs export --format json --output audit.json

# Classification society formats
expanse jobs export --format dnv --output dnv_submission.xml
expanse jobs export --format lloyds --output lloyds_audit.json
expanse jobs export --format imo-mepc --output mepc_documentation.pdf

Compliance Reports

# Generate MEPC.1/Circ.850 compliance report
expanse jobs report <job-id> --format mepc-850 --output eedi_cfd_report.pdf

# Generate reproducibility certificate
expanse jobs certificate <job-id> --output certificate.pdf

Cluster Commands

CommandDescription
expanse clusters listList configured clusters
expanse clusters test <name>Test connectivity to a cluster
expanse clusters status <name>Show cluster queue status

Configuration Commands

CommandDescription
expanse config showDisplay current configuration
expanse config set <key> <value>Set a configuration value
expanse config get <key>Get a configuration value

Global Options

These options can be used with any command:

OptionDescription
--help, -hShow help for a command
--version, -vShow Expanse version
--config <path>Use a specific config file
--quiet, -qSuppress non-essential output
--jsonOutput in JSON format

Environment Variables

VariableDescription
EXPANSE_TOKENAPI authentication token
EXPANSE_CONFIGPath to config file
EXPANSE_CLUSTERDefault cluster name
EXPANSE_LOG_LEVELLogging verbosity (debug, info, warn, error)