Reference Guide
Replay Node (Experimental)

Replay Node (Experimental)

For recording Node processes, Replay provides the @replayio/node (opens in a new tab) npm package which can be used to execute and record a script.

Getting setup

npm i @replayio/node --global
replay-node script-name.js
REPLAY_API_KEY=YOUR-KEY npx @replayio/replay view-latest

Note: This will prompt you to install @replayio/replay if you haven’t already!


Lets say you want to record loop.js

for (let i = 0; i < 5; i++) {
   console.log(`Hello ${i}`)

You'd first create the replay with replay-node and then upload it with @replayio/replay:

replay-node loop.js
REPLAY_API_KEY=YOUR-KEY npx @replayio/replay view-latest

And once it's uploaded you'd be able to view it at (opens in a new tab)



If you want to record a ts-node invocation, invoke replay-node like so

replay-node --exec ts-node ...

Upgrading Node

Replay's fork of Node is in active development and it is recommended that you update it fairly regularly.

replay-node --update

Upgrading the CLI

If the CLI is installed locally, you can run npm i @replayio/replay@latest. If the CLI is installed globally, you can run npm update -g @replayio/replay .