A CLI tool for p5.js live coding.
p5run is a CLI tool for running p5.js locally. It allows you to start a live server that renders a single JS file directly without the need for an HTML file.
- Render p5.js with a single JS file
- Supports hot reloading
- Supports TypeScript
To use p5run, you need Bun runtime version 1.1.0 or later. You can install it using the following command.
$ bun install -g p5run$ p5run -h
Usage: p5run [options] <sketch.js|sketch.ts>
Options:
-p, --port <port> Port to listen on
--host <host> Host to bind
--p5js-version <version> p5.js version to load from jsDelivr
-o, --open Open the preview in the default browser
-h, --help Show this help messageStatic files are served from the same directory as the sketch, so assets can be
loaded with paths such as loadImage("assets/photo.png").
This library is distributed under the MIT License.
