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
| Command | Purpose | Useful flags |
|---|---|---|
run / eval / repl | Execute a file, an inline expression or start a REPL. | eval -e |
check / lint / fmt | Static analysis, lint and formatting gates. | --json, fmt --check |
test | Native PeaLang test runner with coverage and JUnit output. | --filter, --coverage, --watch, --json, --junit |
compile / vm / dis | Emit and inspect .peac bytecode, run the VM. | vm --max-instructions |
init / new / quickstart | Scaffold projects from all 11 templates: analysis, api, automation, cli, data, default, etl, interop, library, polyglot, webapp. | --template |
typecheck / typecheck-project | Enforce optional static contracts. | — |
doctor / health / diagnose | Environment and installation checks. | — |
install / lock / deps / publish | Package manager, lockfile and registry operations. | --verify, --offline, --registry, --token, --check |
workspace / build / update | Multi-package projects and builds. | — |
sdk / sdk-codegen | List or generate host SDKs from exported functions. | generate <lang> <dir> |
wasm-build / wasm-inspect | Build and inspect PEAWASM artifacts. | — |
dap / vm-dap / debug | Debug Adapter Protocol and debugger integration. | — |
benchmark / profile | Repeatable performance runs. | --iterations, --save-baseline, --baseline |
openapi / web-openapi | Generate OpenAPI 3.0 contracts from web apps. | — |
ext / lib / market / plugin | Extensions, libraries, marketplace and plugin policy. | lib build/quality/publish |
freeze | Frozen 3.0 core-surface verification (Phase 70). | — |
optimize | Conservative .peac bytecode optimizer (Phase 71). | --verify, --no-constant-folding, --no-dead-push-pop, --no-unreachable-code |
fast | Fast direct-handler interpreter parity and benchmark gate (Phase 72). | --verify, --benchmark, --optimize |
conformance / conformance-v2 / quality | Language 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.
| Surface | Flag / stability | Verified names |
|---|---|---|
| Conformance Suite v2 (Phase 69) | language.conformance_v2 · Preview | ConformanceCaseV2, 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 · Stable | CoreSurface, CoreFreezeManifest, default_core_manifest, core_freeze_gate, verify_core_freeze, core_freeze_report |
| Bytecode optimizer (Phase 71 / 3.1.38) | runtime.bytecode_optimizer_v3 · Stable | BytecodeOptimizer, 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 · Stable | FastInterpreter, 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
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.