PeaBox Lab › PeaLang › Knowledge Base
Knowledge Base

Everything you need to run, use and debug PeaLang

Short answers first. For depth, every topic links into Mastering PeaLang, the full 209k-word learning guide.

Install in two minutes

git clone https://github.com/PeaBox-Lab/PeaLang.git
cd PeaLang
python -m venv .venv
.venv\Scripts\activate        # Windows
source .venv/bin/activate       # macOS / Linux
python -m pip install --upgrade pip
python -m pip install -e .
pea --version

Have the v0.99.6 wheel instead? pip install pealang-0.99.6-py3-none-any.whl. Python 3.10 or newer is required.

Your first program

# hello.pea
let name = "PeaLang"
print "Hello " + name

pea run hello.pea

CLI cheat sheet

CommandWhat it does
pea run FILEExecute a PeaLang program (interpreter)
pea check FILEStatic checks and semantic analysis without executing
pea fmt PATH [PATH...]Format source files in place; --check for CI
pea test [--filter ...]Run native tests; coverage and watch mode available
pea replInteractive session for exploration
pea docs FILEGenerate Markdown documentation from source
pea featuresList enabled language features
pea stdlibList standard-library modules
pea specVerify the bundled specification
pea build FILECompile to PEAC bytecode for the VM

The full walkthrough is Chapter 1, Lesson 2.

Troubleshooting

SymptomLikely causeCorrective action
Unsupported Python errorInterpreter is older than 3.10Create the environment with a supported interpreter.
pea command not foundEnvironment is inactive or command directory is not discoverableActivate the environment; test pealang or python -m pealang.
Wrong PeaLang versionA global or older installation is being resolvedRebuild or reactivate the intended environment and reinstall.
Dependency installation failsPackage source, proxy, certificate, or platform prerequisite problemUse the approved artifact source and your organization's package configuration.
hello.pea cannot be openedWrong working directory or filenameConfirm the file path and run the command from the correct directory.
Specification verification failsIncomplete, mismatched, or modified installationReinstall from a trusted artifact or clean source checkout.

FAQ

Is PeaLang a replacement for Python?

No — it's a complement. Python (or Java/TypeScript/a browser host) owns IO, persistence, auth and native libraries. PeaLang owns the rules, transformations and extension logic you want to ship, change and audit independently.

When should the host grant a capability?

Only when the task genuinely needs it — and narrowly. Grant HTTP access to one host and one path, never the whole network. The guide's capability chapter (Chapter 14) covers the deny-by-default model, scoping and the audit trail.

Interpreter or VM — which engine runs my code?

Both, and they agree. Development usually runs the tree-walking interpreter; production can run the portable VM from a PEAC artifact. Differential testing keeps the two engines behavior-identical. See Chapter 12.

Can I use PeaLang in the browser?

Yes, as a preview feature: WASM/PEAC browser artifacts, capability bridges and a Web Worker runtime are available — with preview compatibility caveats. See Chapter 23.

Where are the connectors documented?

Chapter 17 covers SQLite and adapter contracts, parameterized queries, the connector SDK, REST/GraphQL/OData/SFTP/Microsoft Graph/SharePoint, and S3/Azure/Google object storage — including retries, error classification and pagination.

Still stuck?

Open an issue on GitHub, or email the team. Include pea --version output, a minimal .pea file and the full error text — that's enough for us to reproduce most bugs.

Learning paths

Three honest routes through the guide:

  • Language user (1–2 weeks): Chapters 1–11 — install, syntax, typing, stdlib, modules, testing, packages.
  • Embedding host engineer (2–4 weeks): Chapters 1, 6, 7, 12–15 — errors, typing, interpreter/VM, security, embedding and interop.
  • Data & ML engineer (3–6 weeks): Chapters 1, 5, 16–20 — data foundations, connectors, time series, ML, MLOps and governance.

Production deployment targets (serving, Kubernetes, WASM, release engineering) are covered in Chapters 21–26 — see Dev for the engineering view.