Start

Getting started

Build the workspace, run the test suite, and exercise the CLI against the local catalog. You do not need a GCP project for anything on this page.

Requirements

Clone and path

git clone https://github.com/Yash-Kavaiya/cxas-harness.git
cd cxas-harness

On Windows PowerShell, cargo is often installed but not on PATH in the current session:

$env:Path = "$env:USERPROFILE\.cargo\bin;$env:Path"

Build and test

cargo test --workspace
cargo build -p cxas-cli

The binary is named cxas. After a debug build it sits at target/debug/cxas (or cxas.exe on Windows). You can also run through cargo:

cargo run -p cxas-cli -- --help

First commands

cargo run -p cxas-cli -- init --app-dir ./my-app
cargo run -p cxas-cli -- lint --app-dir ./my-app
cargo run -p cxas-cli -- create --name demo --location us --project-id my-project
cargo run -p cxas-cli -- apps list --location us --project-id my-project
cargo run -p cxas-cli -- state --app-dir ./my-app --location us --project-id my-project

JSON is the default. For a human-readable lint summary:

cargo run -p cxas-cli -- --format human lint --app-dir ./my-app

A successful JSON envelope looks like:

{ "ok": true, "command": "lint", "data": { } }

A usage failure (missing location, TTY required, disabled feature) uses exit code 2:

{ "ok": false, "command": "pull", "error": { "code": "LOCATION_REQUIRED", "message": "..." } }

Location rule

No silent global Every CES-shaped constructor takes a Location. Empty location is LocationRequired. The sentinel __default_global__ is LocationHardcodedGlobalForbidden. Passing the literal string global is allowed because that is an explicit caller choice (issue #401).

CLI commands that talk to CES-shaped resources require --location and usually --project-id. lint is local and only needs --app-dir.

Where state lives

Apps, deployments, and related records persist in .cxas/catalog.json at the process working directory. Override the path with CXAS_CATALOG. The directory is gitignored. Details: Local catalog.

Optional features

FeatureHowWhat it unlocks
llmcargo run -p cxas-cli --features llm -- llm-lint --app-dir ./my-appGemini HTTP semantic lint. Without the feature the command exits 2.
tuimigration crate featureInteractive DFCX TUI. Default migrate dfcx is non-interactive.
run-sessionneeds a TTYInteractive session. Non-TTY exits 2.