[PYNE Documentation]
Open-source Pine Script™ evaluation framework — grammar, AST, bar-loop runtime, LSP, Pro API, and edge workers.
PYNE Documentation
PYNE is the open evaluation stack for TradingView® Pine Script™: a formal ANTLR4 grammar, an ASDL algebraic AST, a deterministic bar-loop evaluator, a Language Server Protocol surface, a Flask Pro API, and edge workers that share one evaluate contract.
Pine Script™ and TradingView® are trademarks of TradingView, Inc. This project is independent and not affiliated with or endorsed by TradingView, Inc.
Abstract
Where closed hosts couple the language to a proprietary charting host, PYNE treats the language as an inspectable pipeline:
Source (.pine)
→ ANTLR4 lexer/parser (resource grammar)
→ ASDL AST (builder)
→ bar-loop evaluator (builtins, strategy, drawings)
→ plots / events / metrics
The same pipeline powers the desk CLI, the LSP binary, the Pro API, browser Pyodide (via AXIS), and Cloudflare® workers. Round-trip fidelity (parse → unparse) and a large builtin corpus are first-class invariants, not marketing claims — see compatibility and implementation status.
Product map
| Surface | Role | Start here |
|---|---|---|
| Library + CLI | Parse, lint, unparse, evaluate on your machine | End User hub |
| Language core | Grammar, AST, visitors, type system | Core |
| Runtime | Series model, builtins, strategy, compiler | Runtime |
| LSP | Diagnostics, completion, hover, format | LSP |
| Pro API | HTTP /run, preview, backtest | API |
| Ops | CI, Docker, Nuitka, secrets, GCP | DevOps |
| AXIS (separate product) | Charting PWA AXIS | AXIS docs |
| HOOX | Edge trade mesh | HOOX docs |
Conceptual model
Invariant: evaluation never requires a proprietary chart host. AXIS is an optional AXIS; HOOX is an optional execution mesh.
Tracks
End User
Install the package, run the CLI, embed the library API, wire an editor, or call the Pro API as a consumer.
Core / Runtime / LSP / API
Contributor and systems manuals: how the front-end, semantics, editor protocol, and HTTP bridge are built.
DevOps
CI matrices, Fernet metadata encryption, Nuitka LSP binaries, containers, Cloud Build.
Reference
Compatibility guarantees, missing surface, numerical validation, TypeScript pine-worker parity tool.
Sister surfaces
- pyne-worker (separate repo) — Python Cloudflare® Worker for production
/run. - pine-worker (this monorepo,
pine-worker/) — TypeScript port + converter; see pine-worker. - AXIS (
frontend/) — installable PWA; documented at hoox.sh/axis/docs.
Offline & agent exports
Auto-generated like HOOX manuals (bun run docs:exports):
| Kind | Path |
|---|---|
| Full-corpus LLM pack | llm.txt |
| LLM site map (llmstxt.org) | llms.txt |
| Track PDFs (A4) | /exports/pyne-*-manual.pdf |