scanwarp 0.3.1 ā 0.3.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/README.md +171 -0
- package/dist/commands/init.js +24 -8
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# ScanWarp CLI
|
|
2
|
+
|
|
3
|
+
**Your AI writes your code. ScanWarp keeps it running.**
|
|
4
|
+
|
|
5
|
+
Production monitoring built for developers who ship fast with AI tools like Cursor and Claude Code. Auto-diagnoses issues and suggests fixes directly to your AI coding assistant.
|
|
6
|
+
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](https://www.npmjs.com/package/scanwarp)
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Monitor locally while you build
|
|
14
|
+
npx scanwarp dev
|
|
15
|
+
|
|
16
|
+
# Connect production app to ScanWarp
|
|
17
|
+
npx scanwarp init
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## What You Get
|
|
21
|
+
|
|
22
|
+
After running `scanwarp init`, you'll have:
|
|
23
|
+
|
|
24
|
+
### š **Web Dashboard**
|
|
25
|
+
Visit your server URL (e.g., `http://localhost:3000` or your hosted URL) to access:
|
|
26
|
+
|
|
27
|
+
- **Overview** - System health at a glance
|
|
28
|
+
- **Monitors** - Uptime and response time tracking
|
|
29
|
+
- **Events** - Real-time feed from your app, Stripe, GitHub, Vercel
|
|
30
|
+
- **Incidents** - Auto-detected issues with AI diagnosis
|
|
31
|
+
- **Traces** - OpenTelemetry request waterfalls with bottleneck highlighting
|
|
32
|
+
|
|
33
|
+
### š¤ **AI Diagnosis**
|
|
34
|
+
When something breaks, Claude AI analyzes the full context and tells you:
|
|
35
|
+
- Root cause in plain English
|
|
36
|
+
- Exact file and line that needs fixing
|
|
37
|
+
- Ready-to-execute fix prompt for your AI tool
|
|
38
|
+
|
|
39
|
+
### š **MCP Integration**
|
|
40
|
+
Your AI coding tool (Cursor, Claude Code) connects via MCP to:
|
|
41
|
+
- See what's broken
|
|
42
|
+
- Get fix suggestions
|
|
43
|
+
- Read trace details
|
|
44
|
+
- Resolve incidents
|
|
45
|
+
|
|
46
|
+
All without leaving your editor.
|
|
47
|
+
|
|
48
|
+
### š” **Request Tracing**
|
|
49
|
+
Zero-config OpenTelemetry instrumentation captures:
|
|
50
|
+
- HTTP requests
|
|
51
|
+
- Database queries
|
|
52
|
+
- External API calls
|
|
53
|
+
- Performance bottlenecks
|
|
54
|
+
|
|
55
|
+
Automatically installed with `scanwarp init` (or skip with `--skip-instrumentation`).
|
|
56
|
+
|
|
57
|
+
### š **Notifications**
|
|
58
|
+
Get alerts via:
|
|
59
|
+
- Discord webhooks
|
|
60
|
+
- Slack webhooks
|
|
61
|
+
- Email (coming soon)
|
|
62
|
+
|
|
63
|
+
## Commands
|
|
64
|
+
|
|
65
|
+
| Command | Description |
|
|
66
|
+
|---------|-------------|
|
|
67
|
+
| `scanwarp dev` | Run full monitoring flywheel locally while you build |
|
|
68
|
+
| `scanwarp init` | Connect production app to ScanWarp server |
|
|
69
|
+
| `scanwarp server` | Self-host the server with SQLite (zero deps) |
|
|
70
|
+
| `scanwarp status` | Check monitor health and active incidents |
|
|
71
|
+
| `scanwarp events` | Stream events (`--follow`, `--type`, `--source`) |
|
|
72
|
+
|
|
73
|
+
## What Gets Monitored
|
|
74
|
+
|
|
75
|
+
| Source | What it captures |
|
|
76
|
+
|--------|-----------------|
|
|
77
|
+
| **Health checks** | HTTP monitoring every 60s, response time |
|
|
78
|
+
| **Vercel** | Production errors via log drain |
|
|
79
|
+
| **Stripe** | Payment failures, subscription issues |
|
|
80
|
+
| **GitHub** | Failed CI, Dependabot alerts |
|
|
81
|
+
| **Supabase** | Database health, connection pool |
|
|
82
|
+
| **OpenTelemetry** | Request traces (HTTP, DB, Redis) |
|
|
83
|
+
| **Provider status** | Vercel, Stripe, GitHub, Cloudflare, Railway, AWS outages |
|
|
84
|
+
|
|
85
|
+
During `scanwarp dev`, also detects N+1 queries, slow queries, and schema drift.
|
|
86
|
+
|
|
87
|
+
## Deploy Your ScanWarp Server
|
|
88
|
+
|
|
89
|
+
You need a ScanWarp server to send data to. Choose one:
|
|
90
|
+
|
|
91
|
+
**Option 1: One-Click Deploy (60 seconds)**
|
|
92
|
+
|
|
93
|
+
[](https://railway.com/template/scanwarp?referralCode=scanwarp)
|
|
94
|
+
[](https://render.com/deploy?repo=https://github.com/scanwarp/scanwarp)
|
|
95
|
+
|
|
96
|
+
Then run: `npx scanwarp init --server https://your-server-url.up.railway.app`
|
|
97
|
+
|
|
98
|
+
**Option 2: Self-Host**
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# SQLite, zero dependencies
|
|
102
|
+
npx scanwarp server
|
|
103
|
+
|
|
104
|
+
# Or with Docker + Postgres
|
|
105
|
+
docker compose up -d
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Then run: `npx scanwarp init --server http://localhost:3000`
|
|
109
|
+
|
|
110
|
+
## Connect Your AI Tool
|
|
111
|
+
|
|
112
|
+
### Cursor
|
|
113
|
+
|
|
114
|
+
1. Open Cursor Settings ā Features ā MCP
|
|
115
|
+
2. Add ScanWarp MCP server:
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"mcpServers": {
|
|
119
|
+
"scanwarp": {
|
|
120
|
+
"command": "npx",
|
|
121
|
+
"args": ["-y", "scanwarp", "mcp", "--server", "YOUR_SERVER_URL"]
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
3. Restart Cursor
|
|
127
|
+
4. Ask: "What's broken in production?" or "Show me the slowest requests"
|
|
128
|
+
|
|
129
|
+
### Claude Code
|
|
130
|
+
|
|
131
|
+
Run `scanwarp init` and select "Yes" when asked about MCP configuration. It will auto-configure for you.
|
|
132
|
+
|
|
133
|
+
## Environment Variables
|
|
134
|
+
|
|
135
|
+
| Variable | Description |
|
|
136
|
+
|----------|-------------|
|
|
137
|
+
| `SCANWARP_SERVER_URL` | Your ScanWarp server URL |
|
|
138
|
+
| `SCANWARP_PROJECT_ID` | Project identifier (auto-saved after init) |
|
|
139
|
+
| `ANTHROPIC_API_KEY` | Required for AI diagnosis |
|
|
140
|
+
|
|
141
|
+
## Example Workflow
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# 1. Deploy ScanWarp server
|
|
145
|
+
# (Use Railway/Render button above)
|
|
146
|
+
|
|
147
|
+
# 2. Initialize monitoring in your app
|
|
148
|
+
cd my-nextjs-app
|
|
149
|
+
npx scanwarp init --server https://my-scanwarp.up.railway.app
|
|
150
|
+
|
|
151
|
+
# 3. Deploy your app
|
|
152
|
+
git push
|
|
153
|
+
|
|
154
|
+
# 4. Check the dashboard
|
|
155
|
+
# Visit https://my-scanwarp.up.railway.app
|
|
156
|
+
|
|
157
|
+
# 5. Ask your AI tool (via MCP)
|
|
158
|
+
# "What's broken in production?"
|
|
159
|
+
# "Show me the slowest API endpoints"
|
|
160
|
+
# "Get the fix prompt for incident #123"
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Learn More
|
|
164
|
+
|
|
165
|
+
- **Docs**: [GitHub Repository](https://github.com/scanwarp/scanwarp)
|
|
166
|
+
- **Website**: [scanwarp.com](https://scanwarp.com)
|
|
167
|
+
- **Discord**: [Join the community](https://discord.gg/K79UAMudM)
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
MIT
|
package/dist/commands/init.js
CHANGED
|
@@ -154,15 +154,31 @@ function printSummary(api, url, _detected) {
|
|
|
154
154
|
console.log(chalk_1.default.bold.green('\n⨠Setup Complete!\n'));
|
|
155
155
|
console.log(chalk_1.default.bold('Your monitoring is now active:'));
|
|
156
156
|
console.log(chalk_1.default.gray(` ⢠Monitoring: ${url}`));
|
|
157
|
-
console.log(chalk_1.default.gray(` ⢠Check interval: Every 60 seconds`));
|
|
158
|
-
|
|
157
|
+
console.log(chalk_1.default.gray(` ⢠Check interval: Every 60 seconds\n`));
|
|
158
|
+
// Dashboard - make it prominent
|
|
159
|
+
console.log(chalk_1.default.bold.cyan('š Dashboard:'));
|
|
160
|
+
console.log(chalk_1.default.white.bold(` ā ${api.serverUrl}\n`));
|
|
161
|
+
console.log(chalk_1.default.gray(' What you\'ll find:'));
|
|
162
|
+
console.log(chalk_1.default.gray(' ⢠Overview - System health at a glance'));
|
|
163
|
+
console.log(chalk_1.default.gray(' ⢠Monitors - Uptime and response times'));
|
|
164
|
+
console.log(chalk_1.default.gray(' ⢠Events - Real-time feed from your app'));
|
|
165
|
+
console.log(chalk_1.default.gray(' ⢠Incidents - Auto-detected issues with AI diagnosis'));
|
|
166
|
+
console.log(chalk_1.default.gray(' ⢠Traces - Request waterfalls with bottleneck highlighting\n'));
|
|
167
|
+
// MCP Integration
|
|
168
|
+
console.log(chalk_1.default.bold.cyan('š¤ Connect Your AI Tool:'));
|
|
169
|
+
console.log(chalk_1.default.gray(' Your AI can now see what\'s broken via MCP:'));
|
|
170
|
+
console.log(chalk_1.default.gray(' ⢠Ask: "What\'s broken in production?"'));
|
|
171
|
+
console.log(chalk_1.default.gray(' ⢠Ask: "Show me the slowest requests"'));
|
|
172
|
+
console.log(chalk_1.default.gray(' ⢠Ask: "Get the fix prompt for the latest incident"\n'));
|
|
159
173
|
console.log(chalk_1.default.bold('Next steps:'));
|
|
160
|
-
console.log(chalk_1.default.gray(' 1. Deploy your app to
|
|
161
|
-
console.log(chalk_1.default.gray(
|
|
162
|
-
console.log(chalk_1.default.gray(' 3. Check your notifications for
|
|
174
|
+
console.log(chalk_1.default.gray(' 1. Deploy your app to start monitoring'));
|
|
175
|
+
console.log(chalk_1.default.gray(` 2. Visit ${api.serverUrl} to see your dashboard`));
|
|
176
|
+
console.log(chalk_1.default.gray(' 3. Check your notifications for alerts\n'));
|
|
163
177
|
console.log(chalk_1.default.bold('Useful commands:'));
|
|
164
|
-
console.log(chalk_1.default.gray(' ⢠scanwarp status
|
|
165
|
-
console.log(chalk_1.default.gray(' ⢠scanwarp events
|
|
166
|
-
console.log(chalk_1.default.gray(' ⢠scanwarp
|
|
178
|
+
console.log(chalk_1.default.gray(' ⢠scanwarp status - Check monitoring status'));
|
|
179
|
+
console.log(chalk_1.default.gray(' ⢠scanwarp events - View recent events'));
|
|
180
|
+
console.log(chalk_1.default.gray(' ⢠scanwarp dev - Run full monitoring locally\n'));
|
|
167
181
|
console.log(chalk_1.default.cyan('Happy shipping! š\n'));
|
|
182
|
+
console.log(chalk_1.default.gray(`Learn more: ${chalk_1.default.white('https://github.com/scanwarp/scanwarp')}`));
|
|
183
|
+
console.log(chalk_1.default.gray(`Join Discord: ${chalk_1.default.white('https://discord.gg/K79UAMudM')}\n`));
|
|
168
184
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scanwarp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Production monitoring built for developers who ship fast. Auto-diagnoses issues with Claude AI.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"scanwarp": "./dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"dist"
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md"
|
|
11
12
|
],
|
|
12
13
|
"scripts": {
|
|
13
14
|
"build": "tsc",
|