jhmaster2000 / bun-repl

Experimental REPL for Bun
https://www.npmjs.com/package/bun-repl
MIT License
74 stars 8 forks source link
bun cli js repl ts

Bun REPL GitHub version GitHub code size in bytes license

Experimental REPL for Bun

NOTICE: This package is planned to be embedded directly into Bun sometime soon, this must be taken into consideration if making contributions to the package.

Install

You can use it directly via Bun with:

bun repl

No installation required!

Versioning

npm and GitHub releases will always be guaranteed to not rely on current Bun canary versions, but support for any version other than the latest non-canary will not be guaranteed.

The source code repository latest commit may contain code not yet in any release which depends on currently Bun canary-only features and has no guarantees.

Features

Usage

bun repl [options]

Pass the -h or --help CLI option for a list of all options.

Type .help within the REPL for a list of commands.

Press and to travel up or down the execution history.

bun repl exposes the special variable repl which provides access to a REPL interface like the Node.js REPL (also accessible through import/require of repl or node:repl).

You can use repl.writer.options like you would in Node.js REPL to customize the live output of the running REPL.