rapidkit 0.18.1 → 0.19.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 +133 -0
- package/dist/index.js +228 -130
- package/dist/package.json +2 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1136,6 +1136,7 @@ This npm package is a **bridge/wrapper** that:
|
|
|
1136
1136
|
- Forwards global/core commands (e.g. `list`, `info`, `create`, `add`, `doctor`, `--tui`, `--json`) to `python -m rapidkit ...`.
|
|
1137
1137
|
- If `rapidkit-core` is not available in your system Python, it can bootstrap a cached virtualenv and install Core there.
|
|
1138
1138
|
|
|
1139
|
+
**🤖 NEW:** [AI-powered module recommendations](#-ai-features) to help you build faster!
|
|
1139
1140
|
**💡 Tip:** Use the [RapidKit VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) for a visual interface!
|
|
1140
1141
|
|
|
1141
1142
|
## Quick Start
|
|
@@ -1401,6 +1402,128 @@ Projects are automatically registered when created via:
|
|
|
1401
1402
|
- `rapidkit create project ...` (inside a workspace)
|
|
1402
1403
|
- VS Code Extension "Create Project" command
|
|
1403
1404
|
|
|
1405
|
+
## 🤖 AI Features
|
|
1406
|
+
|
|
1407
|
+
RapidKit now includes AI-powered module recommendations using OpenAI embeddings!
|
|
1408
|
+
|
|
1409
|
+
### Quick Start with AI
|
|
1410
|
+
|
|
1411
|
+
**First time setup** (automatic):
|
|
1412
|
+
```bash
|
|
1413
|
+
# Just use AI recommendations - it will guide you through setup!
|
|
1414
|
+
npx rapidkit ai recommend "user authentication with social login"
|
|
1415
|
+
|
|
1416
|
+
# If embeddings don't exist, you'll see:
|
|
1417
|
+
# ⚠️ Module embeddings not found
|
|
1418
|
+
# ? What would you like to do?
|
|
1419
|
+
# 🚀 Generate embeddings now (requires OpenAI API key)
|
|
1420
|
+
# 📝 Show me how to generate them manually
|
|
1421
|
+
# ❌ Cancel
|
|
1422
|
+
```
|
|
1423
|
+
|
|
1424
|
+
**Example Usage:**
|
|
1425
|
+
```bash
|
|
1426
|
+
# Get intelligent module recommendations
|
|
1427
|
+
npx rapidkit ai recommend "I need user authentication with email"
|
|
1428
|
+
|
|
1429
|
+
# Output:
|
|
1430
|
+
# 📦 Recommended Modules:
|
|
1431
|
+
# 1. Authentication Core
|
|
1432
|
+
# Complete authentication with JWT, OAuth 2.0, secure sessions
|
|
1433
|
+
# Match: 92.5% - Matches: auth, login, email
|
|
1434
|
+
# Category: auth
|
|
1435
|
+
#
|
|
1436
|
+
# 2. Users Core
|
|
1437
|
+
# User management with profiles, roles, permissions
|
|
1438
|
+
# Match: 88.3% - Matches: user
|
|
1439
|
+
# Category: auth
|
|
1440
|
+
# Requires: authentication-core
|
|
1441
|
+
```
|
|
1442
|
+
|
|
1443
|
+
### AI Commands
|
|
1444
|
+
|
|
1445
|
+
```bash
|
|
1446
|
+
# Get recommendations
|
|
1447
|
+
npx rapidkit ai recommend "payment processing with Stripe"
|
|
1448
|
+
npx rapidkit ai recommend "real-time notifications" --number 3
|
|
1449
|
+
|
|
1450
|
+
# Setup and management
|
|
1451
|
+
npx rapidkit config set-api-key # Configure OpenAI API key
|
|
1452
|
+
npx rapidkit ai generate-embeddings # Manual embedding generation
|
|
1453
|
+
npx rapidkit ai generate-embeddings --force # Force regeneration
|
|
1454
|
+
npx rapidkit ai update-embeddings # Update with latest modules
|
|
1455
|
+
npx rapidkit ai info # Show features & pricing
|
|
1456
|
+
```
|
|
1457
|
+
|
|
1458
|
+
### Features
|
|
1459
|
+
|
|
1460
|
+
- 🧠 **Semantic Search**: AI understands intent, not just keywords
|
|
1461
|
+
- 🤖 **Auto-Setup**: Embeddings generate automatically on first use
|
|
1462
|
+
- 📦 **27+ Modules**: Production-ready modules from RapidKit Python Core
|
|
1463
|
+
- 💰 **Ultra-Cheap**: ~$0.0002 per query (practically free)
|
|
1464
|
+
- 🎯 **Dependency Detection**: Automatically shows required modules
|
|
1465
|
+
- ✅ **Mock Mode**: Test without API key using deterministic embeddings
|
|
1466
|
+
- 🔄 **Dynamic Catalog**: Fetches latest modules from Python Core
|
|
1467
|
+
|
|
1468
|
+
### Pricing
|
|
1469
|
+
|
|
1470
|
+
**One-time Setup:**
|
|
1471
|
+
- Generate embeddings: ~$0.50 (one time only)
|
|
1472
|
+
|
|
1473
|
+
**Per Query:**
|
|
1474
|
+
- Single query: ~$0.0002
|
|
1475
|
+
- 100 queries: ~$0.02 (2 cents)
|
|
1476
|
+
- 1,000 queries: ~$0.20 (20 cents)
|
|
1477
|
+
|
|
1478
|
+
💡 **Tip:** Setup cost is paid once, then queries are essentially free!
|
|
1479
|
+
|
|
1480
|
+
### Available Module Categories
|
|
1481
|
+
|
|
1482
|
+
- 🔐 **Auth**: authentication-core, users-core, session-management, 2fa
|
|
1483
|
+
- 💾 **Database**: db-postgres, db-mongodb, db-mysql
|
|
1484
|
+
- 💳 **Payment**: stripe-payment, payment-core
|
|
1485
|
+
- 📧 **Communication**: email, sms, notifications
|
|
1486
|
+
- 🚀 **Infrastructure**: redis-cache, celery, storage, rate-limiter
|
|
1487
|
+
- 📊 **Monitoring**: logging, analytics, error-tracking
|
|
1488
|
+
- 🔌 **Integrations**: webhooks, api-gateway, graphql
|
|
1489
|
+
|
|
1490
|
+
### Troubleshooting
|
|
1491
|
+
|
|
1492
|
+
**No OpenAI API Key?**
|
|
1493
|
+
```bash
|
|
1494
|
+
# AI works in mock mode without API key (for testing)
|
|
1495
|
+
npx rapidkit ai recommend "auth" # Works without key!
|
|
1496
|
+
|
|
1497
|
+
# For production, get a key:
|
|
1498
|
+
# 1. Visit: https://platform.openai.com/api-keys
|
|
1499
|
+
# 2. Create new key
|
|
1500
|
+
# 3. Configure: npx rapidkit config set-api-key
|
|
1501
|
+
```
|
|
1502
|
+
|
|
1503
|
+
**Embeddings Not Found?**
|
|
1504
|
+
```bash
|
|
1505
|
+
# Just run any AI command - it will prompt you to generate them
|
|
1506
|
+
npx rapidkit ai recommend "database"
|
|
1507
|
+
|
|
1508
|
+
# Or generate manually:
|
|
1509
|
+
npx rapidkit ai generate-embeddings
|
|
1510
|
+
```
|
|
1511
|
+
|
|
1512
|
+
**Update Embeddings After RapidKit Python Update?**
|
|
1513
|
+
```bash
|
|
1514
|
+
npx rapidkit ai update-embeddings
|
|
1515
|
+
```
|
|
1516
|
+
|
|
1517
|
+
**See Current Config:**
|
|
1518
|
+
```bash
|
|
1519
|
+
npx rapidkit config show
|
|
1520
|
+
```
|
|
1521
|
+
|
|
1522
|
+
### Learn More
|
|
1523
|
+
|
|
1524
|
+
- 📚 **Full Guide**: [docs/AI_FEATURES.md](docs/AI_FEATURES.md)
|
|
1525
|
+
- 🔧 **Technical Details**: [docs/AI_DYNAMIC_INTEGRATION.md](docs/AI_DYNAMIC_INTEGRATION.md)
|
|
1526
|
+
|
|
1404
1527
|
## CLI Options
|
|
1405
1528
|
|
|
1406
1529
|
```bash
|
|
@@ -1440,6 +1563,16 @@ npx rapidkit build # Build for production
|
|
|
1440
1563
|
npx rapidkit test # Run tests
|
|
1441
1564
|
npx rapidkit lint # Lint code
|
|
1442
1565
|
npx rapidkit format # Format code
|
|
1566
|
+
|
|
1567
|
+
# AI Commands (new!)
|
|
1568
|
+
npx rapidkit ai recommend "query" # Get module recommendations
|
|
1569
|
+
npx rapidkit ai recommend "auth" --number 3 # Get top 3 results
|
|
1570
|
+
npx rapidkit ai generate-embeddings # Generate embeddings (one-time)
|
|
1571
|
+
npx rapidkit ai update-embeddings # Update embeddings
|
|
1572
|
+
npx rapidkit ai info # Show AI features info
|
|
1573
|
+
npx rapidkit config set-api-key # Configure OpenAI API key
|
|
1574
|
+
npx rapidkit config show # View current config
|
|
1575
|
+
|
|
1443
1576
|
npx rapidkit --help # Show all commands
|
|
1444
1577
|
```
|
|
1445
1578
|
|