@openqa/cli 2.0.0 → 2.1.0
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 +202 -5
- package/dist/cli/daemon.js +1459 -221
- package/dist/cli/dashboard.html.js +3 -0
- package/dist/cli/env-config.js +391 -0
- package/dist/cli/env-routes.js +820 -0
- package/dist/cli/env.html.js +679 -0
- package/dist/cli/index.js +4537 -2323
- package/dist/cli/server.js +2168 -12
- package/install.sh +19 -10
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -50,12 +50,30 @@ OpenQA is a **truly autonomous** QA testing agent that thinks, codes, and execut
|
|
|
50
50
|
|
|
51
51
|
## 🚀 Quick Start
|
|
52
52
|
|
|
53
|
-
###
|
|
53
|
+
### Development (Local)
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
+
# One-line installation
|
|
56
57
|
curl -fsSL https://openqa.orkajs.com/install.sh | bash
|
|
58
|
+
|
|
59
|
+
# Or via npm
|
|
60
|
+
npx @openqa/cli start
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Production Deployment
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Interactive production installer
|
|
67
|
+
curl -fsSL https://openqa.orkajs.com/install-production.sh | bash
|
|
57
68
|
```
|
|
58
69
|
|
|
70
|
+
**Supports:**
|
|
71
|
+
- 🐳 **Docker** (recommended)
|
|
72
|
+
- 🖥️ **VPS/Bare Metal** (Ubuntu/Debian with systemd)
|
|
73
|
+
- ☁️ **Cloud Platforms** (Railway, Render, Fly.io)
|
|
74
|
+
|
|
75
|
+
📖 **[Full Deployment Guide](./DEPLOYMENT.md)** - Complete production setup instructions
|
|
76
|
+
|
|
59
77
|
### Configure Your SaaS (3 lines!)
|
|
60
78
|
|
|
61
79
|
```bash
|
|
@@ -105,9 +123,68 @@ openqa start --daemon
|
|
|
105
123
|
|
|
106
124
|
Once started, open your browser:
|
|
107
125
|
|
|
108
|
-
- **
|
|
109
|
-
- **Kanban**: http://localhost:
|
|
110
|
-
- **Config**: http://localhost:
|
|
126
|
+
- **Dashboard**: http://localhost:4242 - Main dashboard with real-time monitoring
|
|
127
|
+
- **Kanban**: http://localhost:4242/kanban - View and manage QA tickets
|
|
128
|
+
- **Config**: http://localhost:4242/config - Configure OpenQA settings
|
|
129
|
+
|
|
130
|
+
### 🔐 Dashboard Authentication
|
|
131
|
+
|
|
132
|
+
OpenQA includes a secure authentication system to protect your dashboard:
|
|
133
|
+
|
|
134
|
+
#### First-Time Setup
|
|
135
|
+
|
|
136
|
+
On first launch, you'll be redirected to `/setup` to create an admin account:
|
|
137
|
+
|
|
138
|
+
1. Visit http://localhost:4242
|
|
139
|
+
2. Create your admin username and password (min 8 characters)
|
|
140
|
+
3. You'll be automatically logged in
|
|
141
|
+
|
|
142
|
+
#### Login
|
|
143
|
+
|
|
144
|
+
After setup, access the dashboard at http://localhost:4242/login with your credentials.
|
|
145
|
+
|
|
146
|
+
#### User Management (Admin Only)
|
|
147
|
+
|
|
148
|
+
Admins can manage users via the API:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# List all users
|
|
152
|
+
curl http://localhost:4242/api/accounts \
|
|
153
|
+
-H "Authorization: Bearer YOUR_TOKEN"
|
|
154
|
+
|
|
155
|
+
# Create a viewer account
|
|
156
|
+
curl -X POST http://localhost:4242/api/accounts \
|
|
157
|
+
-H "Authorization: Bearer YOUR_TOKEN" \
|
|
158
|
+
-H "Content-Type: application/json" \
|
|
159
|
+
-d '{"username": "viewer1", "password": "securepass123", "role": "viewer"}'
|
|
160
|
+
|
|
161
|
+
# Change password
|
|
162
|
+
curl -X POST http://localhost:4242/api/auth/change-password \
|
|
163
|
+
-H "Authorization: Bearer YOUR_TOKEN" \
|
|
164
|
+
-H "Content-Type: application/json" \
|
|
165
|
+
-d '{"currentPassword": "old", "newPassword": "newsecure123"}'
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Roles:**
|
|
169
|
+
- **admin** - Full access (manage users, configure, run tests)
|
|
170
|
+
- **viewer** - Read-only access (view tests, bugs, sessions)
|
|
171
|
+
|
|
172
|
+
**Security Features:**
|
|
173
|
+
- JWT-based authentication with httpOnly cookies
|
|
174
|
+
- Scrypt password hashing
|
|
175
|
+
- Rate limiting on auth endpoints
|
|
176
|
+
- CSRF protection via SameSite cookies
|
|
177
|
+
|
|
178
|
+
#### Disable Authentication (Development Only)
|
|
179
|
+
|
|
180
|
+
For local development, you can disable authentication:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
export OPENQA_AUTH_DISABLED=true
|
|
184
|
+
openqa start
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
⚠️ **Never disable authentication in production!**
|
|
111
188
|
|
|
112
189
|
### CLI Commands
|
|
113
190
|
|
|
@@ -330,7 +407,127 @@ curl -X POST http://localhost:3000/api/brain/analyze
|
|
|
330
407
|
# }
|
|
331
408
|
```
|
|
332
409
|
|
|
333
|
-
|
|
410
|
+
## 🚀 Production Deployment
|
|
411
|
+
|
|
412
|
+
### Quick Deploy (5 minutes)
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
# Interactive installer - Choose Docker, VPS, or Cloud
|
|
416
|
+
curl -fsSL https://openqa.orkajs.com/install-production.sh | bash
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### Deployment Options
|
|
420
|
+
|
|
421
|
+
| Method | Time | Difficulty | Best For |
|
|
422
|
+
|--------|------|------------|----------|
|
|
423
|
+
| 🐳 **Docker** | 5 min | Easy | VPS, Local servers |
|
|
424
|
+
| 🖥️ **VPS/Systemd** | 15 min | Medium | Full control |
|
|
425
|
+
| ☁️ **Railway** | 3 min | Easiest | Quick deploy |
|
|
426
|
+
| 🎨 **Render** | 2 min | Easiest | Free tier |
|
|
427
|
+
| 🪰 **Fly.io** | 5 min | Easy | Global edge |
|
|
428
|
+
|
|
429
|
+
### Docker (Recommended)
|
|
430
|
+
|
|
431
|
+
```bash
|
|
432
|
+
# 1. Clone and configure
|
|
433
|
+
git clone https://github.com/Orka-Community/OpenQA.git
|
|
434
|
+
cd OpenQA
|
|
435
|
+
cp .env.production .env
|
|
436
|
+
|
|
437
|
+
# 2. Edit .env - Add your API keys
|
|
438
|
+
nano .env
|
|
439
|
+
# Required: OPENAI_API_KEY, OPENQA_JWT_SECRET, SAAS_URL
|
|
440
|
+
|
|
441
|
+
# 3. Start with Docker Compose
|
|
442
|
+
docker-compose -f docker-compose.production.yml up -d
|
|
443
|
+
|
|
444
|
+
# 4. Access at http://localhost:4242
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
**With HTTPS (Nginx):**
|
|
448
|
+
```bash
|
|
449
|
+
# Update nginx.conf with your domain
|
|
450
|
+
nano nginx.conf
|
|
451
|
+
|
|
452
|
+
# Get SSL certificate
|
|
453
|
+
sudo certbot certonly --standalone -d your-domain.com
|
|
454
|
+
|
|
455
|
+
# Start with Nginx
|
|
456
|
+
docker-compose -f docker-compose.production.yml --profile with-nginx up -d
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### Cloud Platforms
|
|
460
|
+
|
|
461
|
+
**Railway:**
|
|
462
|
+
```bash
|
|
463
|
+
railway init && railway up
|
|
464
|
+
# Set env vars in dashboard: OPENAI_API_KEY, OPENQA_JWT_SECRET, SAAS_URL
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
**Render:**
|
|
468
|
+
- Fork repo → Connect to Render → Auto-deploys with `render.yaml`
|
|
469
|
+
|
|
470
|
+
**Fly.io:**
|
|
471
|
+
```bash
|
|
472
|
+
flyctl launch
|
|
473
|
+
flyctl secrets set OPENAI_API_KEY=sk-xxx OPENQA_JWT_SECRET=$(openssl rand -hex 32)
|
|
474
|
+
flyctl deploy
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
### VPS/Bare Metal
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
# Automated installer
|
|
481
|
+
curl -fsSL https://openqa.orkajs.com/install-production.sh | bash
|
|
482
|
+
# Choose option 2 (VPS/Bare Metal)
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
**Manual installation:**
|
|
486
|
+
```bash
|
|
487
|
+
# Install Node.js 20
|
|
488
|
+
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
|
|
489
|
+
sudo apt install -y nodejs build-essential git
|
|
490
|
+
|
|
491
|
+
# Install OpenQA
|
|
492
|
+
sudo useradd -r -m openqa
|
|
493
|
+
sudo -u openqa git clone https://github.com/Orka-Community/OpenQA.git /opt/openqa
|
|
494
|
+
cd /opt/openqa
|
|
495
|
+
sudo -u openqa npm ci --only=production
|
|
496
|
+
sudo -u openqa npm run build
|
|
497
|
+
|
|
498
|
+
# Configure
|
|
499
|
+
sudo -u openqa cp .env.production .env
|
|
500
|
+
sudo nano /opt/openqa/.env
|
|
501
|
+
|
|
502
|
+
# Install systemd service
|
|
503
|
+
sudo cp openqa.service /etc/systemd/system/
|
|
504
|
+
sudo systemctl enable openqa
|
|
505
|
+
sudo systemctl start openqa
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
### 🔒 Security Checklist
|
|
509
|
+
|
|
510
|
+
Before going live:
|
|
511
|
+
|
|
512
|
+
- [ ] Set strong `OPENQA_JWT_SECRET` (generate: `openssl rand -hex 32`)
|
|
513
|
+
- [ ] Use strong admin password (min 12 chars)
|
|
514
|
+
- [ ] Enable HTTPS (SSL certificate)
|
|
515
|
+
- [ ] Never set `OPENQA_AUTH_DISABLED=true` in production
|
|
516
|
+
- [ ] Set `NODE_ENV=production`
|
|
517
|
+
- [ ] Restrict CORS origins
|
|
518
|
+
- [ ] Enable firewall (ports 80, 443 only)
|
|
519
|
+
- [ ] Setup automated backups
|
|
520
|
+
|
|
521
|
+
### 📚 Deployment Documentation
|
|
522
|
+
|
|
523
|
+
- **[DEPLOYMENT.md](./DEPLOYMENT.md)** - Complete deployment guide
|
|
524
|
+
- **[QUICKSTART-PRODUCTION.md](./QUICKSTART-PRODUCTION.md)** - 5-minute quick start
|
|
525
|
+
- **[Docker Compose](./docker-compose.production.yml)** - Production configuration
|
|
526
|
+
- **[Systemd Service](./openqa.service)** - Service configuration
|
|
527
|
+
|
|
528
|
+
### Development Deployment
|
|
529
|
+
|
|
530
|
+
For local development only:
|
|
334
531
|
|
|
335
532
|
```bash
|
|
336
533
|
docker-compose up -d
|