forge-workflow 1.1.1 → 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.
- package/.claude/settings.local.json +5 -1
- package/bin/forge.js +74 -12
- package/package.json +2 -2
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
"Bash(cmd /c \"npm publish --access public\")",
|
|
9
9
|
"Bash(where npm)",
|
|
10
10
|
"Bash(\"C:\\\\Program Files\\\\nodejs\\\\npm.cmd\" publish --access public)",
|
|
11
|
-
"Bash(\"C:\\\\Program Files\\\\nodejs\\\\npm.cmd\" version patch --no-git-tag-version)"
|
|
11
|
+
"Bash(\"C:\\\\Program Files\\\\nodejs\\\\npm.cmd\" version patch --no-git-tag-version)",
|
|
12
|
+
"Bash(git add:*)",
|
|
13
|
+
"Bash(git commit:*)",
|
|
14
|
+
"Bash(git push)",
|
|
15
|
+
"Bash(\"C:\\\\Program Files\\\\nodejs\\\\npm.cmd\" pkg fix)"
|
|
12
16
|
]
|
|
13
17
|
}
|
|
14
18
|
}
|
package/bin/forge.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Forge v1.1.
|
|
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.
|
|
870
|
+
console.log(' v1.1.3');
|
|
869
871
|
console.log('');
|
|
870
872
|
if (subtitle) {
|
|
871
873
|
console.log(` ${subtitle}`);
|
|
@@ -1103,10 +1105,14 @@ async function interactiveSetup() {
|
|
|
1103
1105
|
output: process.stdout
|
|
1104
1106
|
});
|
|
1105
1107
|
|
|
1108
|
+
let setupCompleted = false;
|
|
1109
|
+
|
|
1106
1110
|
// Handle Ctrl+C gracefully
|
|
1107
1111
|
rl.on('close', () => {
|
|
1108
|
-
|
|
1109
|
-
|
|
1112
|
+
if (!setupCompleted) {
|
|
1113
|
+
console.log('\n\nSetup cancelled.');
|
|
1114
|
+
process.exit(0);
|
|
1115
|
+
}
|
|
1110
1116
|
});
|
|
1111
1117
|
|
|
1112
1118
|
// Handle input errors
|
|
@@ -1291,6 +1297,7 @@ async function interactiveSetup() {
|
|
|
1291
1297
|
|
|
1292
1298
|
await configureExternalServices(rl, question, selectedAgents, projectStatus);
|
|
1293
1299
|
|
|
1300
|
+
setupCompleted = true;
|
|
1294
1301
|
rl.close();
|
|
1295
1302
|
|
|
1296
1303
|
// =============================================
|
|
@@ -1298,7 +1305,7 @@ async function interactiveSetup() {
|
|
|
1298
1305
|
// =============================================
|
|
1299
1306
|
console.log('');
|
|
1300
1307
|
console.log('==============================================');
|
|
1301
|
-
console.log(' Forge v1.1.
|
|
1308
|
+
console.log(' Forge v1.1.3 Setup Complete!');
|
|
1302
1309
|
console.log('==============================================');
|
|
1303
1310
|
console.log('');
|
|
1304
1311
|
console.log('What\'s installed:');
|
|
@@ -1342,7 +1349,8 @@ function parseFlags() {
|
|
|
1342
1349
|
skipExternal: false,
|
|
1343
1350
|
agents: null,
|
|
1344
1351
|
all: false,
|
|
1345
|
-
help: false
|
|
1352
|
+
help: false,
|
|
1353
|
+
path: null
|
|
1346
1354
|
};
|
|
1347
1355
|
|
|
1348
1356
|
for (let i = 0; i < args.length; i++) {
|
|
@@ -1356,6 +1364,15 @@ function parseFlags() {
|
|
|
1356
1364
|
flags.all = true;
|
|
1357
1365
|
} else if (arg === '--help' || arg === '-h') {
|
|
1358
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=', '');
|
|
1359
1376
|
} else if (arg === '--agents') {
|
|
1360
1377
|
// --agents claude cursor format
|
|
1361
1378
|
const agentList = [];
|
|
@@ -1398,6 +1415,8 @@ function showHelp() {
|
|
|
1398
1415
|
console.log(' npx forge Minimal install (AGENTS.md + docs)');
|
|
1399
1416
|
console.log('');
|
|
1400
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');
|
|
1401
1420
|
console.log(' --quick, -q Use all defaults, minimal prompts');
|
|
1402
1421
|
console.log(' Auto-selects: all agents, GitHub Code Quality, ESLint');
|
|
1403
1422
|
console.log(' --skip-external Skip external services configuration');
|
|
@@ -1416,6 +1435,8 @@ function showHelp() {
|
|
|
1416
1435
|
console.log('Examples:');
|
|
1417
1436
|
console.log(' npx forge setup # Interactive setup');
|
|
1418
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');
|
|
1419
1440
|
console.log(' npx forge setup --agents claude cursor # Just these agents');
|
|
1420
1441
|
console.log(' npx forge setup --agents=claude,cursor # Same, different syntax');
|
|
1421
1442
|
console.log(' npx forge setup --skip-external # No service configuration');
|
|
@@ -1505,7 +1526,7 @@ async function quickSetup(selectedAgents, skipExternal) {
|
|
|
1505
1526
|
// Final summary
|
|
1506
1527
|
console.log('');
|
|
1507
1528
|
console.log('==============================================');
|
|
1508
|
-
console.log(' Forge v1.1.
|
|
1529
|
+
console.log(' Forge v1.1.3 Quick Setup Complete!');
|
|
1509
1530
|
console.log('==============================================');
|
|
1510
1531
|
console.log('');
|
|
1511
1532
|
console.log('Next steps:');
|
|
@@ -1523,10 +1544,14 @@ async function interactiveSetupWithFlags(flags) {
|
|
|
1523
1544
|
output: process.stdout
|
|
1524
1545
|
});
|
|
1525
1546
|
|
|
1547
|
+
let setupCompleted = false;
|
|
1548
|
+
|
|
1526
1549
|
// Handle Ctrl+C gracefully
|
|
1527
1550
|
rl.on('close', () => {
|
|
1528
|
-
|
|
1529
|
-
|
|
1551
|
+
if (!setupCompleted) {
|
|
1552
|
+
console.log('\n\nSetup cancelled.');
|
|
1553
|
+
process.exit(0);
|
|
1554
|
+
}
|
|
1530
1555
|
});
|
|
1531
1556
|
|
|
1532
1557
|
// Handle input errors
|
|
@@ -1716,6 +1741,7 @@ async function interactiveSetupWithFlags(flags) {
|
|
|
1716
1741
|
console.log('Skipping external services configuration...');
|
|
1717
1742
|
}
|
|
1718
1743
|
|
|
1744
|
+
setupCompleted = true;
|
|
1719
1745
|
rl.close();
|
|
1720
1746
|
|
|
1721
1747
|
// =============================================
|
|
@@ -1723,7 +1749,7 @@ async function interactiveSetupWithFlags(flags) {
|
|
|
1723
1749
|
// =============================================
|
|
1724
1750
|
console.log('');
|
|
1725
1751
|
console.log('==============================================');
|
|
1726
|
-
console.log(' Forge v1.1.
|
|
1752
|
+
console.log(' Forge v1.1.3 Setup Complete!');
|
|
1727
1753
|
console.log('==============================================');
|
|
1728
1754
|
console.log('');
|
|
1729
1755
|
console.log('What\'s installed:');
|
|
@@ -1771,6 +1797,38 @@ async function main() {
|
|
|
1771
1797
|
return;
|
|
1772
1798
|
}
|
|
1773
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
|
+
|
|
1774
1832
|
if (command === 'setup') {
|
|
1775
1833
|
// Determine agents to install
|
|
1776
1834
|
let selectedAgents = [];
|
|
@@ -1843,12 +1901,16 @@ async function main() {
|
|
|
1843
1901
|
input: process.stdin,
|
|
1844
1902
|
output: process.stdout
|
|
1845
1903
|
});
|
|
1904
|
+
let setupCompleted = false;
|
|
1846
1905
|
rl.on('close', () => {
|
|
1847
|
-
|
|
1848
|
-
|
|
1906
|
+
if (!setupCompleted) {
|
|
1907
|
+
console.log('\n\nSetup cancelled.');
|
|
1908
|
+
process.exit(0);
|
|
1909
|
+
}
|
|
1849
1910
|
});
|
|
1850
1911
|
const question = (prompt) => new Promise(resolve => rl.question(prompt, resolve));
|
|
1851
1912
|
await configureExternalServices(rl, question, selectedAgents);
|
|
1913
|
+
setupCompleted = true;
|
|
1852
1914
|
rl.close();
|
|
1853
1915
|
} else {
|
|
1854
1916
|
console.log('');
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forge-workflow",
|
|
3
|
-
"version": "1.1.
|
|
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
|
-
"forge": "
|
|
6
|
+
"forge": "bin/forge.js"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
9
|
"postinstall": "node ./bin/forge.js",
|