Interactive REPL

Elide includes an interactive polyglot REPL. Start it explicitly with elide repl, or just run elide on a TTY:

bash
 elide repl

Languages

The REPL evaluates JavaScript, TypeScript, and Python. Use /help inside a session to list the active language, available languages, and supported commands.

Session features

  • Persistent history — previous input is recalled across sessions.
  • Meta-commands/-prefixed session commands (see below).

Meta-commands

Session commands are prefixed with /:
CommandDescription
/helpList commands and the active/available languages.
/exitLeave the REPL.
/clearClear the screen.
/lang Switch the active language.
/js, /ts, /pyWith no argument, switch to that language; with an argument, evaluate it once in that language without changing the active language.
/export Export a binding to the polyglot bindings (Polyglot.export, or Python polyglot.export_value).
/import Import a polyglot binding into the current language.
/history [N]Show the last N history entries (default 20).
/resetWipe the durable history store (the in-session arrow-up history is kept).
The repl command itself takes no CLI flags.