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 # 1.0.6

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 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

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.