@betterbugs/cli 0.0.0-stage → 0.1.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 BetterBugs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,162 @@
1
- # Temporary Holding Version
1
+ # BetterBugs CLI
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Read, file and act on [BetterBugs](https://betterbugs.io) bug reports from your terminal, CI pipelines and coding agents.
4
+
5
+ ```bash
6
+ npm install -g @betterbugs/cli
7
+
8
+ betterbugs auth login # log in through your browser
9
+ betterbugs list bugs --status open --since 7d
10
+ betterbugs get bug <id> # summary, environment and the most useful signals
11
+ betterbugs pull <id> # the whole report as files, for you or an agent
12
+ betterbugs comment <id> "Root cause: …"
13
+ betterbugs update <id> --status resolved
14
+ ```
15
+
16
+ The package installs the same CLI under three names: **`betterbugs`**, **`bbug`** and **`bb`**.
17
+ Use whichever you like day to day; scripts and docs use `betterbugs`.
18
+
19
+ ## Install
20
+
21
+ **npm** (Node.js 20.18.1 or newer):
22
+
23
+ ```bash
24
+ npm install -g @betterbugs/cli
25
+ ```
26
+
27
+ **Homebrew:**
28
+
29
+ ```bash
30
+ brew install betterbugs/tap/betterbugs
31
+ ```
32
+
33
+ **Run without installing:**
34
+
35
+ ```bash
36
+ npx @betterbugs/cli --help
37
+ ```
38
+
39
+ `get frames` uses [ffmpeg](https://ffmpeg.org) if it is installed; everything else needs nothing extra.
40
+
41
+ > **`bb` already taken?** If another tool (for example Babashka) owns `bb`, npm may refuse to install over it.
42
+ > `bbug` and `betterbugs` always work, and `betterbugs alias install` adds `bb` as a shell alias instead.
43
+
44
+ ## Log in
45
+
46
+ ```bash
47
+ betterbugs auth login # opens BetterBugs in your browser; click "Activate"
48
+ betterbugs whoami
49
+ ```
50
+
51
+ For CI and other non-interactive use, create a token (`betterbugs create token`, or in the web app under
52
+ Settings → Access tokens) and pass it on **stdin**. Tokens are never accepted as command-line arguments.
53
+
54
+ ```bash
55
+ echo "$BETTERBUGS_TOKEN" | betterbugs auth login --token
56
+ ```
57
+
58
+ On a machine without a browser, `BETTERBUGS_NO_BROWSER=1 betterbugs auth login` prints the URL to open elsewhere.
59
+
60
+ Pin a workspace and project for a repository so you don't have to pass `--workspace` / `--project` every time:
61
+
62
+ ```bash
63
+ betterbugs init # writes ./.betterbugs.json
64
+ ```
65
+
66
+ ## What you can do
67
+
68
+ **Read bugs**
69
+
70
+ - `list bugs` with filters: `--status`, `--since`, `--assignee`, `--filter <saved filter>`, `--watch` for live updates
71
+ - `get bug <id>`, plus `get console`, `get network`, `get steps`, `get env`, `get comments`, `get screenshots`, `get video`, `get replay` and more
72
+ - `export bugs --format json` or `--format csv`
73
+
74
+ **Work on bugs**
75
+
76
+ - `comment <id> "text"`, with `--at <ms>` to point at a moment in the recording
77
+ - `update <id> --status resolved`, `--assignee`, `--priority`, tags
78
+ - `link bug`, `move bug`, `archive bug`, `share bug`
79
+ - `push <id> --to jira` (also Linear, GitHub, GitLab, Asana, ClickUp, Trello, Notion, Azure DevOps, Basecamp, Zoho,
80
+ ProofHub, Bugasura, Slack and Microsoft Teams)
81
+
82
+ **File bugs**
83
+
84
+ - `create bug --title … --attach file.har`, or from a JSON payload
85
+ - `create bug --from-playwright test-results/` files one report per failed Playwright test, with traces and screenshots
86
+ - `--dedupe-key` updates the same report on reruns instead of filing duplicates
87
+ - Console logs, network logs and text attachments are **redacted before upload**
88
+
89
+ **Debug and verify**
90
+
91
+ - `repro <id> --framework playwright` generates a reproduction test
92
+ - `comment <id> --from-test-result result.json` records that a fix was verified
93
+ - `debug <id>`, `ask <id> "…"` and `generate steps` use BetterBugs AI
94
+
95
+ **Manage**
96
+
97
+ Workspaces, projects, members, saved filters, recording links, integrations, webhooks, OAuth apps, access tokens and
98
+ billing. Run `betterbugs --help` or `betterbugs <command> --help` for everything.
99
+
100
+ ## For coding agents
101
+
102
+ `betterbugs pull <id>` writes the report to `.betterbugs/<id>/` as plain files an agent can read: a `README.md` to start
103
+ from, the bug, environment, console log, `network.har`, steps, comments and screenshots. Credentials are redacted by
104
+ default.
105
+
106
+ Install the bundled agent skills (debug a bug, file a report, prove a fix) for Claude Code, Cursor, Codex or OpenCode:
107
+
108
+ ```bash
109
+ betterbugs skills install # Claude Code
110
+ betterbugs skills install --target cursor,codex
111
+ ```
112
+
113
+ `betterbugs agent-context --json` describes every command, flag, value and output shape as JSON.
114
+
115
+ ## Scripting and CI
116
+
117
+ - Add `--json` for stable JSON output. It is the default for read commands when stdout isn't a terminal.
118
+ - Destructive commands ask for confirmation; pass `--yes` in scripts.
119
+ - Exit codes are stable: `0` ok, `1` error, `2` usage, `3` not logged in, `4` forbidden or missing scope,
120
+ `5` not found, `6` rate limited, `7` network, `8` plan limit, `9` validation, `10` partial, `11` not ready,
121
+ `13` missing dependency, `130` cancelled.
122
+
123
+ Guides:
124
+
125
+ - [CI recipes](https://github.com/betterbugs/cli/blob/main/docs/ci.md): GitHub Actions, GitLab CI and CircleCI
126
+ - [Git hooks](https://github.com/betterbugs/cli/blob/main/docs/hooks.md): check bug references in commit messages
127
+ - [Cookbook](https://github.com/betterbugs/cli/blob/main/docs/cookbook.md): automation built on `--json`
128
+
129
+ ## Shell completion
130
+
131
+ ```bash
132
+ echo 'eval "$(betterbugs completion zsh)"' >> ~/.zshrc # after compinit
133
+ echo 'eval "$(betterbugs completion bash)"' >> ~/.bashrc
134
+ betterbugs completion fish > ~/.config/fish/conf.d/betterbugs.fish
135
+ ```
136
+
137
+ PowerShell: add `betterbugs completion powershell | Out-String | Invoke-Expression` to your `$PROFILE`.
138
+
139
+ ## Configuration
140
+
141
+ - `betterbugs config set <key> <value>` for your user config, `--local` for `./.betterbugs.json`
142
+ - `--profile <name>` switches between saved logins (several accounts)
143
+ - `betterbugs config set credential-store keychain` keeps tokens in the OS keychain instead of a file
144
+ - `betterbugs doctor` checks your setup
145
+
146
+ ## Security
147
+
148
+ - Credentials are stored with owner-only permissions, or in the OS keychain if you opt in.
149
+ - Console logs, network logs and attachments are redacted before they are uploaded, printed or written to disk.
150
+ - Browser login uses PKCE and a callback bound to `127.0.0.1` only.
151
+ - Output to a terminal is stripped of escape sequences that bug data could carry.
152
+
153
+ ## Upgrade and uninstall
154
+
155
+ ```bash
156
+ betterbugs upgrade # npm install -g @betterbugs/cli@latest
157
+ betterbugs uninstall # removes saved logins and config, then the package
158
+ ```
159
+
160
+ ## License
161
+
162
+ MIT
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __bbCreateRequire } from 'node:module';
3
+ const require = __bbCreateRequire(import.meta.url);
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
11
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
12
+ }) : x)(function(x) {
13
+ if (typeof require !== "undefined") return require.apply(this, arguments);
14
+ throw Error('Dynamic require of "' + x + '" is not supported');
15
+ });
16
+ var __commonJS = (cb, mod) => function __require2() {
17
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
18
+ };
19
+ var __export = (target, all) => {
20
+ for (var name in all)
21
+ __defProp(target, name, { get: all[name], enumerable: true });
22
+ };
23
+ var __copyProps = (to, from, except, desc) => {
24
+ if (from && typeof from === "object" || typeof from === "function") {
25
+ for (let key of __getOwnPropNames(from))
26
+ if (!__hasOwnProp.call(to, key) && key !== except)
27
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
28
+ }
29
+ return to;
30
+ };
31
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
32
+ // If the importer is in node compatibility mode or this is not an ESM
33
+ // file that has been converted to a CommonJS file using a Babel-
34
+ // compatible transform (i.e. "__esModule" has not been set), then set
35
+ // "default" to the CommonJS "module.exports" for node compatibility.
36
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
37
+ mod
38
+ ));
39
+
40
+ export {
41
+ __require,
42
+ __commonJS,
43
+ __export,
44
+ __toESM
45
+ };