Skip to main content

Local Setup

Prerequisites

RequirementVersion
Node.js>= 20.0.0 (ES2022 target)
pnpmLatest (recommended)

Clone and Install

git clone git@github.com:cdot65/prisma-airs-cli.git
cd prisma-airs-cli
pnpm install

Environment

cp .env.example .env

Edit .env with your credentials:

VariableRequiredWhat it's for
PANW_AI_SEC_API_KEYYesPrisma AIRS Scan API key
PANW_MGMT_CLIENT_IDYesAIRS Management OAuth2 client ID
PANW_MGMT_CLIENT_SECRETYesAIRS Management OAuth2 client secret
PANW_MGMT_TSG_IDYesTenant Service Group ID
Tests run without credentials

Unit and integration tests use MSW mocks — you only need real credentials for actual AIRS operations.

Register airs command

To make the airs binary available globally from your source checkout:

pnpm run build
pnpm link --global
airs --version # 4.0.0

After making code changes, re-run pnpm run build for the linked airs command to reflect them. pnpm run dev doesn't require a build step.

Development Commands

CommandWhat it does
pnpm run devRun CLI via tsx — no build needed (e.g. pnpm run dev runtime scan ...)
pnpm local:setupInstall dependencies and build the local package
pnpm local:smokeBuild, print the compiled version, and render compiled help
pnpm local:dev:helpRender help directly from TypeScript source
pnpm local:dev:profilesList profiles as JSON using the source entry point
pnpm local:dev:topicsTraverse topics and render YAML using the source entry point
pnpm local:dev:doctorRun doctor with Markdown output using the source entry point
pnpm local:link / pnpm local:unlinkBuild and globally link, or remove the global package
pnpm run buildCompile TypeScript to dist/
pnpm testRun all tests
pnpm run test:watchWatch mode
pnpm run test:coverageCoverage report
pnpm run lintBiome lint check
pnpm run lint:fixAuto-fix lint issues
pnpm run formatFormat with Biome
pnpm run format:checkCheck formatting (no write)
pnpm tsc --noEmitType-check

Data Directories

Runtime data lives under ~/.prisma-airs/:

PathWhat's in it
~/.prisma-airs/runs/Persisted run states (JSON)
~/.prisma-airs/memory/Cross-run learning store
~/.prisma-airs/config.jsonOptional config file
Config priority

CLI flags > environment variables > config file > Zod schema defaults

pnpm 10 argument forwarding

Invoke arbitrary development commands without a standalone separator: pnpm dev --help and pnpm dev runtime profiles list --output json. A standalone -- is forwarded literally to Commander by pnpm 10.

Verify Setup

Run all three checks to confirm everything works:

pnpm test # All tests pass (no AIRS creds needed)
pnpm run lint # No lint errors
pnpm tsc --noEmit # No type errors
All three should pass on a fresh clone

If any fail, make sure you're on Node >= 20 and have run pnpm install.