5-Minute Setup

Quickstart Guide

Get APX running in your project in 5 minutes. Install the CLI, initialize a sample pack, run your first check, and explore the results.

npm i -g @apx/cli && apx init && apx check --json

The 5-Minute Path

1

Install the CLI

APX provides both npm and Python package managers. Choose whichever fits your workflow.

npm (Node.js)
npm i -g @apx/cli
pip (Python)
pip install apx-harvest

Verify installation: Run apx --version to confirm the CLI is installed.

2

Initialize a Sample Pack

Run apx init to drop a sample PackSpec and constraints into your repository. This creates a baseline policy for your project.

apx init

What gets created:

  • apx.packspec.json — Your policy pack definition
  • .apx/constraints/ — Sample constraints (e.g., encryption, access control)
  • .apx/config.json — Local configuration

Tip: Review the generated PackSpec to understand the baseline constraints. You can customize these for your project's needs.

3

Run Your First Check

Execute apx check --json to analyze your codebase against the PackSpec. APX will emit three JSON files with results.

apx check --json

check.core.json

Core evaluation results: PASS/WARN/BLOCK, constraint satisfaction, margins, and locations

check.receipt.json

Audit trail: complete evaluation history, timestamps, and lineage for compliance

check.health.json

Semantic health metrics: debt accumulation, trends, and quality indicators

4

Explore the Results

Open the JSON files in Studio Lite or your IDE extension to visualize constraints, health metrics, and violations.

Studio Lite

Visual interface for exploring Pack structure, constraints, and semantic violations

Open Studio Lite

CLI Helper

Launch Studio Lite directly with your check results

apx studio-lite --open check.core.json

Success! You've run your first APX check. Now integrate it into your CI/CD pipeline to catch semantic drift before it reaches production.

One-Line Summary

Use this one-liner in README files, documentation, or onboarding guides:

Try APX in 5 minutes: npm i -g @apx/cli && apx init && apx check --json, then open check.core.json in Studio Lite or your IDE to see PASS/WARN/BLOCK, health, and receipts.