Production Track · 03

CLI, projects & tooling

The pea console script is a hand-written dispatcher with a broad command surface. The commands below are the ones used in real delivery pipelines.

Command map

CommandPurposeUseful flags
run / eval / replExecute a file, an inline expression or start a REPL.eval -e
check / lint / fmtStatic analysis, lint and formatting gates.--json, fmt --check
testNative PeaLang test runner with coverage and JUnit output.--filter, --coverage, --watch, --json, --junit
compile / vm / disEmit and inspect .peac bytecode, run the VM.vm --max-instructions
init / new / quickstartScaffold projects from all 11 templates: analysis, api, automation, cli, data, default, etl, interop, library, polyglot, webapp.--template
typecheck / typecheck-projectEnforce optional static contracts.—
doctor / health / diagnoseEnvironment and installation checks.—
install / lock / deps / publishPackage manager, lockfile and registry operations.--verify, --offline, --registry, --token, --check
workspace / build / updateMulti-package projects and builds.—
sdk / sdk-codegenList or generate host SDKs from exported functions.generate <lang> <dir>
wasm-build / wasm-inspectBuild and inspect PEAWASM artifacts.—
dap / vm-dap / debugDebug Adapter Protocol and debugger integration.—
benchmark / profileRepeatable performance runs.--iterations, --save-baseline, --baseline
openapi / web-openapiGenerate OpenAPI 3.0 contracts from web apps.—
ext / lib / market / pluginExtensions, libraries, marketplace and plugin policy.lib build/quality/publish
freezeFrozen 3.0 core-surface verification (Phase 70).—
optimizeConservative .peac bytecode optimizer (Phase 71).--verify, --no-constant-folding, --no-dead-push-pop, --no-unreachable-code
fastFast direct-handler interpreter parity and benchmark gate (Phase 72).--verify, --benchmark, --optimize
conformance / conformance-v2 / qualityLanguage conformance and quality gates.—

Current gates: conformance, freeze, optimizer and fast path

Tagged v3.1.39 adds four verification surfaces after the v3.1.36 line. Use the CLI gates in CI; the Python-level APIs are available when a host needs a report object.

SurfaceFlag / stabilityVerified names
Conformance Suite v2 (Phase 69)language.conformance_v2 · PreviewConformanceCaseV2, SUITE_V2, SUITE_VERSION, validate_case, run_case, run_conformance_suite_v2, conformance_report_v2, conformance_gate_v2
Frozen 3.0 core (Phase 70 / 3.1.37)language.core_freeze_v3 · StableCoreSurface, CoreFreezeManifest, default_core_manifest, core_freeze_gate, verify_core_freeze, core_freeze_report
Bytecode optimizer (Phase 71 / 3.1.38)runtime.bytecode_optimizer_v3 · StableBytecodeOptimizer, fold_constants, remove_dead_pushes, remove_unreachable, optimize_bytecode, optimize_report, verify_optimization, bytecode_optimizer_gate, build_bytecode_optimizer_namespace
Fast interpreter (Phase 72 / 3.1.39)runtime.fast_interpreter_v3 · StableFastInterpreter, FastProgram, FastFrame, compile_fast_program, verify_fast_parity, benchmark_fast, fast_interpreter_report, fast_interpreter_gate

The optimizer applies three conservative passes to portable .peac bytecode: constant folding, dead literal push/pop removal, and unreachable-code removal with jump-target remapping. pea optimize app.peac --verify prints a report and fails the gate on a parity problem. The fast interpreter pre-binds supported instructions to closures in a tight loop and falls back to the standard VM for calls, imports, handlers, iterators and object access; pea fast app.peac --verify --benchmark checks parity and reports timings.

Safe metaprogramming is a separate Preview surface (language.macros_v2): SafeMacro, SafeMacroExpander, validate_macro, expand_or_raise, expand_source_macros, STANDARD_SAFE_MACROS and compile_source_with_macros. Macros are validated and expanded before bytecode compilation; there is no arbitrary runtime code generation.

Package delivery and security surface

Registry, workspace and plugin tooling are Python-level modules behind the pea install, pea workspace, pea lib and pea plugin commands:

  • Offline cache: cache_package, find_cached, list_cached, remove_cached, export_cache, import_cache.
  • Workspaces: init_workspace, load_workspace, workspace_members, workspace_graph, workspace_lock.
  • Registry and policy: namespace authorization, dependency advisories and license policy, signed publish/install, plugin manifest trust and scanning, and package signatures.

Manifests, locks and configuration

# pea.toml
[project]
name = "risk-rules"
version = "1.2.0"
entry = "src/rules.pea"

[library]
exports = ["evaluate", "explain"]

Formatter settings live in .peafmt.toml or pea.json (indent_size, max_line_length, trailing_comma, brace_style, space_around_operators). Security policy files live in .pealang/ and ~/.pealang/.

Editor & CI integration

An LSP server, formatter and DAP adapter ship in the package. A typical CI gate is:

pea fmt src/ --check
pea check src/ --json
pea typecheck-project
pea test tests/ --coverage --junit reports/pea.xml
pea conformance-v2
pea freeze
pea optimize app.peac --verify
pea fast app.peac --verify --benchmark
The conformance-v2, freeze, optimize and fast commands are present in tagged v3.1.39. Verify availability with pea --help in your environment; the tagged v3.1.36 release line stops at Phase 68.

Apply these gates to the examples in the code library before copying them into a service.