mokout-cli 0.1.4 → 0.1.7
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 +65 -2
- package/dist/cli.js +100 -69
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -41,7 +41,6 @@ AGENTS.md → CLAUDE.md
|
|
|
41
41
|
.claude/settings.json
|
|
42
42
|
tasks/todo.md
|
|
43
43
|
tasks/lessons.md
|
|
44
|
-
.agents/skills/
|
|
45
44
|
```
|
|
46
45
|
|
|
47
46
|
**JavaScript** (`mokout project init --js`) — 9 files:
|
|
@@ -56,7 +55,6 @@ AGENTS.md → CLAUDE.md
|
|
|
56
55
|
.claude/settings.json
|
|
57
56
|
tasks/todo.md
|
|
58
57
|
tasks/lessons.md
|
|
59
|
-
.agents/skills/
|
|
60
58
|
```
|
|
61
59
|
|
|
62
60
|
## Usage
|
|
@@ -82,6 +80,71 @@ mokout code-fast init --dry-run # preview
|
|
|
82
80
|
Idempotent: re-running refreshes the doctrine's managed block in `CLAUDE.md`
|
|
83
81
|
and leaves everything else (including your own notes) untouched.
|
|
84
82
|
|
|
83
|
+
### Advanced Agent Workflows (via google/agents-cli)
|
|
84
|
+
|
|
85
|
+
`mokout-cli` installs and seamlessly wraps the [`google/agents-cli`](https://github.com/google/agents-cli) toolkit, providing deep capabilities for evaluating, testing, and deploying coding agents. All `agents-cli` commands are proxied through `mokout agents`.
|
|
86
|
+
|
|
87
|
+
**CLI Commands**
|
|
88
|
+
| Command | What it does |
|
|
89
|
+
|---------|--------------|
|
|
90
|
+
| `mokout agents setup` | Install CLI + skills to coding agents (runs automatically on install) |
|
|
91
|
+
| `mokout agents scaffold <name>` | Create a new agent project |
|
|
92
|
+
| `mokout agents eval generate` | Run agent on eval dataset, produce traces |
|
|
93
|
+
| `mokout agents eval grade` | Run agent evaluations on the traces |
|
|
94
|
+
| `mokout agents deploy` | Deploy to Google Cloud |
|
|
95
|
+
| `mokout agents publish gemini-enterprise` | Register with Gemini Enterprise |
|
|
96
|
+
|
|
97
|
+
**See all commands**
|
|
98
|
+
| Command | Description |
|
|
99
|
+
|---------|-------------|
|
|
100
|
+
| `mokout agents login` | Authenticate with Google Cloud or AI Studio |
|
|
101
|
+
| `mokout agents login --status` | Show authentication status |
|
|
102
|
+
|
|
103
|
+
**Scaffold**
|
|
104
|
+
| Command | Description |
|
|
105
|
+
|---------|-------------|
|
|
106
|
+
| `mokout agents scaffold <name>` | Create a new agent project |
|
|
107
|
+
| `mokout agents scaffold enhance` | Add deployment, CI/CD, or RAG to an existing project |
|
|
108
|
+
| `mokout agents scaffold upgrade` | Upgrade project to a newer agents-cli version |
|
|
109
|
+
|
|
110
|
+
**Develop**
|
|
111
|
+
| Command | Description |
|
|
112
|
+
|---------|-------------|
|
|
113
|
+
| `mokout agents run "prompt"` | Run agent with a single prompt |
|
|
114
|
+
| `mokout agents install` | Install project dependencies |
|
|
115
|
+
| `mokout agents lint` | Run code quality checks (Ruff) |
|
|
116
|
+
|
|
117
|
+
**Evaluate**
|
|
118
|
+
| Command | Description |
|
|
119
|
+
|---------|-------------|
|
|
120
|
+
| `mokout agents eval generate` | Run agent inference over eval cases |
|
|
121
|
+
| `mokout agents eval grade` | Grade generated traces against metrics |
|
|
122
|
+
| `mokout agents eval dataset synthesize` | Synthesize multi-turn eval scenarios for your local agent |
|
|
123
|
+
| `mokout agents eval compare` | Compare two eval result files |
|
|
124
|
+
| `mokout agents eval analyze` | Cluster failure modes from grade results |
|
|
125
|
+
| `mokout agents eval metric list` | List available metrics |
|
|
126
|
+
| `mokout agents eval optimize` | Auto-tune agent prompts using eval data |
|
|
127
|
+
|
|
128
|
+
**Deploy & Publish**
|
|
129
|
+
| Command | Description |
|
|
130
|
+
|---------|-------------|
|
|
131
|
+
| `mokout agents deploy` | Deploy to Google Cloud |
|
|
132
|
+
| `mokout agents publish gemini-enterprise` | Register with Gemini Enterprise |
|
|
133
|
+
| `mokout agents infra single-project` | Provision single-project infrastructure |
|
|
134
|
+
| `mokout agents infra cicd` | Set up CI/CD pipeline + staging/prod infrastructure |
|
|
135
|
+
|
|
136
|
+
**Data**
|
|
137
|
+
| Command | Description |
|
|
138
|
+
|---------|-------------|
|
|
139
|
+
| `mokout agents infra datastore` | Provision datastore infrastructure for RAG |
|
|
140
|
+
| `mokout agents data-ingestion` | Run data ingestion pipeline |
|
|
141
|
+
|
|
142
|
+
**Other**
|
|
143
|
+
| Command | Description |
|
|
144
|
+
|---------|-------------|
|
|
145
|
+
| `mokout agents info` | Show project config and CLI version |
|
|
146
|
+
| `mokout agents update` | Force reinstall skills to all IDEs |
|
|
147
|
+
|
|
85
148
|
## Install
|
|
86
149
|
|
|
87
150
|
No install needed — `npx mokout project init` runs the latest version. To install globally:
|
package/dist/cli.js
CHANGED
|
@@ -3,9 +3,75 @@
|
|
|
3
3
|
// src/cli.ts
|
|
4
4
|
import { Builtins, Cli } from "clipanion";
|
|
5
5
|
|
|
6
|
-
// src/commands/
|
|
6
|
+
// src/commands/agent-init.ts
|
|
7
|
+
import { spawnSync } from "child_process";
|
|
7
8
|
import * as p from "@clack/prompts";
|
|
8
|
-
import { Command
|
|
9
|
+
import { Command } from "clipanion";
|
|
10
|
+
var AgentInitCommand = class extends Command {
|
|
11
|
+
static paths = [["agent", "init"]];
|
|
12
|
+
static usage = Command.Usage({
|
|
13
|
+
description: "Initialize and install google-agents-cli skills locally in the project folder.",
|
|
14
|
+
examples: [["Install skills to workspace", "mokout agent init"]]
|
|
15
|
+
});
|
|
16
|
+
async execute() {
|
|
17
|
+
p.intro("mokout agent init");
|
|
18
|
+
const s = p.spinner();
|
|
19
|
+
s.start("Installing google-agents-cli and workspace skills...");
|
|
20
|
+
const cwd = process.cwd();
|
|
21
|
+
const installResult = spawnSync("uv", ["tool", "install", "google-agents-cli"], {
|
|
22
|
+
cwd,
|
|
23
|
+
stdio: "inherit"
|
|
24
|
+
});
|
|
25
|
+
if (installResult.error || installResult.status !== null && installResult.status !== 0) {
|
|
26
|
+
p.cancel("Failed to install google-agents-cli via uv tool.");
|
|
27
|
+
return installResult.status ?? 1;
|
|
28
|
+
}
|
|
29
|
+
const setupResult = spawnSync(
|
|
30
|
+
"uv",
|
|
31
|
+
["tool", "run", "google-agents-cli", "setup", "--workspace"],
|
|
32
|
+
{
|
|
33
|
+
cwd,
|
|
34
|
+
stdio: "inherit"
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
if (setupResult.error || setupResult.status !== null && setupResult.status !== 0) {
|
|
38
|
+
p.cancel("Failed to setup google-agents-cli skills.");
|
|
39
|
+
return setupResult.status ?? 1;
|
|
40
|
+
}
|
|
41
|
+
s.stop("Skills installed locally in the workspace!");
|
|
42
|
+
p.outro("Done.");
|
|
43
|
+
return 0;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// src/commands/agents.ts
|
|
48
|
+
import { spawnSync as spawnSync2 } from "child_process";
|
|
49
|
+
import { Command as Command2, Option } from "clipanion";
|
|
50
|
+
var AgentsCommand = class extends Command2 {
|
|
51
|
+
static paths = [["agents"]];
|
|
52
|
+
static usage = Command2.Usage({
|
|
53
|
+
category: "agents",
|
|
54
|
+
description: "Proxy command for google/agents-cli (scaffold, eval, deploy, etc.)",
|
|
55
|
+
examples: [
|
|
56
|
+
["Scaffold an agent project", "mokout agents scaffold my-agent"],
|
|
57
|
+
["Evaluate the agent", "mokout agents eval generate"],
|
|
58
|
+
["Deploy the agent", "mokout agents deploy"]
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
args = Option.Proxy();
|
|
62
|
+
async execute() {
|
|
63
|
+
const cwd = process.cwd();
|
|
64
|
+
const result = spawnSync2("uv", ["tool", "run", "google-agents-cli", ...this.args], {
|
|
65
|
+
cwd,
|
|
66
|
+
stdio: "inherit"
|
|
67
|
+
});
|
|
68
|
+
return result.status ?? (result.error ? 1 : 0);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// src/commands/code-fast-init.ts
|
|
73
|
+
import * as p2 from "@clack/prompts";
|
|
74
|
+
import { Command as Command3, Option as Option2 } from "clipanion";
|
|
9
75
|
import nodePlop from "node-plop";
|
|
10
76
|
|
|
11
77
|
// src/generators/engine.ts
|
|
@@ -334,9 +400,9 @@ function filesFor(stack) {
|
|
|
334
400
|
}
|
|
335
401
|
|
|
336
402
|
// src/commands/code-fast-init.ts
|
|
337
|
-
var CodeFastInitCommand = class extends
|
|
403
|
+
var CodeFastInitCommand = class extends Command3 {
|
|
338
404
|
static paths = [["code-fast", "init"]];
|
|
339
|
-
static usage =
|
|
405
|
+
static usage = Command3.Usage({
|
|
340
406
|
category: "code-fast",
|
|
341
407
|
description: "Add agent files (CLAUDE.md, AGENTS.md, tasks/) to the current project.",
|
|
342
408
|
examples: [
|
|
@@ -344,21 +410,21 @@ var CodeFastInitCommand = class extends Command {
|
|
|
344
410
|
["Preview without writing", "mokout code-fast init --dry-run"]
|
|
345
411
|
]
|
|
346
412
|
});
|
|
347
|
-
dryRun =
|
|
413
|
+
dryRun = Option2.Boolean("--dry-run", false, {
|
|
348
414
|
description: "Print what would be created without writing anything"
|
|
349
415
|
});
|
|
350
416
|
async execute() {
|
|
351
417
|
const cwd = process.cwd();
|
|
352
|
-
|
|
418
|
+
p2.intro("mokout code-fast init");
|
|
353
419
|
const files = agentFiles();
|
|
354
420
|
const paths = [...new Set(files.map((f) => f.path))];
|
|
355
421
|
const links = SYMLINKS.map((l) => `${l.path} -> ${l.target}`);
|
|
356
422
|
if (this.dryRun) {
|
|
357
|
-
|
|
358
|
-
|
|
423
|
+
p2.note([...paths, ...links].join("\n"), "Would create");
|
|
424
|
+
p2.outro("Dry run \u2014 nothing written.");
|
|
359
425
|
return 0;
|
|
360
426
|
}
|
|
361
|
-
const s =
|
|
427
|
+
const s = p2.spinner();
|
|
362
428
|
s.start("Adding agent files");
|
|
363
429
|
const plop = await nodePlop(void 0, { destBasePath: cwd, force: false });
|
|
364
430
|
registerGenerator(plop, {
|
|
@@ -369,42 +435,22 @@ var CodeFastInitCommand = class extends Command {
|
|
|
369
435
|
});
|
|
370
436
|
await plop.getGenerator("code-fast-init").runActions({});
|
|
371
437
|
s.stop("Agent files added");
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
try {
|
|
375
|
-
if (!exists(cwd, ".agents/skills")) {
|
|
376
|
-
run(
|
|
377
|
-
"git",
|
|
378
|
-
["clone", "--depth", "1", "https://github.com/addyosmani/agent-skills", ".agents/skills"],
|
|
379
|
-
cwd
|
|
380
|
-
);
|
|
381
|
-
remove(cwd, ".agents/skills/.git");
|
|
382
|
-
}
|
|
383
|
-
cloneSpinner.stop("Added agent-skills to .agents/skills");
|
|
384
|
-
} catch {
|
|
385
|
-
cloneSpinner.stop("Skipped agent-skills (offline?)");
|
|
386
|
-
}
|
|
387
|
-
p.note(
|
|
388
|
-
[...paths.map((f) => `\u2022 ${f}`), ...links.map((l) => `\u2022 ${l}`), "\u2022 .agents/skills/"].join(
|
|
389
|
-
"\n"
|
|
390
|
-
),
|
|
391
|
-
"Added"
|
|
392
|
-
);
|
|
393
|
-
p.outro("Done. CLAUDE.md holds the doctrine; AGENTS.md mirrors it for other agents.");
|
|
438
|
+
p2.note([...paths.map((f) => `\u2022 ${f}`), ...links.map((l) => `\u2022 ${l}`)].join("\n"), "Added");
|
|
439
|
+
p2.outro("Done. CLAUDE.md holds the doctrine; AGENTS.md mirrors it for other agents.");
|
|
394
440
|
return 0;
|
|
395
441
|
}
|
|
396
442
|
};
|
|
397
443
|
|
|
398
444
|
// src/commands/init.ts
|
|
399
|
-
import * as
|
|
400
|
-
import { Command as
|
|
445
|
+
import * as p3 from "@clack/prompts";
|
|
446
|
+
import { Command as Command4, Option as Option3 } from "clipanion";
|
|
401
447
|
import nodePlop2 from "node-plop";
|
|
402
448
|
var UV_BOILERPLATE = ["hello.py", "main.py", "README.md"];
|
|
403
449
|
var PY_DEV_DEPS = ["pytest", "ruff", "pyrefly"];
|
|
404
450
|
var JS_DEV_DEPS = ["@biomejs/biome"];
|
|
405
|
-
var InitCommand = class extends
|
|
451
|
+
var InitCommand = class extends Command4 {
|
|
406
452
|
static paths = [["project", "init"]];
|
|
407
|
-
static usage =
|
|
453
|
+
static usage = Command4.Usage({
|
|
408
454
|
description: "Scaffold an agentic AI project: uv/npm, CLAUDE.md, and modern tooling.",
|
|
409
455
|
examples: [
|
|
410
456
|
["Interactive (asks for stack)", "mokout project init"],
|
|
@@ -413,19 +459,19 @@ var InitCommand = class extends Command2 {
|
|
|
413
459
|
["Preview without writing", "mokout project init --dry-run"]
|
|
414
460
|
]
|
|
415
461
|
});
|
|
416
|
-
js =
|
|
417
|
-
python =
|
|
462
|
+
js = Option3.Boolean("--js", false, { description: "Scaffold a Node/JS project" });
|
|
463
|
+
python = Option3.Boolean("--python", false, {
|
|
418
464
|
description: "Scaffold a Python project (default)"
|
|
419
465
|
});
|
|
420
|
-
dryRun =
|
|
466
|
+
dryRun = Option3.Boolean("--dry-run", false, {
|
|
421
467
|
description: "Print what would be created without writing anything"
|
|
422
468
|
});
|
|
423
469
|
async execute() {
|
|
424
470
|
const cwd = process.cwd();
|
|
425
|
-
|
|
471
|
+
p3.intro("mokout project init");
|
|
426
472
|
const stack = await this.resolveStack();
|
|
427
473
|
if (stack === null) {
|
|
428
|
-
|
|
474
|
+
p3.cancel("Cancelled.");
|
|
429
475
|
return 1;
|
|
430
476
|
}
|
|
431
477
|
const files = filesFor(stack);
|
|
@@ -433,19 +479,19 @@ var InitCommand = class extends Command2 {
|
|
|
433
479
|
const links = SYMLINKS.map((l) => `${l.path} -> ${l.target}`);
|
|
434
480
|
const steps = stack === "javascript" ? ["npm init -y", `npm install --save-dev ${JS_DEV_DEPS.join(" ")}`] : ["uv init", `uv add --dev ${PY_DEV_DEPS.join(" ")}`];
|
|
435
481
|
if (this.dryRun) {
|
|
436
|
-
|
|
437
|
-
|
|
482
|
+
p3.note(["git init", ...steps, ...paths, ...links].join("\n"), "Would create");
|
|
483
|
+
p3.outro("Dry run \u2014 nothing written.");
|
|
438
484
|
return 0;
|
|
439
485
|
}
|
|
440
486
|
if (!exists(cwd, ".git")) run("git", ["init", "-q"], cwd);
|
|
441
487
|
if (stack === "javascript") {
|
|
442
488
|
if (!exists(cwd, "package.json")) {
|
|
443
489
|
if (!hasCommand("npm")) {
|
|
444
|
-
|
|
490
|
+
p3.cancel("npm not found on PATH.");
|
|
445
491
|
return 1;
|
|
446
492
|
}
|
|
447
493
|
run("npm", ["init", "-y"], cwd);
|
|
448
|
-
const dep =
|
|
494
|
+
const dep = p3.spinner();
|
|
449
495
|
dep.start(`Adding dev dependencies (${JS_DEV_DEPS.join(", ")})`);
|
|
450
496
|
try {
|
|
451
497
|
run("npm", ["install", "--save-dev", ...JS_DEV_DEPS], cwd);
|
|
@@ -458,7 +504,7 @@ var InitCommand = class extends Command2 {
|
|
|
458
504
|
}
|
|
459
505
|
} else if (!exists(cwd, "pyproject.toml")) {
|
|
460
506
|
if (!hasCommand("uv")) {
|
|
461
|
-
|
|
507
|
+
p3.cancel("uv not found on PATH \u2014 install from https://docs.astral.sh/uv/");
|
|
462
508
|
return 1;
|
|
463
509
|
}
|
|
464
510
|
const preexisting = UV_BOILERPLATE.filter((f) => exists(cwd, f));
|
|
@@ -466,7 +512,7 @@ var InitCommand = class extends Command2 {
|
|
|
466
512
|
for (const f of UV_BOILERPLATE) {
|
|
467
513
|
if (!preexisting.includes(f)) remove(cwd, f);
|
|
468
514
|
}
|
|
469
|
-
const dep =
|
|
515
|
+
const dep = p3.spinner();
|
|
470
516
|
dep.start(`Adding dev dependencies (${PY_DEV_DEPS.join(", ")})`);
|
|
471
517
|
try {
|
|
472
518
|
run("uv", ["add", "--dev", ...PY_DEV_DEPS], cwd);
|
|
@@ -480,7 +526,7 @@ var InitCommand = class extends Command2 {
|
|
|
480
526
|
${RUFF_PYPROJECT}`);
|
|
481
527
|
}
|
|
482
528
|
}
|
|
483
|
-
const s =
|
|
529
|
+
const s = p3.spinner();
|
|
484
530
|
s.start("Writing project files");
|
|
485
531
|
const plop = await nodePlop2(void 0, { destBasePath: cwd, force: false });
|
|
486
532
|
registerGenerator(plop, {
|
|
@@ -491,28 +537,11 @@ ${RUFF_PYPROJECT}`);
|
|
|
491
537
|
});
|
|
492
538
|
await plop.getGenerator("init").runActions({});
|
|
493
539
|
s.stop("Files written");
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
try {
|
|
497
|
-
if (!exists(cwd, ".agents/skills")) {
|
|
498
|
-
run(
|
|
499
|
-
"git",
|
|
500
|
-
["clone", "--depth", "1", "https://github.com/addyosmani/agent-skills", ".agents/skills"],
|
|
501
|
-
cwd
|
|
502
|
-
);
|
|
503
|
-
remove(cwd, ".agents/skills/.git");
|
|
504
|
-
}
|
|
505
|
-
cloneSpinner.stop("Added agent-skills to .agents/skills");
|
|
506
|
-
} catch {
|
|
507
|
-
cloneSpinner.stop("Skipped agent-skills (offline?)");
|
|
508
|
-
}
|
|
509
|
-
p2.note(
|
|
510
|
-
[...paths.map((f) => `\u2022 ${f}`), ...links.map((l) => `\u2022 ${l}`), "\u2022 .agents/skills/"].join(
|
|
511
|
-
"\n"
|
|
512
|
-
),
|
|
540
|
+
p3.note(
|
|
541
|
+
[...paths.map((f) => `\u2022 ${f}`), ...links.map((l) => `\u2022 ${l}`)].join("\n"),
|
|
513
542
|
`Scaffolded (${stack})`
|
|
514
543
|
);
|
|
515
|
-
|
|
544
|
+
p3.outro("Done. CLAUDE.md lists the project commands; AGENTS.md mirrors it.");
|
|
516
545
|
return 0;
|
|
517
546
|
}
|
|
518
547
|
/** Resolve the stack from flags, else prompt. Returns null if the user cancels. */
|
|
@@ -520,7 +549,7 @@ ${RUFF_PYPROJECT}`);
|
|
|
520
549
|
if (this.js) return "javascript";
|
|
521
550
|
if (this.python) return "python";
|
|
522
551
|
if (!process.stdin.isTTY) return "python";
|
|
523
|
-
const choice = await
|
|
552
|
+
const choice = await p3.select({
|
|
524
553
|
message: "Project stack?",
|
|
525
554
|
initialValue: "python",
|
|
526
555
|
options: [
|
|
@@ -528,7 +557,7 @@ ${RUFF_PYPROJECT}`);
|
|
|
528
557
|
{ value: "javascript", label: "JavaScript", hint: "npm + biome" }
|
|
529
558
|
]
|
|
530
559
|
});
|
|
531
|
-
return
|
|
560
|
+
return p3.isCancel(choice) ? null : choice;
|
|
532
561
|
}
|
|
533
562
|
};
|
|
534
563
|
|
|
@@ -540,6 +569,8 @@ var cli = new Cli({
|
|
|
540
569
|
});
|
|
541
570
|
cli.register(InitCommand);
|
|
542
571
|
cli.register(CodeFastInitCommand);
|
|
572
|
+
cli.register(AgentInitCommand);
|
|
573
|
+
cli.register(AgentsCommand);
|
|
543
574
|
cli.register(Builtins.HelpCommand);
|
|
544
575
|
cli.register(Builtins.VersionCommand);
|
|
545
576
|
cli.runExit(process.argv.slice(2));
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mokout-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Quick scaffolding for agentic AI projects — uv/npm, Claude-ready CLAUDE.md, and modern tooling in one command.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"packageManager": "pnpm@8.15.6",
|
|
8
7
|
"author": "Mohan Tupakula <tmskoushik@gmail.com>",
|
|
9
8
|
"bin": {
|
|
10
9
|
"mokout": "dist/cli.js",
|
|
@@ -24,7 +23,8 @@
|
|
|
24
23
|
"typecheck": "tsc --noEmit",
|
|
25
24
|
"lint": "biome check .",
|
|
26
25
|
"format": "biome check --write .",
|
|
27
|
-
"prepublishOnly": "
|
|
26
|
+
"prepublishOnly": "npm run build",
|
|
27
|
+
"postinstall": "uv tool install google-agents-cli"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@clack/prompts": "^0.7.0",
|