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
- Rust 1.80+ (
rustc/cargo) - Git
- Optional:
protoc. Without it,cxas-protouses the hand-writtenEvaluationRunStatewrapper and skips codegen.
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
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
| Feature | How | What it unlocks |
|---|---|---|
llm | cargo run -p cxas-cli --features llm -- llm-lint --app-dir ./my-app | Gemini HTTP semantic lint. Without the feature the command exits 2. |
tui | migration crate feature | Interactive DFCX TUI. Default migrate dfcx is non-interactive. |
run-session | needs a TTY | Interactive session. Non-TTY exits 2. |