create-aroha-agent 1.2.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/dist/index.js +38 -0
- package/package.json +37 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Copyright (c) 2026 Aroha Labs
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
/**
|
|
5
|
+
* create-aroha-agent — zero-config npx scaffolder
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* npx create-aroha-agent # prompts for name
|
|
9
|
+
* npx create-aroha-agent my-agent # scaffolds my-agent/ silently
|
|
10
|
+
* npx create-aroha-agent my-agent --mcp # MCP-first template
|
|
11
|
+
* npx create-aroha-agent my-agent --type orchestrator
|
|
12
|
+
*/
|
|
13
|
+
import { runInit } from "@aroha-sdk/cli/commands/init";
|
|
14
|
+
const args = process.argv.slice(2);
|
|
15
|
+
function flag(f) {
|
|
16
|
+
return args.includes(f);
|
|
17
|
+
}
|
|
18
|
+
function flagValue(f) {
|
|
19
|
+
const i = args.indexOf(f);
|
|
20
|
+
return i !== -1 ? args[i + 1] : undefined;
|
|
21
|
+
}
|
|
22
|
+
// First positional argument is the agent name
|
|
23
|
+
const name = args.find((a) => !a.startsWith("--"));
|
|
24
|
+
const isMcp = flag("--mcp");
|
|
25
|
+
console.log("┌─────────────────────────────────────────────────┐");
|
|
26
|
+
console.log("│ create-aroha-agent v1.2.0 │");
|
|
27
|
+
console.log("│ The fastest way to start a new Aroha agent │");
|
|
28
|
+
console.log("└─────────────────────────────────────────────────┘\n");
|
|
29
|
+
if (isMcp) {
|
|
30
|
+
console.log("MCP mode: scaffolding an MCP-first agent with wrapMcp().\n");
|
|
31
|
+
console.log("After scaffolding, open src/server.ts and implement your MCP tools.\n");
|
|
32
|
+
}
|
|
33
|
+
await runInit(name, {
|
|
34
|
+
type: flagValue("--type") ?? "provider",
|
|
35
|
+
port: flagValue("--port") ? Number(flagValue("--port")) : undefined,
|
|
36
|
+
capabilities: isMcp ? ["process-request", "list-capabilities"] : undefined,
|
|
37
|
+
yes: true,
|
|
38
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-aroha-agent",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Zero-config scaffolder for Aroha Protocol agents — run with npx create-aroha-agent",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"create-aroha-agent": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"dev": "tsc --watch"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@aroha-sdk/cli": "^1.2.1"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"typescript": "^5.5.0"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"aroha",
|
|
26
|
+
"agent",
|
|
27
|
+
"mcp",
|
|
28
|
+
"ai-agent",
|
|
29
|
+
"scaffold",
|
|
30
|
+
"create"
|
|
31
|
+
],
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/projectmed99/aroha.git",
|
|
35
|
+
"directory": "packages/create-aroha-agent"
|
|
36
|
+
}
|
|
37
|
+
}
|