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

dashcam

v0.7.3

Published

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

Downloads

7,367

Readme

Dashcam CLI

Add Dashcam to your app or workflow. This package allows you to capture logs and control the Dashcam desktop application via CLI.

Requires that you install Dashcam Desktop.

Manual

Usage: dashcam [options] [command]

Capture the steps to reproduce every bug.

Options:
  -V, --version         output the version number
  -h, --help            display help for command

Commands:
  auth <api-key>    Authenticate the dashcam desktop using a team's apiKey
  create [options]  Create a clip and output the resulting url or markdown. Will launch desktop app for local editing before publishing.
  record [options]  Start a recording terminal to be included in your dashcam video recording
  pipe              Pipe command output to dashcam to be included in recorded video
  track [options]  Add a logs config to Dashcam
  start             Start instant replay recording on dashcam
  help [command]    display help for command

Table of contents

Examples

Also see the examples folder.

CLI

Setup

npm install dashcam -g

Auth

To authenticate the Dashcam desktop app using a team's Api key, Use the following command

dashcam auth <Api-Key>

Record CLI

To record the CLI in the Dashcam app, use the following command

dashcam record

Anything you type in your terminal will appear in your dash. To exit, simply type exit.

exit

Add a new logs config to dashcam

Add a new logs config to dashcam by specifying a name, a type ("application" or "web"), and one or multiple patterns for the urls in the case of a web logs config, or for file paths in the case of an application logs config.

dashcam track --name=social --type=web --pattern="*facebook.com*" --pattern="*twitter.com*"

Pipe command output into dashcam for recording

To record the output of a command in the Dashcam app (In this example the ping 1.1.1.1 command ), use the following command

ping 1.1.1.1 | dashcam pipe

Create a Replay

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

Return a rich markdown link

$ dashcam --md

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

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

Set a replay title

$ dashcam -t "My New Title"

Set a project to publish to

$ dashcam -k wef8we72h23012j

Attach the last 20 CLI commands to the replay

$ history -20 | dashcam

Attach a logfile to the replay

This will attach the mac system log to the replay.

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

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 "`dashcam --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 | dashcam --md`"

Create a github pull request with a replay in the description

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

Append a 30 second replay to a commit

$ git commit -am "`dashcam`"

Advanced Usage

Usage: dashcam 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 | dashcam create`
  --md                      Returns code for a rich markdown image link.
  -h, --help                display help for command

Web

Setup

Nothing! The app exposes the protocol to the system natively via dashcam://.

HTML Anchor Tag

<a href="dashcam://replay/create" target="_blank">Create a Replay</a>

JS Error Handler

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

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

NodeJS SDK

Setup

npm install dashcam

Create a Replay

const dashcam = require("dashcam");

let replay = await dashcam.createReplay({
  title: "My New Replay",
  description: `This **renders markdown** or plaintext in monospace font.`,
});

Error Handler

const dashcam = require("dashcam");

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

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

Ideas

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