spatialpack pack
Synopsis
Section titled “Synopsis”spatialpack pack <command> [options]Description
Section titled “Description”Pack creation, build, and publish commands.
Build spatial packs from YAML pipeline definitions and publish to CDN.
Commands
Section titled “Commands”| Command | Description |
|---|---|
pack build | Build a spatial pack from YAML pipeline. |
pack clean | Scan packs directory for stale, duplicate, and invalid packs. |
pack info | Display information about a pipeline. |
pack init | Initialize a new pack directory from template. |
pack publish | Publish a built pack to S3 CDN. |
pack verify | Verify a pack’s integrity: re-hash every asset from disk and recompute |
Examples
Section titled “Examples”# Initialize a new pack from templatespatialpack pack init ./my-pack --template solar-feasibility
# Build pack from pipeline YAMLspatialpack pack build pipeline.yaml -o ./output/
# Validate pipeline without executingspatialpack pack build pipeline.yaml --dry-run
# Publish pack to S3 CDNspatialpack pack publish ./packs/wa-feasibility-test --bucket your-packs-bucket
# Clean stale/duplicate packsspatialpack pack clean ./packs/Command Details
Section titled “Command Details”pack build
Section titled “pack build”Build a spatial pack from YAML pipeline.
Executes the pipeline stages in dependency order, producing a complete spatial pack with manifest and integrity hashes.
spatialpack pack build PIPELINE_PATH [options]Arguments
Section titled “Arguments”PIPELINE_PATH — path (required)
Options:
| Option | Type | Default | Description |
|---|---|---|---|
-o, --output | path | - | Output directory for the pack (default: ./output/) |
--dry-run | flag | false | Validate pipeline without executing |
--continue-on-error | flag | false | Continue execution after stage failures |
--stage | text (multiple) | - | Run only specific stage(s) |
--resume | flag | false | Resume a partial build: reuse outputs that still hash to the recorded value, rebuild the rest (requires blake3) |
--base-dir | directory | - | Base directory for resolving relative source paths. Defaults to current working directory. |
# Build packspatialpack pack build pipeline.yaml -o ./wa-solar-pack/
# Dry run (validate only)spatialpack pack build pipeline.yaml --dry-run
# Continue on errorsspatialpack pack build pipeline.yaml --continue-on-error
# Resume a partial build (re-hashes every existing output; rebuilds anything stale)spatialpack pack build pipeline.yaml -o ./packs/wa-site-suitability/ --resume
# Run specific stage(s)spatialpack pack build pipeline.yaml --stage mosaic_dem --stage clip_dempack clean
Section titled “pack clean”Scan packs directory for stale, duplicate, and invalid packs.
By default, shows cleanup candidates without deleting (dry-run). Use —force to delete flagged directories. Use —json for machine-readable output.
spatialpack pack clean PACKS_DIR [options]Arguments
Section titled “Arguments”PACKS_DIR — directory (required)
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--force | flag | false | Delete without confirmation prompt |
--json | flag | false | Output structured JSON |
# Dry-run scanspatialpack pack clean ./packs/
# Delete stale packsspatialpack pack clean ./packs/ --force
# JSON reportspatialpack pack clean ./packs/ --jsonpack info
Section titled “pack info”Display information about a pipeline.
Shows pipeline metadata, sources, stages, and execution plan without running the pipeline.
spatialpack pack info PIPELINE_PATHArguments
Section titled “Arguments”PIPELINE_PATH — path (required)
spatialpack pack info pipeline.yamlpack init
Section titled “pack init”Initialize a new pack directory from template.
Creates the pack folder structure with skeleton manifest and optional pipeline template.
spatialpack pack init PACK_PATH [options]Arguments
Section titled “Arguments”PACK_PATH — path (required)
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--template | basic | solar-feasibility | urban-planning | basic | Pack template to use (default: basic) |
--pack-id | text | - | Pack identifier (e.g., spatial.properties:wa:solar-feasibility:v1) |
--title | text | - | Human-readable pack title |
--description | text | - | Pack description |
--force | flag | false | Overwrite existing pack directory |
# Create basic packspatialpack pack init ./my-pack
# Create solar feasibility packspatialpack pack init ./wa-solar --template solar-feasibility
# Create with custom metadataspatialpack pack init ./my-pack --pack-id "org:region:theme:v1" --title "My Pack"pack publish
Section titled “pack publish”Publish a built pack to S3 CDN.
Uploads all pack files with correct Content-Type and Cache-Control headers, rewrites manifest URIs to CDN URLs, and verifies integrity FAIL-CLOSED before upload: every file under the pack dir must carry a valid blake3: asset_hash and the manifest_hash must recompute, or publish aborts naming every offender.
—allow-unhashed is a DEV-ONLY debug escape hatch (not a shipping path): it skips verification, warns per unhashed asset, and stamps integrity_verified=false into the published manifest so consumers can detect an unverified pack.
spatialpack pack publish PACK_DIR [options]Arguments
Section titled “Arguments”PACK_DIR — directory (required)
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--bucket | text | - | S3 bucket name |
--prefix | text | packs | S3 key prefix (default: packs) |
--cdn-domain | text | cdn.spatial.properties | CDN domain for manifest URI rewriting |
--profile | text | - | AWS profile name |
--region | text | ap-southeast-2 | AWS region |
--dry-run | flag | false | Show what would be uploaded without uploading |
--allow-unhashed | flag | false | DEV ONLY: publish even if assets are unhashed/unverified. Prints per-asset warnings and stamps integrity_verified=false in the manifest. |
--register-catalog | flag | false | Register pack in Supabase packs_catalog after upload |
--org-id | text | - | Organization UUID for catalog registration (requires —register-catalog) |
--visibility | public | org | private | public | Pack visibility in catalog (default: public) |
# Publish to S3spatialpack pack publish ./packs/wa-feasibility-test --bucket your-packs-bucket
# Dry run (see what would be uploaded)spatialpack pack publish ./packs/wa-feasibility-test --bucket your-packs-bucket --dry-run
# Custom CDN domain and AWS profilespatialpack pack publish ./my-pack --bucket my-bucket --cdn-domain cdn.example.com --profile my-profilepack verify
Section titled “pack verify”Verify a pack’s integrity: re-hash every asset from disk and recompute
manifest_hash.
Exits non-zero on any mismatch, unknown/unhashed asset, or PLACEHOLDER. This is the exhaustive full re-hash (publish uses the same check via the shared verify_pack_integrity()).
Example:
spatialpack pack verify ./packs/wa-site-suitability-v2
spatialpack pack verify PACK_DIRArguments
Section titled “Arguments”PACK_DIR — directory (required)