@agentic-forge/cli 1.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/bin/forge.js ADDED
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const fs = require('fs-extra');
5
+ const path = require('path');
6
+ const { execSync } = require('child_process');
7
+ const Theme = require('./utils/theme');
8
+ const pkg = require('../package.json');
9
+
10
+ const args = process.argv.slice(2);
11
+ const command = args[0] || 'help';
12
+
13
+ Theme.printHeader(pkg.version);
14
+
15
+ const commands = {
16
+ init: () => {
17
+ Theme.printStatus('Initializing AgentForge workspace...', 'info');
18
+
19
+ const dirs = ['.agents', 'agents', 'docs/exec-plans', 'docs/product-specs', 'docs/design-docs'];
20
+ dirs.forEach(dir => {
21
+ fs.ensureDirSync(path.join(process.cwd(), dir));
22
+ Theme.printResolved(`Created ${dir}/`);
23
+ });
24
+
25
+ Theme.printStatus('Setup complete. Forging environment...', 'done');
26
+ console.log('\n Next steps:');
27
+ console.log(' 1. run `forge brand` to see architecture');
28
+ console.log(' 2. run `forge health` to verify connections');
29
+ },
30
+
31
+ version: () => {
32
+ console.log(`AgentForge CLI v${pkg.version}`);
33
+ },
34
+
35
+ help: () => {
36
+ console.log('Usage: forge <command> [options]');
37
+ console.log('\nCommands:');
38
+ console.log(' init Initialize a new AgentForge workspace');
39
+ console.log(' health Run system health check');
40
+ console.log(' brand Display AgentForge vision and manifest');
41
+ console.log(' version Show version info');
42
+ }
43
+ };
44
+
45
+ if (commands[command]) {
46
+ commands[command]();
47
+ } else {
48
+ // Proxy to Python CLI if available
49
+ try {
50
+ const output = execSync(`python3 -m agentforge.cli ${args.join(' ')}`, { stdio: 'inherit' });
51
+ } catch (e) {
52
+ Theme.printStatus(`Unknown command: ${command}`, 'fail');
53
+ commands.help();
54
+ }
55
+ }
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+
3
+ const TTY = process.stdout.isTTY;
4
+
5
+ const Theme = {
6
+ colors: {
7
+ cyan: (s) => (TTY ? `\x1b[36m${s}\x1b[0m` : s),
8
+ green: (s) => (TTY ? `\x1b[32m${s}\x1b[0m` : s),
9
+ yellow: (s) => (TTY ? `\x1b[33m${s}\x1b[0m` : s),
10
+ red: (s) => (TTY ? `\x1b[31m${s}\x1b[0m` : s),
11
+ dim: (s) => (TTY ? `\x1b[2m${s}\x1b[0m` : s),
12
+ bold: (s) => (TTY ? `\x1b[1m${s}\x1b[0m` : s),
13
+ magenta: (s) => (TTY ? `\x1b[35m${s}\x1b[0m` : s),
14
+ },
15
+
16
+ chars: {
17
+ top: '┌──────────────────────────────────────────────────────────┐',
18
+ mid: '├──────────────────────────────────────────────────────────┤',
19
+ bot: '└──────────────────────────────────────────────────────────┘',
20
+ sep: '│',
21
+ dot: '•',
22
+ arr: '→',
23
+ },
24
+
25
+ printHeader(version) {
26
+ const c = this.colors;
27
+ console.log('\n' + c.cyan(this.chars.top));
28
+ console.log(c.cyan(this.chars.sep) + c.bold(' AGENTFORGE : ARCHITECT OF AUTONOMY v' + version).padEnd(58) + c.cyan(this.chars.sep));
29
+ console.log(c.cyan(this.chars.mid));
30
+ console.log(c.cyan(this.chars.sep) + c.dim(' Forging sovereign intelligence meshes for complex ops.').padEnd(58) + c.cyan(this.chars.sep));
31
+ console.log(c.cyan(this.chars.bot) + '\n');
32
+ },
33
+
34
+ printStatus(msg, type = 'info') {
35
+ const c = this.colors;
36
+ const icons = { info: c.cyan('ℹ'), done: c.green('✅'), warn: c.yellow('⚠️'), fail: c.red('❌') };
37
+ console.log(` ${icons[type] || icons.info} ${msg}`);
38
+ },
39
+
40
+ printResolved(msg) {
41
+ const c = this.colors;
42
+ console.log(` ${c.green('✓')} ${msg}`);
43
+ }
44
+ };
45
+
46
+ module.exports = Theme;
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@agentic-forge/cli",
3
+ "version": "1.1.0",
4
+ "description": "AgentForge CLI — The Digital Architect for Autonomous Swarms.",
5
+ "bin": {
6
+ "forge": "bin/forge.js"
7
+ },
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "files": [
12
+ "bin/",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "keywords": [
17
+ "agentforge",
18
+ "autonomous-agents",
19
+ "cli",
20
+ "installer",
21
+ "agentic-workflows",
22
+ "ai"
23
+ ],
24
+ "author": "sairamugge",
25
+ "license": "MIT",
26
+ "dependencies": {
27
+ "chalk": "^4.1.2",
28
+ "fs-extra": "^10.0.0"
29
+ }
30
+ }