0.21.0 • Published 2 years ago

@console-cat/sdk v0.21.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Node.js SDK

This is the Console Cat Node.js SDK.

/ᐠﹷ ‸ ﹷ ᐟ\ノ

First steps

To start collecting CLI telemetry, go to the Console Cat website, sign in with your GitHub account, and click "Add a CLI".

You'll get a code snippet with your Console Cat <CLI_ID> that you can then drop into your Node.js CLI.

Installation

Download the @console-cat/sdk package with your package manager of choice.

Yarn

yarn add @console-cat/sdk

npm

npm install @console-cat/sdk

Initialize Console Cat

Once you've installed the SDK package and created a CLI on our website, all that's left is copy-and-pasting a snippet into your CLI's entry point to initialize Console Cat.

Importantly, this snippet should run before anything else in your CLI. Usually it goes in your index.js (or index.ts if using Typescript). Alternatively, add it to the files linked in bin in your package.json.

Javascript

const { ConsoleCat } = require('@console-cat/sdk');
  
ConsoleCat.initialize({
    cliId: "<CLI_ID>",
    version: "<VERSION>", // Should match `version` in your CLI's `package.json`
});

Typescript

import { ConsoleCat } from '@console-cat/sdk';
  
ConsoleCat.initialize({
    cliId: "<CLI_ID>",
    version: "<VERSION>", // Should match \`version\` in your CLI's `package.json`
});

FAQ

Q: What information does Console Cat collect?

A: Currently, Console Cat collects the timestamp, version, duration, exit code, and hash of machine UUID / GUID for every command execution. Here's the code pointer.

Q: I don't see anything on my charts?!?

A: This means Console Cat hasn't recieved any telemetry from your CLI. After copy-and-pasting the Console Cat snippet, try running your CLI locally and then refresh the dashboard.

Once it looks like it's working, you'll want to publish a new version of your CLI if using NPM.

If you're still having trouble, reach out to the Console Cat team and we'll help you get set up.

Q: Why is the version number wrong?

Q: What about custom events?

0.21.0

2 years ago

0.20.0

2 years ago

0.19.0

2 years ago

0.18.0

2 years ago

0.17.0

2 years ago

0.16.0

2 years ago

0.15.0

2 years ago

0.14.0

2 years ago

0.13.0

2 years ago

0.12.0

2 years ago

0.11.0

2 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago