Product

Local catalog

The CLI needs process-stable storage so create in one invocation is visible to apps list in the next. That store is a JSON file, not CES.

Path

  1. If CXAS_CATALOG is set, use that path.
  2. Otherwise use .cxas/catalog.json relative to the current working directory.

.cxas/ is gitignored. Tests should set CXAS_CATALOG to a temp file so they do not collide.

Schema

{
  "apps": [
    {
      "name": "projects/my-project/locations/us/apps/demo",
      "display_name": "demo",
      "project_id": "my-project",
      "location": "us"
    }
  ],
  "deployments": [
    {
      "name": ".../deployments/web",
      "app_name": "projects/my-project/locations/us/apps/demo",
      "channel_type": "web",
      "version": "1"
    }
  ],
  "conversations": [],
  "versions": [],
  "evaluations": []
}

Records are defined in crates/cxas-cli/src/catalog.rs as AppRec, DeploymentRec, and Catalog.

Who writes it

CommandMutation
createAppends an AppRec. Location is stored exactly as passed.
deleteRemoves matching apps (and related deployments).
branchCopies a source app to --new-name.
pushRecords that a local tree was imported.
deploy / deployments createAppends a DeploymentRec.
apps list / getRead-only filter by location / project / name.

Why a file, not memory

An earlier in-memory OnceLock catalog looked fine inside one process and empty in the next. That made apps list after create appear broken when the CLI was launched via cargo run twice. Persistence is the contract.

Not a CES replica The catalog is a developer fixture. It does not implement IAM, quotas, long-running operations, or regional routing. Resource names are strings the CLI composes from --project-id, --location, and the app display name.