@actiondock/cli 2.0.0 → 2.0.1
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 +31 -32
- package/package.json +4 -3
- package/src/commands/action.ts +5 -5
- package/src/commands/config.ts +2 -2
- package/src/commands/index.ts +3 -3
- package/src/commands/info.ts +4 -4
- package/src/commands/link.ts +2 -2
- package/src/commands/playbook.ts +1 -1
- package/src/commands/profile.ts +7 -7
- package/src/commands/runs.ts +2 -2
- package/src/commands/serve.ts +1 -1
- package/src/commands/state.ts +1 -1
- package/dist/index.js +0 -44620
- /package/bin/{ac.js → ad.js} +0 -0
package/README.md
CHANGED
|
@@ -6,20 +6,19 @@ The official Command Line Interface (CLI) toolchain for ActionDock 2.0.
|
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
7
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
8
8
|
|
|
9
|
-
> **Runtime requirement**: [Bun](https://bun.sh/) >= 1.2.0
|
|
10
|
-
> *(ActionDock CLI relies natively on Bun. Even if you install via `npm install -g @actiondock/cli`, Bun must be installed on your machine as the executable shebang runs via `#!/usr/bin/env bun`.)*
|
|
9
|
+
> **Runtime requirement**: [Bun](https://bun.sh/) >= 1.2.0.
|
|
11
10
|
|
|
12
|
-
`@actiondock/cli` provides the `
|
|
11
|
+
`@actiondock/cli` provides the `ad` command to develop, test, build, deploy, and export AI Agent Actions and Skills across MCP, HTTP, CLI, and standalone executables.
|
|
13
12
|
|
|
14
13
|
---
|
|
15
14
|
|
|
16
15
|
## Installation
|
|
17
16
|
|
|
18
17
|
```bash
|
|
19
|
-
#
|
|
20
|
-
|
|
18
|
+
# 1. Install Bun runtime (if not already installed)
|
|
19
|
+
npm install -g bun
|
|
21
20
|
|
|
22
|
-
#
|
|
21
|
+
# 2. Install ActionDock CLI
|
|
23
22
|
npm install -g @actiondock/cli
|
|
24
23
|
```
|
|
25
24
|
|
|
@@ -29,20 +28,20 @@ npm install -g @actiondock/cli
|
|
|
29
28
|
|
|
30
29
|
```bash
|
|
31
30
|
# 1. Initialize a new Action package scaffold
|
|
32
|
-
|
|
31
|
+
ad init my-tools
|
|
33
32
|
cd my-tools
|
|
34
33
|
|
|
35
34
|
# 2. Run an Action locally (outputs standard JSON envelope)
|
|
36
|
-
|
|
35
|
+
ad run sample.greet --input '{"name": "Alice"}'
|
|
37
36
|
|
|
38
37
|
# 3. Run in-memory unit tests
|
|
39
|
-
|
|
38
|
+
ad test
|
|
40
39
|
|
|
41
40
|
# 4. Compile into a single standalone binary
|
|
42
|
-
|
|
41
|
+
ad build
|
|
43
42
|
|
|
44
43
|
# 5. Export as a portable Agent Skill (with SOPs)
|
|
45
|
-
|
|
44
|
+
ad export skill
|
|
46
45
|
```
|
|
47
46
|
|
|
48
47
|
---
|
|
@@ -51,35 +50,35 @@ ac export skill
|
|
|
51
50
|
|
|
52
51
|
| Command | Purpose |
|
|
53
52
|
|---|---|
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
53
|
+
| `ad init [dir]` | Initialize an Action package scaffold |
|
|
54
|
+
| `ad info [patterns...]` | Explore capabilities and display metadata (supports fuzzy matching and `--tree`) |
|
|
55
|
+
| `ad doctor` | Run environment, global registry health, and project diagnostics |
|
|
56
|
+
| `ad action list` / `ad run <id>` | List and execute Actions |
|
|
57
|
+
| `ad playbook list` / `show` | Inspect agent task SOP Playbooks |
|
|
58
|
+
| `ad config list` / `get` / `set` | Manage runtime configurations |
|
|
59
|
+
| `ad state list` / `get` / `set` / `delete` / `clear` | Inspect and manage persistent state (with namespaces, TTL, and clear) |
|
|
60
|
+
| `ad runs list` / `show` | Inspect execution history and traces |
|
|
61
|
+
| `ad test` | Run fast unit tests |
|
|
62
|
+
| `ad build` | Compile into a zero-dependency standalone binary |
|
|
63
|
+
| `ad export skill` | Export Skill bundle for AI Agent platforms |
|
|
64
|
+
| `ad link` / `unlink` | Manage global router (with live subproject auto-discovery and prune) |
|
|
65
|
+
| `ad profile` / `ad serve` | Manage remote node profiles and start HTTP Runner |
|
|
66
|
+
| `ad mcp` | Start ActionDock as STDIO or HTTP MCP server |
|
|
68
67
|
|
|
69
68
|
---
|
|
70
69
|
|
|
71
70
|
## 📖 Complete Documentation
|
|
72
71
|
|
|
73
|
-
For the full list of flags, options, remote profiles, and advanced usage, refer to the [ActionDock Documentation Center](
|
|
72
|
+
For the full list of flags, options, remote profiles, and advanced usage, refer to the [ActionDock Documentation Center](../../docs/README.md):
|
|
74
73
|
|
|
75
|
-
- [CLI Reference Manual](
|
|
76
|
-
- [Quick Start Guide](
|
|
77
|
-
- [MCP Integration Guide](
|
|
78
|
-
- [Standalone Binary Build Guide](
|
|
79
|
-
- [Skill
|
|
74
|
+
- [CLI Reference Manual](../../docs/reference/cli.md)
|
|
75
|
+
- [Quick Start Guide](../../docs/developer/quick-start.md)
|
|
76
|
+
- [MCP Integration Guide](../../docs/consumer/use-as-mcp.md)
|
|
77
|
+
- [Standalone Binary Build Guide](../../docs/developer/build-and-export.md)
|
|
78
|
+
- [Agent Skill Usage Guide](../../docs/consumer/use-as-skill.md)
|
|
80
79
|
|
|
81
80
|
---
|
|
82
81
|
|
|
83
82
|
## License
|
|
84
83
|
|
|
85
|
-
[Apache-2.0](LICENSE) © team4u
|
|
84
|
+
[Apache-2.0](../../LICENSE) © team4u
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actiondock/cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "ActionDock CLI facade for developing, testing, building, and exporting standalone Agent Actions and Skills",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"
|
|
7
|
+
"ad": "./bin/ad.js",
|
|
8
|
+
"actiondock": "./bin/ad.js"
|
|
8
9
|
},
|
|
9
10
|
"main": "./src/index.ts",
|
|
10
11
|
"module": "./src/index.ts",
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
"@types/bun": "latest",
|
|
37
38
|
"typescript": "^5.7.0"
|
|
38
39
|
},
|
|
39
|
-
"keywords": ["actiondock", "
|
|
40
|
+
"keywords": ["actiondock", "ad", "agent", "cli", "skill", "builder", "mcp"],
|
|
40
41
|
"author": "team4u",
|
|
41
42
|
"license": "Apache-2.0",
|
|
42
43
|
"repository": {
|
package/src/commands/action.ts
CHANGED
|
@@ -113,7 +113,7 @@ export function registerActionCommands(program: Command): void {
|
|
|
113
113
|
const linkedList = listLinkedPackages();
|
|
114
114
|
if (linkedList.length === 0) {
|
|
115
115
|
console.log("No ActionDock project in current directory, and no packages linked.");
|
|
116
|
-
console.log("Run '
|
|
116
|
+
console.log("Run 'ad link' inside an Action package to register it.");
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -283,7 +283,7 @@ export default defineAction<Input, Output>({
|
|
|
283
283
|
writeFileSync(targetFullFile, template, "utf-8");
|
|
284
284
|
console.log(`[OK] Created Action '${id}' at ${targetFullFile}`);
|
|
285
285
|
console.log(`\nTo run this action:`);
|
|
286
|
-
console.log(`
|
|
286
|
+
console.log(` ad action run ${id} --input '{"exampleParam": "hello"}'`);
|
|
287
287
|
} catch (err: any) {
|
|
288
288
|
console.error(`Error: ${err.message}`);
|
|
289
289
|
process.exit(1);
|
|
@@ -454,10 +454,10 @@ export default defineAction<Input, Output>({
|
|
|
454
454
|
await executeAction(id, options);
|
|
455
455
|
});
|
|
456
456
|
|
|
457
|
-
// Root level alias:
|
|
457
|
+
// Root level alias: ad run <id>
|
|
458
458
|
program
|
|
459
459
|
.command("run <id>")
|
|
460
|
-
.description("Alias for '
|
|
460
|
+
.description("Alias for 'ad action run <id>'")
|
|
461
461
|
.option("-i, --input <json>", "Input as JSON string")
|
|
462
462
|
.option("-f, --input-file <path>", "Input from JSON file")
|
|
463
463
|
.option("-c, --config <key=value...>", "Temporary config override")
|
|
@@ -551,7 +551,7 @@ async function executeAction(id: string, options: any): Promise<void> {
|
|
|
551
551
|
// Local execution
|
|
552
552
|
if (options.async) {
|
|
553
553
|
console.error(
|
|
554
|
-
"Error: Async execution requires a long-running ActionDock server.\nUse --profile, --server, or start `
|
|
554
|
+
"Error: Async execution requires a long-running ActionDock server.\nUse --profile, --server, or start `ad serve`."
|
|
555
555
|
);
|
|
556
556
|
process.exit(1);
|
|
557
557
|
}
|
package/src/commands/config.ts
CHANGED
|
@@ -28,7 +28,7 @@ export function registerConfigCommands(program: Command): void {
|
|
|
28
28
|
const root = resolvePackageRoot(identifier || options.package);
|
|
29
29
|
if (!root) {
|
|
30
30
|
console.error(
|
|
31
|
-
"Error: Not in an ActionDock project.\nUsage:
|
|
31
|
+
"Error: Not in an ActionDock project.\nUsage: ad config schema [package-id] or cd into a project directory."
|
|
32
32
|
);
|
|
33
33
|
process.exit(1);
|
|
34
34
|
}
|
|
@@ -123,7 +123,7 @@ export function registerConfigCommands(program: Command): void {
|
|
|
123
123
|
if (missingRequired.length > 0) {
|
|
124
124
|
console.log(`\n[WARNING] ${missingRequired.length} required config(s) not set:`);
|
|
125
125
|
for (const m of missingRequired) {
|
|
126
|
-
console.log(` - ${m.key}: Run '
|
|
126
|
+
console.log(` - ${m.key}: Run 'ad config set ${m.key} <value>' to configure.`);
|
|
127
127
|
}
|
|
128
128
|
} else {
|
|
129
129
|
console.log("\n[OK] All configuration dependencies are satisfied.");
|
package/src/commands/index.ts
CHANGED
|
@@ -19,9 +19,9 @@ export function createCliProgram(): Command {
|
|
|
19
19
|
const program = new Command();
|
|
20
20
|
|
|
21
21
|
program
|
|
22
|
-
.name("
|
|
23
|
-
.description("ActionDock (
|
|
24
|
-
.version("2.0.
|
|
22
|
+
.name("ad")
|
|
23
|
+
.description("ActionDock (ad) 2.0 - Toolchain for building and shipping standalone AI Agent Actions & Skills")
|
|
24
|
+
.version("2.0.1");
|
|
25
25
|
|
|
26
26
|
registerInitCommand(program);
|
|
27
27
|
registerInfoCommand(program);
|
package/src/commands/info.ts
CHANGED
|
@@ -122,7 +122,7 @@ function printAggregatedPackages(
|
|
|
122
122
|
}
|
|
123
123
|
if (options?.showTip !== false) {
|
|
124
124
|
console.log(
|
|
125
|
-
"Tip: Run '
|
|
125
|
+
"Tip: Run 'ad info <package-id>' to view detailed package configuration and schema."
|
|
126
126
|
);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
@@ -133,7 +133,7 @@ function printRegistryTree(status: ReturnType<typeof getRegistryStatus>): void {
|
|
|
133
133
|
|
|
134
134
|
if (!hasWorkspaces && !hasPackages) {
|
|
135
135
|
console.log("[INFO] No ActionDock packages or workspaces currently linked.");
|
|
136
|
-
console.log(" Run '
|
|
136
|
+
console.log(" Run 'ad link' inside an Action package or workspace to register it.");
|
|
137
137
|
return;
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -165,7 +165,7 @@ function printRegistryTree(status: ReturnType<typeof getRegistryStatus>): void {
|
|
|
165
165
|
|
|
166
166
|
console.log(`\n[Summary] Total: ${status.totalPackagesCount} active package(s), ${status.workspaces.length} workspace(s)`);
|
|
167
167
|
if (status.staleCount > 0) {
|
|
168
|
-
console.log(`[WARN] ${status.staleCount} stale entry/entries detected. Run '
|
|
168
|
+
console.log(`[WARN] ${status.staleCount} stale entry/entries detected. Run 'ad unlink --prune' to clean up.`);
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
|
|
@@ -423,7 +423,7 @@ export function registerInfoCommand(program: Command): void {
|
|
|
423
423
|
"No ActionDock project in current directory, and no packages linked."
|
|
424
424
|
);
|
|
425
425
|
console.log(
|
|
426
|
-
"Run '
|
|
426
|
+
"Run 'ad link' inside an Action package to register it."
|
|
427
427
|
);
|
|
428
428
|
return;
|
|
429
429
|
}
|
package/src/commands/link.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
|
|
8
8
|
export function registerLinkCommands(program: Command): void {
|
|
9
|
-
//
|
|
9
|
+
// ad link [path]
|
|
10
10
|
program
|
|
11
11
|
.command("link [path]")
|
|
12
12
|
.option("-r, --recursive", "Recursively discover and link packages in subdirectories")
|
|
@@ -32,7 +32,7 @@ export function registerLinkCommands(program: Command): void {
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
//
|
|
35
|
+
// ad unlink [id|path]
|
|
36
36
|
program
|
|
37
37
|
.command("unlink [identifier]")
|
|
38
38
|
.option("-p, --prune", "Automatically scan and prune any stale/missing paths from registry")
|
package/src/commands/playbook.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function registerPlaybookCommands(program: Command): void {
|
|
|
65
65
|
const linkedList = listLinkedPackages();
|
|
66
66
|
if (linkedList.length === 0) {
|
|
67
67
|
console.log("No ActionDock project in current directory, and no packages linked.");
|
|
68
|
-
console.log("Run '
|
|
68
|
+
console.log("Run 'ad link' inside an Action package to register it.");
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
|
package/src/commands/profile.ts
CHANGED
|
@@ -20,7 +20,7 @@ export function registerProfileCommands(program: Command): void {
|
|
|
20
20
|
.command("profile")
|
|
21
21
|
.description("Manage multi-cloud and remote execution profiles");
|
|
22
22
|
|
|
23
|
-
//
|
|
23
|
+
// ad profile list
|
|
24
24
|
profileCmd
|
|
25
25
|
.command("list [patterns...]")
|
|
26
26
|
.description("List all configured profiles")
|
|
@@ -86,7 +86,7 @@ export function registerProfileCommands(program: Command): void {
|
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
88
|
console.log(
|
|
89
|
-
"\nUse '
|
|
89
|
+
"\nUse 'ad profile use <name>' to switch or 'ad run <action> --profile <name>' to execute on a specific target."
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
} catch (err: any) {
|
|
@@ -95,7 +95,7 @@ export function registerProfileCommands(program: Command): void {
|
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
|
|
98
|
-
//
|
|
98
|
+
// ad profile add <name>
|
|
99
99
|
profileCmd
|
|
100
100
|
.command("add <name>")
|
|
101
101
|
.description("Add or update a remote execution profile")
|
|
@@ -123,7 +123,7 @@ export function registerProfileCommands(program: Command): void {
|
|
|
123
123
|
}
|
|
124
124
|
});
|
|
125
125
|
|
|
126
|
-
//
|
|
126
|
+
// ad profile use <name>
|
|
127
127
|
profileCmd
|
|
128
128
|
.command("use <name>")
|
|
129
129
|
.description("Switch active default profile")
|
|
@@ -137,7 +137,7 @@ export function registerProfileCommands(program: Command): void {
|
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
139
|
|
|
140
|
-
//
|
|
140
|
+
// ad profile show [name]
|
|
141
141
|
profileCmd
|
|
142
142
|
.command("show [name]")
|
|
143
143
|
.description("Display details of a profile (defaults to active profile)")
|
|
@@ -200,7 +200,7 @@ export function registerProfileCommands(program: Command): void {
|
|
|
200
200
|
}
|
|
201
201
|
});
|
|
202
202
|
|
|
203
|
-
//
|
|
203
|
+
// ad profile rm / remove <name>
|
|
204
204
|
profileCmd
|
|
205
205
|
.command("rm <name>")
|
|
206
206
|
.alias("remove")
|
|
@@ -223,7 +223,7 @@ export function registerProfileCommands(program: Command): void {
|
|
|
223
223
|
}
|
|
224
224
|
});
|
|
225
225
|
|
|
226
|
-
//
|
|
226
|
+
// ad profile test [name]
|
|
227
227
|
profileCmd
|
|
228
228
|
.command("test [name]")
|
|
229
229
|
.description("Test connection latency and health of a profile")
|
package/src/commands/runs.ts
CHANGED
|
@@ -107,7 +107,7 @@ export function registerRunsCommands(program: Command): void {
|
|
|
107
107
|
const linkedList = listLinkedPackages();
|
|
108
108
|
if (linkedList.length === 0) {
|
|
109
109
|
console.log("No ActionDock project in current directory, and no packages linked.");
|
|
110
|
-
console.log("Run '
|
|
110
|
+
console.log("Run 'ad link' inside an Action package to register it.");
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -293,7 +293,7 @@ export function registerRunsCommands(program: Command): void {
|
|
|
293
293
|
|
|
294
294
|
if (target.type === "local") {
|
|
295
295
|
console.error(
|
|
296
|
-
"Error: '
|
|
296
|
+
"Error: 'ad runs cancel' is only supported for remote execution targets. Use --profile <name> or --server <url>."
|
|
297
297
|
);
|
|
298
298
|
process.exit(1);
|
|
299
299
|
}
|
package/src/commands/serve.ts
CHANGED
|
@@ -80,7 +80,7 @@ export function registerServeCommand(program: Command): void {
|
|
|
80
80
|
console.log(` * Max Body Size: ${options.maxBody || "1mb"}`);
|
|
81
81
|
console.log(` * Health Endpoint: http://${host === "0.0.0.0" ? "127.0.0.1" : host}:${server.port}/api/v1/health`);
|
|
82
82
|
console.log(`======================================================\n`);
|
|
83
|
-
console.log(`Server is ready to accept remote '
|
|
83
|
+
console.log(`Server is ready to accept remote 'ad run' requests.`);
|
|
84
84
|
console.log(`Press Ctrl+C to terminate.\n`);
|
|
85
85
|
|
|
86
86
|
// Keep process running
|
package/src/commands/state.ts
CHANGED
|
@@ -124,7 +124,7 @@ export function registerStateCommands(program: Command): void {
|
|
|
124
124
|
const linkedList = listLinkedPackages();
|
|
125
125
|
if (linkedList.length === 0) {
|
|
126
126
|
console.log("No ActionDock project in current directory, and no packages linked.");
|
|
127
|
-
console.log("Run '
|
|
127
|
+
console.log("Run 'ad link' inside an Action package to register it.");
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
|