One Piece Language

A lightweight scripting language with real tooling.

OPL combines concise pirate syntax with a production-style toolchain: an AST interpreter, bytecode VM, closures, models, collections, diagnostics, debugger integration, a standard library, and VSCode support.

bounty x = 5
say x + 1

dfruit add(a, b):
    return a + b

say add(2, 3)

Language Core

Functions, closures, models, lists, maps, imports, and a compact standard library.

Runtime

Run through the AST interpreter or opt into the stack-based bytecode VM and `.oplb` files.

Editor Tools

Use diagnostics, autocomplete, file icons, run/debug buttons, LSP support, and DAP debugging in VSCode.

Install

Install from PyPI and run your first `.opl` file.

python -m pip install oplang
opl run app.opl
opl build app.opl
opl run app.oplb --vm

Examples

Pirate syntax, real language behavior.

Functions

dfruit add(a, b):
    return a + b

say add(2, 3)

Models

model Pirate:
    dfruit spawn(name):
        captain.name = name

    dfruit greet():
        say captain.name

Collections

bounty crew = ["Luffy", "Zoro"]
append(crew, "Nami")

for member in crew:
    say member

Playground

Try the syntax, then run it locally with the OPL CLI.

Expected output

        
GitHub Pages is static hosting, so this page does not execute code on a server. Install OPL with `python -m pip install oplang`, save the sample as `app.opl`, and run `opl run app.opl`.