@wildbappy/bappy-cli 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,17 +1,21 @@
1
- # comptracker CLI (alias: bappy)
1
+ # comptracker CLI (legacy package name: @wildbappy/bappy-cli)
2
2
 
3
3
  Command-line access to Comptracker's competitive intelligence dashboard subagent API.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- npm install -g @wildbappy/bappy-cli
8
+ npm install -g @wildbappy/comptracker-cli
9
9
  ```
10
10
 
11
+ This package (`@wildbappy/bappy-cli`) remains supported for backwards compatibility, but the recommended install is `@wildbappy/comptracker-cli` so the install command matches the CLI name.
12
+
11
13
  ## First Run
12
14
 
13
15
  ```bash
14
- comptracker "how many recent blog posts has peer AI made?"
16
+ comptracker --json "How many blog posts has [company name] made in the last 6 months, synthesize them and give me a list of headlines I can use for my own blog"
17
+ comptracker --json "Given the features offered by my other competitors in the market, does it seem like anyone is positioned to expand horizontally into new verticals? and if so, who?"
18
+ comptracker --json "Write me a report for marketing and sales copy that I can use to leapfrog the value propositions of the competition."
15
19
  ```
16
20
 
17
21
  On first run, the CLI prompts for your token:
package/bin/bappy.js CHANGED
@@ -13,6 +13,9 @@ const TOOL_NAME = 'comptracker';
13
13
  const TOOL_ALIASES = ['bappy'];
14
14
 
15
15
  function notifyIfUpdateAvailable() {
16
+ // When invoked via the @wildbappy/comptracker-cli wrapper, let the wrapper
17
+ // handle update notifications so users aren't told to upgrade the dependency.
18
+ if (process.env.COMPTRACKER_CLI_WRAPPER === '1') return;
16
19
  try {
17
20
  const updateNotifier = require('update-notifier');
18
21
  const pkg = require('../package.json');
@@ -215,6 +218,11 @@ function renderResult(result, asJson = false) {
215
218
  return;
216
219
  }
217
220
 
221
+ if (answer && typeof answer.response === 'string' && answer.response.trim()) {
222
+ stdout.write(`${answer.response.trim()}\n`);
223
+ return;
224
+ }
225
+
218
226
  if (result?.status && result?.result) {
219
227
  stdout.write(`${JSON.stringify(result.result, null, 2)}\n`);
220
228
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildbappy/bappy-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "CLI for Comptracker's competitive intelligence dashboard",
5
5
  "bin": {
6
6
  "bappy": "bin/bappy.js",