npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

replayable

v0.2.1

Published

Fix bugs, close pulls, and update your team with desktop instant replay.

Downloads

4

Readme

CLI + SDK

Why double-back when you can capture it the first time? Playback and share exactly what happened with Replayable's desktop replay buffer.

This package allows you to control the Replayable desktop application from the CLI or SDK.

You can easily embed desktop replays within git commits, pull requests, bug reports, jira tickets, and even within log files.

Desktop replays are a great way to share context behind problems and document the application state within logs, tickets and more.

Quick Setup

Install Replayable Desktop

First, install Replayable Desktop. Replayable Desktop runs in the background giving you access to a buffer of video.

Install this package

npm install replayable -g

Examples

CLI

Create a Replay

$ replayable
https://replayable.io/replay/123?share=xyz

Return a rich markdown link

$ replayable --md

[![Replayable - New Replay](https://replayable-api-production.herokuapp.com/replay/123/gif?shareKey=xyz)](https://replayable.io/replay/123?share=xyz)

Watch [Replayable - New Replay](https://replayable.io/replay/123?share=xyz) on Replayable

Set a replay title

$ replayable -t "My New Title"

Attach the last 20 CLI commands to the replay

$ history -20 | replayable

Attach a logfile to the replay

This will attach the mac system log to the replay.

$ cat /var/log/system.log | replayable

GitHub CLI

The following examples depend on having the GitHub CLI installed.

Create a github issue with a replay in the description

$ gh issue create -w -t "Title" -b "`replayable --md`"

This is where it gets really cool. For example, this single command will create a GitHub issue with a video replay and the mac system logs.

gh issue create -w -t "Title" -b "`cat /var/log/system.log | replayable --md`"

Create a github pull request with a replay in the description

$ gh pr create -w -t "Title" -b "`replayable --md`"

Append a 30 second replay to a commit

$ git commit -am "`replayable`"

NodeJS SDK

const replayable = require("replayable");

process.on("uncaughtException", async (err) => {
  let replay = await replayable.createReplay({
    title: "uncaughtException",
    description: err,
  });
  console.log("Replayable", replay);
});

setTimeout(() => {
  throw new Error("Throw makes it go boom!");
}, 3000);

Javascript Integration

Note that this example does not require any library to be installed as the app exposes the protocol natively.

window.onerror = function myErrorHandler() {
  window.open("replayable://replay/create", "_blank");
};

setTimeout(() => {
  throw new Error("Throw makes it go boom!");
}, 3000);

Advanced Usage

Usage: replayable create [options]

Create a replay and output the resulting url or markdown. Will launch desktop app for local editing before publishing.

Options:
  -t, --title <string>      Title of the replay. Automatically generated if not supplied.
  -d, --description [text]  Replay markdown body. This may also be piped in: `cat README.md | replayable create`
  --md                      Returns code for a rich markdown image link.
  -h, --help                display help for command

Ideas

It would be possible to string this along in a git hook to publish with every commit.