@prads01/blackbox 0.1.0 → 0.1.1
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 +70 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,48 +1,90 @@
|
|
|
1
1
|
# BlackBox CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A CLI for real-time incident analysis, sandboxed fixes, and automated PR generation.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## What is BlackBox?
|
|
6
|
+
BlackBox is a local incident operations tool for engineering teams. It reads runtime evidence, identifies contradictions between expected and actual behavior, and produces structured analysis that can be verified in a safe sandbox. It is designed to shorten the path from detection to validated fix.
|
|
6
7
|
|
|
8
|
+
## Overview
|
|
9
|
+
- Analyze local web apps via `/api/analyze`
|
|
10
|
+
- Detect and track incidents
|
|
11
|
+
- Generate sandboxed fixes
|
|
12
|
+
- Verify fixes before applying
|
|
13
|
+
- Create GitHub PRs directly
|
|
14
|
+
- Full TUI + CLI support
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
- Detect runtime contradictions from logs
|
|
18
|
+
- AI-powered root cause analysis
|
|
19
|
+
- Sandbox fix verification (safe, isolated)
|
|
20
|
+
- One-click GitHub PR creation
|
|
21
|
+
- Interactive terminal UI (TUI)
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
7
24
|
```bash
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
25
|
+
npm install -g @prads01/blackbox
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
```bash
|
|
30
|
+
blackbox setup
|
|
31
|
+
blackbox
|
|
12
32
|
```
|
|
13
33
|
|
|
14
|
-
|
|
34
|
+
`blackbox setup` initializes and validates `.blackbox.yaml`.
|
|
35
|
+
`blackbox` launches the interactive TUI.
|
|
15
36
|
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
Run analysis:
|
|
16
40
|
```bash
|
|
17
|
-
blackbox
|
|
41
|
+
blackbox analyze
|
|
18
42
|
```
|
|
19
43
|
|
|
20
|
-
|
|
44
|
+
Watch logs:
|
|
45
|
+
```bash
|
|
46
|
+
blackbox watch
|
|
47
|
+
```
|
|
21
48
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- `blackbox analyze` - run one analysis against `/api/analyze`
|
|
27
|
-
- `blackbox watch` - monitor log file and re-run analysis on changes
|
|
28
|
-
- `blackbox status` - show config and API reachability
|
|
49
|
+
Open TUI:
|
|
50
|
+
```bash
|
|
51
|
+
blackbox
|
|
52
|
+
```
|
|
29
53
|
|
|
30
|
-
|
|
54
|
+
TUI navigation basics:
|
|
55
|
+
- Arrow keys to move
|
|
56
|
+
- Enter to open/execute
|
|
57
|
+
- Backspace to return from detail views
|
|
31
58
|
|
|
32
|
-
|
|
33
|
-
- `
|
|
34
|
-
- `i` incidents
|
|
35
|
-
- `
|
|
36
|
-
- `
|
|
37
|
-
- `
|
|
38
|
-
- `
|
|
39
|
-
- `q` quit
|
|
59
|
+
Key shortcuts:
|
|
60
|
+
- `a` → analyze
|
|
61
|
+
- `i` → incidents
|
|
62
|
+
- `s` → sandbox
|
|
63
|
+
- `x` → run fix
|
|
64
|
+
- `c` → create PR
|
|
65
|
+
- `q` → quit
|
|
40
66
|
|
|
41
|
-
##
|
|
67
|
+
## Workflow
|
|
68
|
+
1. BlackBox detects an incident.
|
|
69
|
+
2. AI analyzes likely root cause.
|
|
70
|
+
3. Sandbox verifies a fix safely.
|
|
71
|
+
4. User creates a GitHub PR.
|
|
72
|
+
5. Incident is marked resolved.
|
|
42
73
|
|
|
74
|
+
## Configuration
|
|
75
|
+
BlackBox uses `.blackbox.yaml` for local runtime configuration. Core fields:
|
|
76
|
+
- project name
|
|
77
|
+
- API base URL
|
|
78
|
+
- log path
|
|
79
|
+
|
|
80
|
+
## Development
|
|
43
81
|
```bash
|
|
82
|
+
git clone <repo>
|
|
44
83
|
cd cli
|
|
84
|
+
npm install
|
|
45
85
|
npm run build
|
|
46
|
-
npm
|
|
47
|
-
npm publish --access public
|
|
86
|
+
npm link
|
|
48
87
|
```
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
MIT
|