LogoPear Docs

Bare CLI

Reference for the bare command: evaluate a script, start a REPL, and the flags for inspecting, evaluating, and printing.

stable

The bare command runs a script on the Bare runtime or starts a REPL. Install it globally with:

npm i -g bare

Usage

bare [flags] [filename] [...args]

Evaluate a script, or start a REPL session if no script is provided.

Arguments

  [filename]              Optional. The name of a script to evaluate
  [...args]               Additional arguments made available to the script

Arguments after filename are passed through to the script and are available as Bare.argv.

Flags

  --version|-v            Print the Bare version
  --eval|-e <script>      Evaluate an inline script
  --print|-p <script>     Evaluate an inline script and print the result
  --inspect               Activate the inspector
  --inspect-port <port>   Configure the inspector port (default: 9229)
  --expose-gc             Expose garbage collection APIs
  --help|-h               Show help

Module loading

The specified filename (or inline --eval script) is run with Module.load(), which resolves both CommonJS and ESM and provides interop between them. For the supported formats and resolution rules, see bare-module.

See also

On this page