ultra-dex 1.7.2 → 1.7.3

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 CHANGED
@@ -105,6 +105,29 @@ Installs a pre-commit hook that:
105
105
 
106
106
  Remove with: `npx ultra-dex hooks --remove`
107
107
 
108
+ ### Fetch assets for offline use
109
+
110
+ ```bash
111
+ npx ultra-dex fetch
112
+ ```
113
+
114
+ Downloads all Ultra-Dex assets locally for offline development:
115
+ - Cursor rules (12 .mdc files)
116
+ - Agent prompts (16 agents)
117
+ - Documentation and guides
118
+
119
+ Options:
120
+ - `--dir <path>` - Target directory (default: `.ultra-dex`)
121
+ - `--agents` - Fetch only agent prompts
122
+ - `--rules` - Fetch only cursor rules
123
+ - `--docs` - Fetch only documentation
124
+
125
+ After fetching, copy to your project:
126
+ ```bash
127
+ cp -r .ultra-dex/cursor-rules .cursor/rules
128
+ cp -r .ultra-dex/agents .agents
129
+ ```
130
+
108
131
  ## Commands
109
132
 
110
133
  | Command | Description |
@@ -116,6 +139,7 @@ Remove with: `npx ultra-dex hooks --remove`
116
139
  | `ultra-dex agent <name>` | Show specific agent prompt |
117
140
  | `ultra-dex pack <agent>` | Package context + agent for any AI |
118
141
  | `ultra-dex hooks` | Set up git pre-commit hooks |
142
+ | `ultra-dex fetch` | Download assets for offline use |
119
143
  | `ultra-dex validate` | Validate project structure |
120
144
  | `ultra-dex workflow <feature>` | Show workflow for a feature |
121
145
  | `ultra-dex suggest` | Get AI agent suggestions |
package/bin/ultra-dex.js CHANGED
@@ -1288,4 +1288,190 @@ exit 0
1288
1288
  console.log(chalk.cyan(' npx ultra-dex hooks --remove\n'));
1289
1289
  });
1290
1290
 
1291
+ // ========================================
1292
+ // FETCH COMMAND - Offline Mode Support
1293
+ // ========================================
1294
+ program
1295
+ .command('fetch')
1296
+ .description('Download all Ultra-Dex assets for offline use')
1297
+ .option('-d, --dir <directory>', 'Target directory', '.ultra-dex')
1298
+ .option('--agents', 'Fetch only agent prompts')
1299
+ .option('--rules', 'Fetch only cursor rules')
1300
+ .option('--docs', 'Fetch only documentation')
1301
+ .action(async (options) => {
1302
+ console.log(chalk.cyan('\nšŸ“¦ Ultra-Dex Asset Fetcher\n'));
1303
+
1304
+ const targetDir = path.resolve(options.dir);
1305
+ const fetchAll = !options.agents && !options.rules && !options.docs;
1306
+
1307
+ // GitHub raw URLs
1308
+ const GITHUB_RAW = 'https://raw.githubusercontent.com/Srujan0798/Ultra-Dex/main';
1309
+
1310
+ // Helper to download a file
1311
+ async function downloadFile(url, destPath) {
1312
+ try {
1313
+ const response = await fetch(url);
1314
+ if (!response.ok) throw new Error(`HTTP ${response.status}`);
1315
+ const content = await response.text();
1316
+ await fs.mkdir(path.dirname(destPath), { recursive: true });
1317
+ await fs.writeFile(destPath, content);
1318
+ return true;
1319
+ } catch (err) {
1320
+ return false;
1321
+ }
1322
+ }
1323
+
1324
+ const spinner = ora('Preparing to fetch assets...').start();
1325
+
1326
+ // Create target directory
1327
+ await fs.mkdir(targetDir, { recursive: true });
1328
+
1329
+ let downloaded = 0;
1330
+ let failed = 0;
1331
+
1332
+ // Fetch cursor rules
1333
+ if (fetchAll || options.rules) {
1334
+ spinner.text = 'Fetching cursor rules...';
1335
+ const rulesDir = path.join(targetDir, 'cursor-rules');
1336
+ await fs.mkdir(rulesDir, { recursive: true });
1337
+
1338
+ const ruleFiles = [
1339
+ '00-ultra-dex-core.mdc',
1340
+ '01-database.mdc',
1341
+ '02-api.mdc',
1342
+ '03-auth.mdc',
1343
+ '04-frontend.mdc',
1344
+ '05-payments.mdc',
1345
+ '06-testing.mdc',
1346
+ '07-security.mdc',
1347
+ '08-deployment.mdc',
1348
+ '09-error-handling.mdc',
1349
+ '10-performance.mdc',
1350
+ '11-nextjs-v15.mdc',
1351
+ '12-multi-tenancy.mdc',
1352
+ ];
1353
+
1354
+ for (const file of ruleFiles) {
1355
+ const url = `${GITHUB_RAW}/cursor-rules/${file}`;
1356
+ const dest = path.join(rulesDir, file);
1357
+ if (await downloadFile(url, dest)) {
1358
+ downloaded++;
1359
+ } else {
1360
+ failed++;
1361
+ }
1362
+ }
1363
+
1364
+ // Also fetch load.sh
1365
+ await downloadFile(`${GITHUB_RAW}/cursor-rules/load.sh`, path.join(rulesDir, 'load.sh'));
1366
+ try {
1367
+ await fs.chmod(path.join(rulesDir, 'load.sh'), '755');
1368
+ } catch {}
1369
+ }
1370
+
1371
+ // Fetch agent prompts
1372
+ if (fetchAll || options.agents) {
1373
+ spinner.text = 'Fetching agent prompts...';
1374
+ const agentsDir = path.join(targetDir, 'agents');
1375
+
1376
+ const agentPaths = [
1377
+ '00-AGENT_INDEX.md',
1378
+ 'README.md',
1379
+ 'AGENT-INSTRUCTIONS.md',
1380
+ '0-orchestration/orchestrator.md',
1381
+ '1-leadership/cto.md',
1382
+ '1-leadership/planner.md',
1383
+ '1-leadership/research.md',
1384
+ '2-development/backend.md',
1385
+ '2-development/frontend.md',
1386
+ '2-development/database.md',
1387
+ '3-security/security.md',
1388
+ '4-devops/devops.md',
1389
+ '5-quality/reviewer.md',
1390
+ '5-quality/testing.md',
1391
+ '5-quality/debugger.md',
1392
+ '6-specialist/performance.md',
1393
+ '6-specialist/refactoring.md',
1394
+ '6-specialist/documentation.md',
1395
+ ];
1396
+
1397
+ for (const agentPath of agentPaths) {
1398
+ const url = `${GITHUB_RAW}/agents/${agentPath}`;
1399
+ const dest = path.join(agentsDir, agentPath);
1400
+ if (await downloadFile(url, dest)) {
1401
+ downloaded++;
1402
+ } else {
1403
+ failed++;
1404
+ }
1405
+ }
1406
+ }
1407
+
1408
+ // Fetch documentation
1409
+ if (fetchAll || options.docs) {
1410
+ spinner.text = 'Fetching documentation...';
1411
+ const docsDir = path.join(targetDir, 'docs');
1412
+
1413
+ const docFiles = [
1414
+ 'VERIFICATION.md',
1415
+ 'BUILD-AUTH-30M.md',
1416
+ 'QUICK-REFERENCE.md',
1417
+ 'TROUBLESHOOTING.md',
1418
+ ];
1419
+
1420
+ for (const file of docFiles) {
1421
+ const url = `${GITHUB_RAW}/docs/${file}`;
1422
+ const dest = path.join(docsDir, file);
1423
+ if (await downloadFile(url, dest)) {
1424
+ downloaded++;
1425
+ } else {
1426
+ failed++;
1427
+ }
1428
+ }
1429
+
1430
+ // Fetch guides
1431
+ const guidesDir = path.join(targetDir, 'guides');
1432
+ const guideFiles = [
1433
+ 'PROJECT-ORCHESTRATION.md',
1434
+ 'ADVANCED-WORKFLOWS.md',
1435
+ 'DATABASE-DECISION-FRAMEWORK.md',
1436
+ 'ARCHITECTURE-PATTERNS.md',
1437
+ ];
1438
+
1439
+ for (const file of guideFiles) {
1440
+ const url = `${GITHUB_RAW}/guides/${file}`;
1441
+ const dest = path.join(guidesDir, file);
1442
+ if (await downloadFile(url, dest)) {
1443
+ downloaded++;
1444
+ } else {
1445
+ failed++;
1446
+ }
1447
+ }
1448
+ }
1449
+
1450
+ if (failed === 0) {
1451
+ spinner.succeed(chalk.green(`Downloaded ${downloaded} files to ${targetDir}`));
1452
+ } else {
1453
+ spinner.warn(chalk.yellow(`Downloaded ${downloaded} files, ${failed} failed`));
1454
+ }
1455
+
1456
+ console.log(chalk.bold('\nšŸ“ Assets downloaded to:\n'));
1457
+ if (fetchAll || options.rules) {
1458
+ console.log(chalk.gray(` ${targetDir}/cursor-rules/ (12 .mdc files)`));
1459
+ }
1460
+ if (fetchAll || options.agents) {
1461
+ console.log(chalk.gray(` ${targetDir}/agents/ (16 agent prompts)`));
1462
+ }
1463
+ if (fetchAll || options.docs) {
1464
+ console.log(chalk.gray(` ${targetDir}/docs/ (documentation)`));
1465
+ console.log(chalk.gray(` ${targetDir}/guides/ (guides)`));
1466
+ }
1467
+
1468
+ console.log(chalk.bold('\nšŸ’” Usage:\n'));
1469
+ console.log(chalk.cyan(' # Copy cursor rules to project'));
1470
+ console.log(chalk.gray(` cp -r ${targetDir}/cursor-rules .cursor/rules`));
1471
+ console.log(chalk.cyan('\n # Copy agents to project'));
1472
+ console.log(chalk.gray(` cp -r ${targetDir}/agents .agents`));
1473
+ console.log(chalk.cyan('\n # Works offline now!'));
1474
+ console.log(chalk.gray(' No GitHub access needed after fetch.\n'));
1475
+ });
1476
+
1291
1477
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultra-dex",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "CLI for Ultra-Dex SaaS Implementation Framework with 16 Production Agents",
5
5
  "keywords": [
6
6
  "saas",