forge-workflow 1.1.2 → 1.1.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.
Files changed (2) hide show
  1. package/bin/forge.js +54 -6
  2. package/package.json +1 -1
package/bin/forge.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * Forge v1.1.2 - Universal AI Agent Workflow
4
+ * Forge v1.1.3 - Universal AI Agent Workflow
5
5
  * https://github.com/harshanandak/forge
6
6
  *
7
7
  * Usage:
@@ -11,6 +11,7 @@
11
11
  * npx forge setup --agents claude,cursor,windsurf
12
12
  *
13
13
  * CLI Flags:
14
+ * --path, -p <dir> Target project directory (creates if needed)
14
15
  * --quick, -q Use all defaults, minimal prompts
15
16
  * --skip-external Skip external services configuration
16
17
  * --agents <list> Specify agents (--agents claude cursor OR --agents=claude,cursor)
@@ -19,6 +20,7 @@
19
20
  *
20
21
  * Examples:
21
22
  * npx forge setup --quick # All defaults, no prompts
23
+ * npx forge setup -p ./my-project # Setup in specific directory
22
24
  * npx forge setup --agents claude cursor # Just these agents
23
25
  * npx forge setup --skip-external # No service prompts
24
26
  * npx forge setup --agents claude --quick # Quick + specific agent
@@ -865,7 +867,7 @@ function showBanner(subtitle = 'Universal AI Agent Workflow') {
865
867
  console.log(' ██╔══╝ ██║ ██║██╔══██╗██║ ██║██╔══╝ ');
866
868
  console.log(' ██║ ╚██████╔╝██║ ██║╚██████╔╝███████╗');
867
869
  console.log(' ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝');
868
- console.log(' v1.1.2');
870
+ console.log(' v1.1.3');
869
871
  console.log('');
870
872
  if (subtitle) {
871
873
  console.log(` ${subtitle}`);
@@ -1303,7 +1305,7 @@ async function interactiveSetup() {
1303
1305
  // =============================================
1304
1306
  console.log('');
1305
1307
  console.log('==============================================');
1306
- console.log(' Forge v1.1.2 Setup Complete!');
1308
+ console.log(' Forge v1.1.3 Setup Complete!');
1307
1309
  console.log('==============================================');
1308
1310
  console.log('');
1309
1311
  console.log('What\'s installed:');
@@ -1347,7 +1349,8 @@ function parseFlags() {
1347
1349
  skipExternal: false,
1348
1350
  agents: null,
1349
1351
  all: false,
1350
- help: false
1352
+ help: false,
1353
+ path: null
1351
1354
  };
1352
1355
 
1353
1356
  for (let i = 0; i < args.length; i++) {
@@ -1361,6 +1364,15 @@ function parseFlags() {
1361
1364
  flags.all = true;
1362
1365
  } else if (arg === '--help' || arg === '-h') {
1363
1366
  flags.help = true;
1367
+ } else if (arg === '--path' || arg === '-p') {
1368
+ // --path <directory> or -p <directory>
1369
+ if (i + 1 < args.length && !args[i + 1].startsWith('-')) {
1370
+ flags.path = args[i + 1];
1371
+ i++; // Skip next arg
1372
+ }
1373
+ } else if (arg.startsWith('--path=')) {
1374
+ // --path=/some/dir format
1375
+ flags.path = arg.replace('--path=', '');
1364
1376
  } else if (arg === '--agents') {
1365
1377
  // --agents claude cursor format
1366
1378
  const agentList = [];
@@ -1403,6 +1415,8 @@ function showHelp() {
1403
1415
  console.log(' npx forge Minimal install (AGENTS.md + docs)');
1404
1416
  console.log('');
1405
1417
  console.log('Options:');
1418
+ console.log(' --path, -p <dir> Target project directory (default: current directory)');
1419
+ console.log(' Creates the directory if it doesn\'t exist');
1406
1420
  console.log(' --quick, -q Use all defaults, minimal prompts');
1407
1421
  console.log(' Auto-selects: all agents, GitHub Code Quality, ESLint');
1408
1422
  console.log(' --skip-external Skip external services configuration');
@@ -1421,6 +1435,8 @@ function showHelp() {
1421
1435
  console.log('Examples:');
1422
1436
  console.log(' npx forge setup # Interactive setup');
1423
1437
  console.log(' npx forge setup --quick # All defaults, no prompts');
1438
+ console.log(' npx forge setup -p ./my-project # Setup in specific directory');
1439
+ console.log(' npx forge setup --path=/home/user/app # Same, different syntax');
1424
1440
  console.log(' npx forge setup --agents claude cursor # Just these agents');
1425
1441
  console.log(' npx forge setup --agents=claude,cursor # Same, different syntax');
1426
1442
  console.log(' npx forge setup --skip-external # No service configuration');
@@ -1510,7 +1526,7 @@ async function quickSetup(selectedAgents, skipExternal) {
1510
1526
  // Final summary
1511
1527
  console.log('');
1512
1528
  console.log('==============================================');
1513
- console.log(' Forge v1.1.2 Quick Setup Complete!');
1529
+ console.log(' Forge v1.1.3 Quick Setup Complete!');
1514
1530
  console.log('==============================================');
1515
1531
  console.log('');
1516
1532
  console.log('Next steps:');
@@ -1733,7 +1749,7 @@ async function interactiveSetupWithFlags(flags) {
1733
1749
  // =============================================
1734
1750
  console.log('');
1735
1751
  console.log('==============================================');
1736
- console.log(' Forge v1.1.2 Setup Complete!');
1752
+ console.log(' Forge v1.1.3 Setup Complete!');
1737
1753
  console.log('==============================================');
1738
1754
  console.log('');
1739
1755
  console.log('What\'s installed:');
@@ -1781,6 +1797,38 @@ async function main() {
1781
1797
  return;
1782
1798
  }
1783
1799
 
1800
+ // Handle --path option: change to target directory
1801
+ if (flags.path) {
1802
+ const targetPath = path.resolve(flags.path);
1803
+
1804
+ // Create directory if it doesn't exist
1805
+ if (!fs.existsSync(targetPath)) {
1806
+ try {
1807
+ fs.mkdirSync(targetPath, { recursive: true });
1808
+ console.log(`Created directory: ${targetPath}`);
1809
+ } catch (err) {
1810
+ console.error(`Error creating directory: ${err.message}`);
1811
+ process.exit(1);
1812
+ }
1813
+ }
1814
+
1815
+ // Verify it's a directory
1816
+ if (!fs.statSync(targetPath).isDirectory()) {
1817
+ console.error(`Error: ${targetPath} is not a directory`);
1818
+ process.exit(1);
1819
+ }
1820
+
1821
+ // Change to target directory
1822
+ try {
1823
+ process.chdir(targetPath);
1824
+ console.log(`Working directory: ${targetPath}`);
1825
+ console.log('');
1826
+ } catch (err) {
1827
+ console.error(`Error changing to directory: ${err.message}`);
1828
+ process.exit(1);
1829
+ }
1830
+ }
1831
+
1784
1832
  if (command === 'setup') {
1785
1833
  // Determine agents to install
1786
1834
  let selectedAgents = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forge-workflow",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "9-stage TDD workflow for ALL AI coding agents (Claude, Cursor, Windsurf, Kilo, OpenCode, Copilot, Cline, Roo, Aider, Continue, Antigravity)",
5
5
  "bin": {
6
6
  "forge": "bin/forge.js"