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.
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
Also see the examples folder.
npm install dashcam -gTo authenticate the Dashcam desktop app using a team's Api key, Use the following command
dashcam auth <Api-Key>
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 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*"
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
$ dashcam
https://dashcam.io/replay/123?share=xyz$ dashcam --md
[](https://replayable.io/replay/123?share=xyz)
Watch [Dashcam - New Replay](https://dashcam.io/replay/123?share=xyz) on Dashcam$ dashcam -t "My New Title"$ dashcam -k wef8we72h23012j$ history -20 | dashcamThis will attach the mac system log to the replay.
$ cat /var/log/system.log | dashcamThe following examples depend on having the GitHub CLI installed.
$ 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`"
$ gh pr create -w -t "Title" -b "`dashcam --md`"$ git commit -am "`dashcam`"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
Nothing! The app exposes the protocol to the system natively via dashcam://.
<a href="dashcam://replay/create" target="_blank">Create a Replay</a>window.onerror = function myErrorHandler() {
window.open("dashcam://replay/create", "_blank");
};
setTimeout(() => {
throw new Error("Throw makes it go boom!");
}, 3000);npm install dashcamconst dashcam = require("dashcam");
let replay = await dashcam.createReplay({
title: "My New Replay",
description: `This **renders markdown** or plaintext in monospace font.`,
});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);It would be possible to string this along in a git hook to publish with every commit.