Skip to content

Install

ParaScript is a parse-time syntax extension over TypeScript. To use it outside of Parabun, you need three things:

  1. A transpiler that recognizes .pts files. Today this is bun build — Bun’s parser is what implements the syntax.
  2. A bundler alias that maps para:* import specifiers to the runtime shim package. One line of bundler config.
  3. The runtime package, parabun-browser-shims.

A standalone @parascript/transpile npm package (no Bun required) is on the roadmap. Until it ships, the build host needs Bun installed; runtime hosts (browser, Lambda, Workers, Node, Deno) do not.

Terminal window
curl -fsSL https://bun.sh/install | bash
Terminal window
npm install parabun-browser-shims

parabun-browser-shims is pure JavaScript with no native dependencies. It exports the runtime side of every para:* module the language uses: signals, arena, parallel, pipeline, simd, arrow, csv.

vite.config.ts
import { defineConfig } from "vite";
export default defineConfig({
resolve: {
alias: [{ find: /^para:(.*)$/, replacement: "parabun-browser-shims/$1" }],
},
});
import { build } from "esbuild";
await build({
entryPoints: ["src/main.js"],
bundle: true,
outfile: "dist/main.js",
plugins: [{
name: "para-alias",
setup(b) {
b.onResolve({ filter: /^para:/ }, args => ({
path: require.resolve(`parabun-browser-shims/${args.path.slice(5)}`),
}));
},
}],
});
webpack.config.js
module.exports = {
resolve: {
alias: {
"para:signals": "parabun-browser-shims/signals",
"para:arena": "parabun-browser-shims/arena",
"para:parallel": "parabun-browser-shims/parallel",
"para:pipeline": "parabun-browser-shims/pipeline",
"para:simd": "parabun-browser-shims/simd",
"para:arrow": "parabun-browser-shims/arrow",
"para:csv": "parabun-browser-shims/csv",
},
},
};
Terminal window
bun build src/main.pts --outdir dist/

The output is standard JavaScript. Bundle it with your normal toolchain (vite build, webpack, etc.); the alias takes care of the para:* imports.

A VS Code-family extension provides the .pts / .ptsx / .pjs / .pjsx TextMate grammar and an LSP with hover, go-to-definition, semantic highlighting, purity diagnostics, and operator documentation.

Terminal window
curl -fsSL https://raw.githubusercontent.com/airgap/parabun/main/install-extension.sh | bash

The script installs into any of code, cursor, or kiro it finds on $PATH.

The build step (Bun + bundler) runs on Linux, macOS, and Windows. The output is standard JavaScript; runtime targets are anywhere a JavaScript engine runs. The shim package targets ES2022.