[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

SurfaceRoleStart here
Library + CLIParse, lint, unparse, evaluate on your machineEnd User hub
Language coreGrammar, AST, visitors, type systemCore
RuntimeSeries model, builtins, strategy, compilerRuntime
LSPDiagnostics, completion, hover, formatLSP
Pro APIHTTP /run, preview, backtestAPI
OpsCI, Docker, Nuitka, secrets, GCPDevOps
AXIS (separate product)Charting PWA AXISAXIS docs
HOOXEdge trade meshHOOX 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.

End User hub

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.

DevOps hub

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):

KindPath
Full-corpus LLM packllm.txt
LLM site map (llmstxt.org)llms.txt
Track PDFs (A4)/exports/pyne-*-manual.pdf

See also