Everything you need to run, use and debug PeaLang
Short answers first. For depth, every topic links into Mastering PeaLang, the full 225,246-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
| Command | What it does |
|---|---|
pea run FILE | Execute a PeaLang program (interpreter) |
pea check FILE | Static 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 repl | Interactive session for exploration |
pea docs FILE | Generate Markdown documentation from source |
pea features | List enabled language features |
pea stdlib | List standard-library modules |
pea spec | Verify the bundled specification |
pea build FILE | Compile to PEAC bytecode for the VM |
The full walkthrough is Chapter 1, Lesson 2.
Troubleshooting
| Symptom | Likely cause | Corrective action |
|---|---|---|
| Unsupported Python error | Interpreter is older than 3.10 | Create the environment with a supported interpreter. |
pea command not found | Environment is inactive or command directory is not discoverable | Activate the environment; test pealang or python -m pealang. |
| Wrong PeaLang version | A global or older installation is being resolved | Rebuild or reactivate the intended environment and reinstall. |
| Dependency installation fails | Package source, proxy, certificate, or platform prerequisite problem | Use the approved artifact source and your organization's package configuration. |
| hello.pea cannot be opened | Wrong working directory or filename | Confirm the file path and run the command from the correct directory. |
| Specification verification fails | Incomplete, mismatched, or modified installation | Reinstall 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.