Skip to content

spatialpack pack

Terminal window
spatialpack pack <command> [options]

Pack creation, build, and publish commands.

Build spatial packs from YAML pipeline definitions and publish to CDN.

CommandDescription
pack buildBuild a spatial pack from YAML pipeline.
pack cleanScan packs directory for stale, duplicate, and invalid packs.
pack infoDisplay information about a pipeline.
pack initInitialize a new pack directory from template.
pack publishPublish a built pack to S3 CDN.
pack verifyVerify a pack’s integrity: re-hash every asset from disk and recompute
Terminal window
# Initialize a new pack from template
spatialpack pack init ./my-pack --template solar-feasibility
# Build pack from pipeline YAML
spatialpack pack build pipeline.yaml -o ./output/
# Validate pipeline without executing
spatialpack pack build pipeline.yaml --dry-run
# Publish pack to S3 CDN
spatialpack pack publish ./packs/wa-feasibility-test --bucket your-packs-bucket
# Clean stale/duplicate packs
spatialpack pack clean ./packs/

Build a spatial pack from YAML pipeline.

Executes the pipeline stages in dependency order, producing a complete spatial pack with manifest and integrity hashes.

Terminal window
spatialpack pack build PIPELINE_PATH [options]

PIPELINE_PATH — path (required)

Options:

OptionTypeDefaultDescription
-o, --outputpath-Output directory for the pack (default: ./output/)
--dry-runflagfalseValidate pipeline without executing
--continue-on-errorflagfalseContinue execution after stage failures
--stagetext (multiple)-Run only specific stage(s)
--resumeflagfalseResume a partial build: reuse outputs that still hash to the recorded value, rebuild the rest (requires blake3)
--base-dirdirectory-Base directory for resolving relative source paths. Defaults to current working directory.
Terminal window
# Build pack
spatialpack pack build pipeline.yaml -o ./wa-solar-pack/
# Dry run (validate only)
spatialpack pack build pipeline.yaml --dry-run
# Continue on errors
spatialpack 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_dem

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.

Terminal window
spatialpack pack clean PACKS_DIR [options]

PACKS_DIR — directory (required)

Options:

OptionTypeDefaultDescription
--forceflagfalseDelete without confirmation prompt
--jsonflagfalseOutput structured JSON
Terminal window
# Dry-run scan
spatialpack pack clean ./packs/
# Delete stale packs
spatialpack pack clean ./packs/ --force
# JSON report
spatialpack pack clean ./packs/ --json

Display information about a pipeline.

Shows pipeline metadata, sources, stages, and execution plan without running the pipeline.

Terminal window
spatialpack pack info PIPELINE_PATH

PIPELINE_PATH — path (required)

Terminal window
spatialpack pack info pipeline.yaml

Initialize a new pack directory from template.

Creates the pack folder structure with skeleton manifest and optional pipeline template.

Terminal window
spatialpack pack init PACK_PATH [options]

PACK_PATH — path (required)

Options:

OptionTypeDefaultDescription
--templatebasic | solar-feasibility | urban-planningbasicPack template to use (default: basic)
--pack-idtext-Pack identifier (e.g., spatial.properties:wa:solar-feasibility:v1)
--titletext-Human-readable pack title
--descriptiontext-Pack description
--forceflagfalseOverwrite existing pack directory
Terminal window
# Create basic pack
spatialpack pack init ./my-pack
# Create solar feasibility pack
spatialpack pack init ./wa-solar --template solar-feasibility
# Create with custom metadata
spatialpack pack init ./my-pack --pack-id "org:region:theme:v1" --title "My Pack"

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.

Terminal window
spatialpack pack publish PACK_DIR [options]

PACK_DIR — directory (required)

Options:

OptionTypeDefaultDescription
--buckettext-S3 bucket name
--prefixtextpacksS3 key prefix (default: packs)
--cdn-domaintextcdn.spatial.propertiesCDN domain for manifest URI rewriting
--profiletext-AWS profile name
--regiontextap-southeast-2AWS region
--dry-runflagfalseShow what would be uploaded without uploading
--allow-unhashedflagfalseDEV ONLY: publish even if assets are unhashed/unverified. Prints per-asset warnings and stamps integrity_verified=false in the manifest.
--register-catalogflagfalseRegister pack in Supabase packs_catalog after upload
--org-idtext-Organization UUID for catalog registration (requires —register-catalog)
--visibilitypublic | org | privatepublicPack visibility in catalog (default: public)
Terminal window
# Publish to S3
spatialpack 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 profile
spatialpack pack publish ./my-pack --bucket my-bucket --cdn-domain cdn.example.com --profile my-profile

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

Terminal window
spatialpack pack verify PACK_DIR

PACK_DIR — directory (required)