How to start Node.js repl with some ESM already imported repl.js import { foo, bar } from './foobar.js' import { baz } from './baz.js' Object.assign(globalThis, { foo, bar, baz }) node -r ./repl.js Now foo, bar, baz will be available.