argsbarg 6.1.10 → 6.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/CHANGELOG.md +10 -1
- package/README.md +43 -41
- package/docs/README.md +3 -2
- package/docs/ai-skills.md +36 -23
- package/docs/cli-program.md +12 -11
- package/docs/config-schema.md +3 -3
- package/docs/configure.md +12 -16
- package/docs/developing.md +6 -6
- package/docs/mcp.md +21 -57
- package/docs/output-schema.md +2 -2
- package/examples/formats.ts +5 -6
- package/examples/full-example/README.md +7 -69
- package/examples/full-example/docs/cli-schema.json +1 -1659
- package/examples/full-example/docs/cli.md +2 -1538
- package/examples/full-example/docs/http.md +0 -7
- package/examples/full-example/docs/mcp.md +23 -59
- package/examples/full-example/docs/openapi.json +2 -782
- package/examples/full-example/docs/skill.md +18 -14
- package/examples/full-example/justfile +5 -17
- package/examples/full-example/scripts/create-identity.ts +2 -1
- package/examples/full-example/src/commands/status/command.test.ts +2 -2
- package/examples/full-example/src/commands/status/command.ts +7 -6
- package/examples/full-example/src/program.ts +4 -10
- package/examples/full-example-json/Formula/.gitkeep +0 -0
- package/examples/full-example-json/Formula/full-example-json.rb +35 -0
- package/examples/full-example-json/README.md +27 -0
- package/examples/full-example-json/biome.json +22 -0
- package/examples/full-example-json/bun.lock +48 -0
- package/examples/full-example-json/docs/README.md +27 -0
- package/examples/full-example-json/docs/cli-schema.json +2145 -0
- package/examples/full-example-json/docs/cli.md +1990 -0
- package/examples/full-example-json/docs/http.md +92 -0
- package/examples/full-example-json/docs/mcp.md +116 -0
- package/examples/full-example-json/docs/openapi.json +1246 -0
- package/examples/full-example-json/docs/skill.md +57 -0
- package/examples/full-example-json/justfile +171 -0
- package/examples/full-example-json/package.json +22 -0
- package/examples/full-example-json/scripts/create-identity.ts +12 -0
- package/examples/full-example-json/scripts/dev-formula.ts +97 -0
- package/examples/full-example-json/scripts/formula-shared.test.ts +68 -0
- package/examples/full-example-json/scripts/formula-shared.ts +170 -0
- package/examples/full-example-json/scripts/print-identity.ts +28 -0
- package/examples/full-example-json/scripts/release.ts +212 -0
- package/examples/full-example-json/src/commands/echo/command.ts +26 -0
- package/examples/full-example-json/src/commands/status/command.test.ts +10 -0
- package/examples/full-example-json/src/commands/status/command.ts +28 -0
- package/examples/full-example-json/src/index.ts +10 -0
- package/examples/full-example-json/src/program.ts +33 -0
- package/examples/full-example-json/src/types/md.d.ts +4 -0
- package/examples/full-example-json/tsconfig.json +17 -0
- package/examples/minimal.ts +17 -17
- package/examples/nested.ts +10 -10
- package/examples/option-required.ts +13 -13
- package/examples/servers.ts +10 -10
- package/index.d.ts +17 -43
- package/package.json +1 -1
- package/src/cli-tool/create.test.ts +44 -68
- package/src/cli-tool/create.ts +81 -17
- package/src/cli-tool/full-example-capabilities.test.ts +33 -18
- package/src/cli-tool/post-create.ts +31 -17
- package/src/cli-tool/program.ts +16 -7
- package/src/cli-tool/prompt.ts +27 -0
- package/src/cli-tool/run-create.ts +19 -7
- package/src/cli-tool/schemagen/schemagen.test.ts +3 -3
- package/src/configure/artifacts/install-validate.test.ts +20 -33
- package/src/configure/artifacts/paths.ts +9 -53
- package/src/configure/artifacts/status.test.ts +13 -16
- package/src/configure/artifacts/status.ts +5 -22
- package/src/configure/artifacts/target-base.ts +6 -15
- package/src/configure/artifacts/target-effective.ts +16 -54
- package/src/configure/artifacts/target-mcp-json.ts +2 -5
- package/src/configure/artifacts/target-registry.ts +0 -7
- package/src/configure/artifacts/target-scope.ts +7 -17
- package/src/configure/artifacts/target-skill.ts +6 -15
- package/src/configure/artifacts/target-types.ts +6 -54
- package/src/configure/artifacts/targets/agents-mcp.ts +11 -0
- package/src/configure/artifacts/targets/configure.ts +1 -5
- package/src/configure/artifacts/targets/index.ts +4 -44
- package/src/configure/artifacts/targets/skill.ts +12 -0
- package/src/configure/artifacts/targets.test.ts +21 -59
- package/src/configure/configure.test.ts +35 -46
- package/src/configure/index.ts +19 -19
- package/src/configure/prompt.ts +2 -12
- package/src/core/parse.test.ts +21 -32
- package/src/core/types.ts +18 -44
- package/src/core/validate.ts +28 -45
- package/src/docs/docs.test.ts +4 -4
- package/src/docs/mcp-guide.ts +41 -71
- package/src/docs/resolve.ts +1 -1
- package/src/exports/cli.ts +1 -1
- package/src/index.ts +1 -1
- package/src/skill/generate.ts +26 -45
- package/src/skill/install.ts +18 -38
- package/src/skill/naming.ts +3 -27
- package/src/test/integration/config.test.ts +3 -3
- package/src/test/integration/mcp.test.ts +4 -4
- package/{examples/mcp-test.ts → src/test/mcp-integration-fixture.ts} +20 -22
- package/src/configure/artifacts/target-mcp-cli.ts +0 -127
- package/src/configure/artifacts/targets/chatgpt-mcp.ts +0 -12
- package/src/configure/artifacts/targets/claude-code-mcp.ts +0 -15
- package/src/configure/artifacts/targets/claude-desktop-mcp.ts +0 -12
- package/src/configure/artifacts/targets/claude-skill.ts +0 -16
- package/src/configure/artifacts/targets/codex-mcp.ts +0 -25
- package/src/configure/artifacts/targets/codex-skill.ts +0 -14
- package/src/configure/artifacts/targets/cursor-mcp.ts +0 -15
- package/src/configure/artifacts/targets/cursor-skill.ts +0 -16
- package/src/configure/artifacts/targets/openclaw-mcp.ts +0 -25
- package/src/configure/artifacts/targets/openclaw-skill.ts +0 -17
- package/src/configure/artifacts/targets/opencode-mcp.ts +0 -96
- package/src/configure/artifacts/targets/opencode-skill.ts +0 -15
- /package/examples/{full-example → full-example-json}/src/commands/render-json/__generated__/RenderJsonInputSchema.json +0 -0
- /package/examples/{full-example → full-example-json}/src/commands/render-json/__generated__/index.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/commands/render-json/command.test.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/commands/render-json/command.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/commands/render-json/types.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/commands/status/__generated__/StatusJsonOutputSchema.json +0 -0
- /package/examples/{full-example → full-example-json}/src/commands/status/__generated__/index.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/commands/status/types.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/commands/workspaces/__generated__/WorkspaceNameInputSchema.json +0 -0
- /package/examples/{full-example → full-example-json}/src/commands/workspaces/__generated__/index.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/commands/workspaces/command.test.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/commands/workspaces/command.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/commands/workspaces/types.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/db/index.test.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/db/index.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/db/migrate.test.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/db/migrate.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/db/migrations/001_workspaces.sql +0 -0
- /package/examples/{full-example → full-example-json}/src/db/tables/workspaces.ts +0 -0
- /package/examples/{full-example → full-example-json}/src/types/argsbarg.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [6.2.0] - 2026-07-30
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Breaking: two `argsbarg create` templates** — default `cli` template (`examples/full-example`) is CLI-centric (MCP, HTTP, configure, skills; no schemagen). Schema-first template (`examples/full-example-json`) keeps `@sg` schemagen, `inputSchema`/`outputSchema`, REST CRUD, and in-memory SQLite. Interactive create shows an A/B template picker; `--template cli|json` for non-interactive use. `create-identity.ts` records `template` for `--check` drift detection.
|
|
15
|
+
- **Experimental: agent skill install** — single opt-in target via `program.skill: { enabled: true }` installs to `~/.agents/skills/<key>/` (no per-host skill targets). Brew `post_install` sync installs the skill when enabled. Removed `configure.agentIntegration` and per-host skill keys (`cursorSkill`, etc.).
|
|
16
|
+
- **Experimental: .agents protocol–only agent install** — MCP configure install writes only `~/.agents/mcp.json` when `mcpServer.enabled` (included in `configure --sync` automatically, parallel to `skill.enabled`). Removed vendor MCP auto-install (Cursor, Claude, Codex, OpenCode, OpenClaw, ChatGPT). Removed `configure.targets.*Mcp`; use `mcpServer.enabled`. Skill bundle adds protocol `skill.md` (+ `SKILL.md` compatibility copy). Docs and generated `docs mcp` document manual Cursor/Claude/Desktop MCP setup and Claude Code skill symlink.
|
|
17
|
+
|
|
10
18
|
## [6.1.10] - 2026-07-29
|
|
11
19
|
|
|
12
20
|
### Changed
|
|
@@ -885,7 +893,8 @@ const cli = { ... } satisfies CliProgram; // or : CliProgram
|
|
|
885
893
|
- Migrate schemas: rename every `children` property to **`commands`**; move positional definitions to **`CliPositional`** objects on `positionals` and strip `positional` / `argMin` / `argMax` from flag definitions under `options` (flags only carry `name`, `description`, `kind`, and optional `shortName`).
|
|
886
894
|
- Imports: use `CliPositional` where needed; replace `CliOptionDef` with `CliOption` or `CliPositional` as appropriate.
|
|
887
895
|
|
|
888
|
-
[Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v6.
|
|
896
|
+
[Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v6.2.0...HEAD
|
|
897
|
+
[6.2.0]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.2.0
|
|
889
898
|
[6.1.10]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.10
|
|
890
899
|
[6.1.9]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.9
|
|
891
900
|
[6.1.8]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.8
|
package/README.md
CHANGED
|
@@ -52,9 +52,23 @@ $ myapp http
|
|
|
52
52
|
import { Cli, type CliProgram, CliOptionKind } from "argsbarg";
|
|
53
53
|
|
|
54
54
|
const program = {
|
|
55
|
-
key: "helloapp",
|
|
56
|
-
version: "1.0.0",
|
|
57
55
|
description: "Tiny demo.",
|
|
56
|
+
handler: async (ctx) => {
|
|
57
|
+
const name = ctx.args[0] ?? "world";
|
|
58
|
+
if (ctx.hasFlag("verbose")) {
|
|
59
|
+
console.log("verbose mode");
|
|
60
|
+
}
|
|
61
|
+
console.log(`hello ${name}`);
|
|
62
|
+
},
|
|
63
|
+
key: "helloapp",
|
|
64
|
+
options: [
|
|
65
|
+
{
|
|
66
|
+
name: "verbose",
|
|
67
|
+
description: "Enable extra logging.",
|
|
68
|
+
kind: CliOptionKind.Presence,
|
|
69
|
+
shortName: "v",
|
|
70
|
+
},
|
|
71
|
+
],
|
|
58
72
|
positionals: [
|
|
59
73
|
{
|
|
60
74
|
name: "name",
|
|
@@ -64,21 +78,7 @@ const program = {
|
|
|
64
78
|
argMax: 1,
|
|
65
79
|
},
|
|
66
80
|
],
|
|
67
|
-
|
|
68
|
-
{
|
|
69
|
-
name: "verbose",
|
|
70
|
-
description: "Enable extra logging.",
|
|
71
|
-
kind: CliOptionKind.Presence,
|
|
72
|
-
shortName: "v",
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
handler: async (ctx) => {
|
|
76
|
-
const name = ctx.args[0] ?? "world";
|
|
77
|
-
if (ctx.hasFlag("verbose")) {
|
|
78
|
-
console.log("verbose mode");
|
|
79
|
-
}
|
|
80
|
-
console.log(`hello ${name}`);
|
|
81
|
-
},
|
|
81
|
+
version: "1.0.0",
|
|
82
82
|
} satisfies CliProgram;
|
|
83
83
|
|
|
84
84
|
const cli = new Cli(program);
|
|
@@ -170,11 +170,11 @@ Nested command paths map directly to standard REST paths (e.g., `v1 invoices ren
|
|
|
170
170
|
|
|
171
171
|
```typescript
|
|
172
172
|
const cli = {
|
|
173
|
-
|
|
174
|
-
version: "1.0.0",
|
|
173
|
+
commands: [/* ... */],
|
|
175
174
|
description: "My service.",
|
|
176
175
|
httpServer: { enabled: true, port: 3000 },
|
|
177
|
-
|
|
176
|
+
key: "myapp",
|
|
177
|
+
version: "1.0.0",
|
|
178
178
|
} satisfies CliProgram;
|
|
179
179
|
```
|
|
180
180
|
|
|
@@ -284,19 +284,20 @@ Check the `examples/` directory for full working scripts:
|
|
|
284
284
|
|
|
285
285
|
| Example | File | Shows |
|
|
286
286
|
| --------------------- | ------------------------ | ------------------------------------------------------------------------------------------------- |
|
|
287
|
-
| `ArgsBargMinimal` | `examples/minimal.ts` |
|
|
287
|
+
| `ArgsBargMinimal` | `examples/minimal.ts` | Smallest embeddable CLI (not a copy template). |
|
|
288
288
|
| `ArgsBargNested` | `examples/nested.ts` | Nested command tree, positional tails, async handlers. |
|
|
289
289
|
| `ArgsBargFormats` | `examples/formats.ts` | `CliValueFormat`, `default`, `ctx.inputs`. |
|
|
290
|
-
| `ArgsBargFullExample` | `examples/full-example/` | **
|
|
290
|
+
| `ArgsBargFullExample` | `examples/full-example/` | **Default copy template:** all builtins, Homebrew justfile; options/flags only (no schemagen). |
|
|
291
|
+
| `ArgsBargFullExampleJson` | `examples/full-example-json/` | **Schema-first copy template:** `@sg`, `inputSchema`/`outputSchema`, REST CRUD, SQLite. |
|
|
291
292
|
|
|
292
293
|
|
|
293
294
|
Examples ship in the npm package under `node_modules/argsbarg/examples/`.
|
|
294
295
|
|
|
295
296
|
## Bootstrap a new CLI
|
|
296
297
|
|
|
297
|
-
Copy
|
|
298
|
+
Copy a shipped template into a new directory (`cli` default, or `json` for schema-first):
|
|
298
299
|
|
|
299
|
-
Interactive (TTY):
|
|
300
|
+
Interactive (TTY) — pick template A/B, then key and release repo:
|
|
300
301
|
|
|
301
302
|
```bash
|
|
302
303
|
bunx argsbarg create my-cli
|
|
@@ -306,12 +307,21 @@ Non-interactive:
|
|
|
306
307
|
|
|
307
308
|
```bash
|
|
308
309
|
bunx argsbarg create my-cli \
|
|
310
|
+
--template cli \
|
|
309
311
|
--key my-cli --release-repo org/my-cli --yes
|
|
310
312
|
```
|
|
311
313
|
|
|
314
|
+
Schema-first (`@sg`, JSON schemas, REST CRUD demo):
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
bunx argsbarg create my-api \
|
|
318
|
+
--template json \
|
|
319
|
+
--key my-api --release-repo org/my-api --yes
|
|
320
|
+
```
|
|
321
|
+
|
|
312
322
|
Edit `scripts/create-identity.ts` in the new repo to set `desc` (used by `program.description` and the Homebrew formula).
|
|
313
323
|
|
|
314
|
-
`create` copies the template (including `.cursor/rules/cli-program.mdc`), substitutes `{key}` / `{tap}` / `{releaseRepo}` placeholders
|
|
324
|
+
`create` copies the template (including `.cursor/rules/cli-program.mdc`), substitutes `{key}` / `{tap}` / `{releaseRepo}` placeholders, runs `bun install`, `argsbarg schemagen` (json template only), `bun test`, and `git init` + Initial commit when appropriate.
|
|
315
325
|
|
|
316
326
|
**Git bootstrap:** skipped when the target already has a `.git` directory, or when the target sits inside an existing git work tree (monorepo subfolder). Standalone new directories get an `Initial commit`.
|
|
317
327
|
|
|
@@ -319,24 +329,16 @@ Verify an existing tree: `bunx argsbarg create --check .`
|
|
|
319
329
|
|
|
320
330
|
To refresh Cursor rules in an existing consumer: `bun scripts/merge-cli-program-rule.ts .` and `bun scripts/merge-code-rule.ts .` from an argsbarg checkout (or pass the npm package path to the template).
|
|
321
331
|
|
|
322
|
-
### What the
|
|
332
|
+
### What the copy templates include
|
|
323
333
|
|
|
334
|
+
Both templates ship all builtins (`completion`, `version`, `configure`, `docs`, `mcp`, `http`), Homebrew `justfile` + formula scripts, and `.cursor/rules/`.
|
|
324
335
|
|
|
325
|
-
|
|
|
326
|
-
|
|
|
327
|
-
|
|
|
328
|
-
|
|
|
329
|
-
| `outputSchema` | `src/commands/status/types.ts` → `StatusJsonOutputSchema` from `__generated__/` |
|
|
330
|
-
| Schemagen | `just schemagen` → `argsbarg schemagen` (justfile exports `node_modules/.bin` on `PATH`) |
|
|
331
|
-
| Command layout | `src/commands/<name>/command.ts`; registration in `src/program.ts` |
|
|
332
|
-
| MCP doc topics | `docs.topics` auto-exposed as `<key>://docs/<topic>` resources when docs + MCP enabled |
|
|
333
|
-
| Package import | `from "argsbarg"` (not relative to argsbarg `src/`) |
|
|
334
|
-
| Homebrew distribution | `scripts/formula-shared.ts`, `scripts/dev-formula.ts`, `Formula/`, `justfile` |
|
|
335
|
-
| Dev tooling | Biome (`just format` / `just lint`), TypeScript, colocated tests |
|
|
336
|
-
| Cursor rules | `.cursor/rules/cli-program.mdc`, `.cursor/rules/code.mdc` |
|
|
337
|
-
|
|
336
|
+
| Template | Path | Adds beyond builtins |
|
|
337
|
+
| --- | --- | --- |
|
|
338
|
+
| **cli** (default) | `examples/full-example/` | `echo`, `status` — options/flags only; no schemagen |
|
|
339
|
+
| **json** | `examples/full-example-json/` | `@sg` schemagen, `inputSchema`/`outputSchema`, `render-json`, `workspaces` REST CRUD, in-memory SQLite |
|
|
338
340
|
|
|
339
|
-
|
|
341
|
+
Package import: `from "argsbarg"` (not relative to argsbarg `src/`).
|
|
340
342
|
|
|
341
343
|
```bash
|
|
342
344
|
export PATH="$PATH:$(pwd)/examples"
|
|
@@ -385,7 +387,7 @@ This acts as a "tripwire" that instructs AI agents in your workspace to read Arg
|
|
|
385
387
|
|
|
386
388
|
### 3. Generated Skills & Workspace Configuration
|
|
387
389
|
|
|
388
|
-
Running `myapp configure`
|
|
390
|
+
Running `myapp configure --sync` installs a compact `SKILL.md` index and full-reference `reference.md` to `~/.agents/skills/<key>/` when `program.skill: { enabled: true }`.
|
|
389
391
|
|
|
390
392
|
See **[docs/configure.md](docs/configure.md)** and **[docs/ai-skills.md](docs/ai-skills.md)** for developer setup and automated Homebrew pipeline integration.
|
|
391
393
|
|
package/docs/README.md
CHANGED
|
@@ -27,7 +27,8 @@ Examples are included in the npm tarball (`package.json` `files`). After `bun ad
|
|
|
27
27
|
| Tier | Path | Use when |
|
|
28
28
|
| --- | --- | --- |
|
|
29
29
|
| Learn | [examples/minimal.ts](../examples/minimal.ts), [examples/nested.ts](../examples/nested.ts), [formats.ts](../examples/formats.ts) | One feature at a time |
|
|
30
|
-
| **Copy** | [examples/full-example/](../examples/full-example/) |
|
|
30
|
+
| **Copy (CLI)** | [examples/full-example/](../examples/full-example/) | Default `create` template — all builtins, Homebrew justfile; no schemagen |
|
|
31
|
+
| **Copy (JSON)** | [examples/full-example-json/](../examples/full-example-json/) | `create --template json` — `@sg`, schemas, REST CRUD, SQLite |
|
|
31
32
|
|
|
32
33
|
## Framework docs vs consumer docgen
|
|
33
34
|
|
|
@@ -35,6 +36,6 @@ Examples are included in the npm tarball (`package.json` `files`). After `bun ad
|
|
|
35
36
|
| --- | --- | --- |
|
|
36
37
|
| **Framework docs** | How argsbarg works; authoring conventions | This directory — shipped in `node_modules/argsbarg/docs/` after `bun add argsbarg` |
|
|
37
38
|
| **Consumer docgen** | *Your* command tree, API, MCP guide for *your* app | `myapp docs cli`, `docs cli-schema`, `docs mcp` — written to `./docs/` with `--save` |
|
|
38
|
-
| **Cursor rule** | Thin tripwire telling agents to read framework docs | `node_modules/argsbarg/examples/full-example/.cursor/rules/cli-program.mdc` —
|
|
39
|
+
| **Cursor rule** | Thin tripwire telling agents to read framework docs | `node_modules/argsbarg/examples/full-example-json/.cursor/rules/cli-program.mdc` — merge default for consumers; `create` includes a template copy |
|
|
39
40
|
|
|
40
41
|
Agents do **not** load `node_modules/argsbarg/docs/` unless your repo references them (Cursor rule, `AGENTS.md`, or an `alwaysApply` project rule). Generated `./docs/cli.md` in a consumer repo describes **your** CLI, not argsbarg itself.
|
package/docs/ai-skills.md
CHANGED
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
> This feature is experimental.
|
|
4
4
|
|
|
5
|
-
ArgsBarg can generate
|
|
5
|
+
ArgsBarg can generate agent skill directories (`skill.md` + `reference.md`) from your CLI schema and install them to `~/.agents/skills/<key>/` per the [.agents protocol](https://dotagentsprotocol.com/).
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Enable on the program root
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
```typescript
|
|
10
|
+
export const program = {
|
|
11
|
+
key: "myapp",
|
|
12
|
+
skill: { enabled: true },
|
|
13
|
+
...
|
|
14
|
+
} satisfies CliProgram;
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
When `skill.enabled` is `true`, Homebrew `post_install` (`configure --sync --yes`) installs and refreshes the skill. When omitted or `enabled` is not `true`, no skill is installed.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
- Claude Code: `~/.claude/skills/<dir>/` when `~/.claude` exists
|
|
21
|
-
- Codex: `~/.codex/skills/<dir>/` when `codex` is on PATH
|
|
22
|
-
- OpenCode: `~/.config/opencode/skills/<dir>/`
|
|
23
|
-
- OpenClaw: `~/.openclaw/skills/<dir>/` when `openclaw` is on PATH
|
|
19
|
+
The skill directory name is the program `key` with `/`, `\`, and spaces replaced by `_` (e.g. `sqsp-qa`, `full-example`).
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
## Install via `configure --sync`
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
myapp configure --sync --yes
|
|
25
|
+
```
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Skills are not prompted during interactive `configure` — install and uninstall are automatic when `skill.enabled` is set (brew install/uninstall and `--sync` / `--remove-all`).
|
|
28
28
|
|
|
29
29
|
## Programmatic install
|
|
30
30
|
|
|
@@ -32,28 +32,41 @@ Existing skill directories are removed and rewritten on each install.
|
|
|
32
32
|
import { cliSkillInstall } from "argsbarg/skill/install"; // internal module
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
`cliSkillInstall(root, { global: true, rimraf: true })` returns changed file paths.
|
|
36
36
|
|
|
37
37
|
## Generated content
|
|
38
38
|
|
|
39
|
-
- **`
|
|
39
|
+
- **`skill.md`** — [.agents protocol](https://dotagentsprotocol.com/) frontmatter (`id`, `name`, `description`, `enabled`), compact command index, pitfalls, client setup, and a pointer to `reference.md`
|
|
40
|
+
- **`SKILL.md`** — compatibility copy of `skill.md` for tools that expect uppercase filenames
|
|
40
41
|
- **`reference.md`** — full `docs cli` markdown reference
|
|
41
42
|
|
|
42
|
-
Installed files include an HTML comment hint (`Generated by myapp configure; do not edit.`) after
|
|
43
|
+
Installed files include an HTML comment hint (`Generated by myapp configure; do not edit.`) after skill frontmatter and at the top of `reference.md`.
|
|
44
|
+
|
|
45
|
+
## Client setup
|
|
46
|
+
|
|
47
|
+
| Client | Skill path |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| Cursor, Codex, Copilot, most agents | `~/.agents/skills/<key>/` (auto via `configure --sync`) |
|
|
50
|
+
| Claude Code | Manual symlink to `~/.claude/skills/<key>/` |
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
mkdir -p ~/.claude/skills
|
|
54
|
+
ln -sf ~/.agents/skills/<key> ~/.claude/skills/<key>
|
|
55
|
+
```
|
|
43
56
|
|
|
44
|
-
Skills describe **shell invocation only** — no MCP setup
|
|
57
|
+
Skills describe **shell invocation only** — no MCP setup or `tools/call` guidance. Use **`myapp docs mcp`** (when `docs` and `mcpServer` are enabled) or connect the MCP server for agent execution.
|
|
45
58
|
|
|
46
59
|
## MCP vs skills vs docs
|
|
47
60
|
|
|
48
61
|
| Mechanism | Role |
|
|
49
62
|
| --- | --- |
|
|
50
63
|
| **`myapp mcp`** (requires `mcpServer`) | Runtime tool execution over MCP |
|
|
51
|
-
| **`
|
|
64
|
+
| **`program.skill.enabled`** + **`configure --sync`** | Persists optimized skill bundle at `~/.agents/skills/<key>/` |
|
|
52
65
|
| **`myapp docs`** (requires `docs`) | Bundled markdown on stdout (`docs mcp` when MCP enabled) |
|
|
53
66
|
|
|
54
|
-
`
|
|
67
|
+
`skill.md` is the routing index; `reference.md` matches `docs cli`. Prefer `configure --sync` over `docs skill` for installed agents. See [cli-program.md](cli-program.md).
|
|
55
68
|
|
|
56
|
-
**Claude Code plugin** (`mcpServer.claudePlugin: true` → `mcp bundle` writes `dist/claude-plugin/<name>.zip`) ships a separate MCP pointer skill (`SKILL.md` only) that routes agents to the bundled MCP server. This is a **dist artifact**, not installed via `configure`.
|
|
69
|
+
**Claude Code plugin** (`mcpServer.claudePlugin: true` → `mcp bundle` writes `dist/claude-plugin/<name>.zip`) ships a separate MCP pointer skill (`SKILL.md` only) that routes agents to the bundled MCP server. This is a **dist artifact**, not installed via `configure`.
|
|
57
70
|
|
|
58
71
|
See also:
|
|
59
72
|
|
package/docs/cli-program.md
CHANGED
|
@@ -8,10 +8,6 @@ ArgsBarg turns your schema into help, shell completions, MCP tools, and agent sk
|
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
10
|
const cli = {
|
|
11
|
-
key: "myapp",
|
|
12
|
-
version: "1.0.0",
|
|
13
|
-
description: "One-line summary of what the CLI does.",
|
|
14
|
-
mcpServer: { enabled: true },
|
|
15
11
|
commands: [
|
|
16
12
|
{
|
|
17
13
|
key: "greet",
|
|
@@ -22,6 +18,10 @@ const cli = {
|
|
|
22
18
|
handler: async (ctx) => { /* ... */ },
|
|
23
19
|
},
|
|
24
20
|
],
|
|
21
|
+
description: "One-line summary of what the CLI does.",
|
|
22
|
+
key: "myapp",
|
|
23
|
+
mcpServer: { enabled: true },
|
|
24
|
+
version: "1.0.0",
|
|
25
25
|
} satisfies CliProgram;
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -31,11 +31,11 @@ No `mcpTool` blocks required. Every leaf becomes an MCP tool; `inputSchema` come
|
|
|
31
31
|
|
|
32
32
|
```typescript
|
|
33
33
|
const cli = {
|
|
34
|
-
|
|
35
|
-
version: "1.0.0",
|
|
34
|
+
commands: [/* ... */],
|
|
36
35
|
description: "One-line summary of what the CLI does.",
|
|
37
36
|
httpServer: { enabled: true }, // myapp api → http://127.0.0.1:3000
|
|
38
|
-
|
|
37
|
+
key: "myapp",
|
|
38
|
+
version: "1.0.0",
|
|
39
39
|
} satisfies CliProgram;
|
|
40
40
|
```
|
|
41
41
|
|
|
@@ -90,7 +90,7 @@ export const reserveCommand = {
|
|
|
90
90
|
|
|
91
91
|
Use a **parameterized factory** only when the schema truly depends on inputs (e.g. `createUpsertCommand(deps)` for tests or injected config). A `reserveCommand()` that returns a static literal adds indirection without benefit.
|
|
92
92
|
|
|
93
|
-
**`satisfies CliProgram`** on the root (or **`satisfies CliLeaf`** / router type on extracted modules) preserves type-checking whether inline or not.
|
|
93
|
+
**`satisfies CliProgram`** on the root (or **`satisfies CliLeaf`** / router type on extracted modules) preserves type-checking whether inline or not. Keep **program-root fields in alphabetical order** (`appConfig`, `commands`, `description`, `docs`, `hooks`, `httpServer`, `key`, `mcpServer`, `readiness`, `skill`, `version`, …).
|
|
94
94
|
|
|
95
95
|
## Descriptions
|
|
96
96
|
|
|
@@ -541,8 +541,9 @@ await cli.run();
|
|
|
541
541
|
- **Strict:** unknown keys rejected on load.
|
|
542
542
|
- **CLI:** missing required config exits 1 before the leaf handler (TTY prompt when interactive). Built-in `docs` and `configure get`/`set` skip this exit.
|
|
543
543
|
- **MCP:** server stays up; missing config returns `isError: true` at `tools/call`.
|
|
544
|
-
- **Configure:** interactive `configure` runs the app config wizard; **`configure --sync`** refreshes agent artifacts.
|
|
545
|
-
- **Agent
|
|
544
|
+
- **Configure:** interactive `configure` runs the app config wizard; **`configure --sync`** refreshes agent artifacts to `~/.agents/` ([.agents protocol](https://dotagentsprotocol.com/)).
|
|
545
|
+
- **Agent skill:** `program.skill: { enabled: true }` installs to `~/.agents/skills/<key>/` on `configure --sync`; see [configure.md](configure.md) and [ai-skills.md](ai-skills.md).
|
|
546
|
+
- **MCP install:** `mcpServer: { enabled: true }` merges into `~/.agents/mcp.json` on `configure --sync`; manual Cursor/Claude setup in [mcp.md](mcp.md).
|
|
546
547
|
|
|
547
548
|
See [config-schema.md](config-schema.md) for codegen, [configure.md](configure.md) (`configure.targets`), and [mcp.md](mcp.md).
|
|
548
549
|
|
|
@@ -583,7 +584,7 @@ If you maintain argsbarg from a sibling checkout, `just consumer-dev` / `just co
|
|
|
583
584
|
|
|
584
585
|
3. **Optional:** a separate rule (e.g. `.cursor/argsbarg.mdc` or `AGENTS.md`) for broader package API notes.
|
|
585
586
|
|
|
586
|
-
**Not this file:** `myapp configure` writes the **app** skill (`SKILL.md` under `~/.
|
|
587
|
+
- **Not this file:** `myapp configure --sync` writes the **app** skill (`SKILL.md` under `~/.agents/skills/<key>/`) from your command schema — how to *invoke* the CLI. The rule above is for *authoring* argsbarg schema.
|
|
587
588
|
|
|
588
589
|
## See also
|
|
589
590
|
|
package/docs/config-schema.md
CHANGED
|
@@ -224,9 +224,9 @@ Object/array/`$ref` properties require `--json` on `configure set` when comma-se
|
|
|
224
224
|
|
|
225
225
|
| Example | Role |
|
|
226
226
|
| --- | --- |
|
|
227
|
-
| [`examples/full-example/`](../examples/full-example/) | **
|
|
227
|
+
| [`examples/full-example-json/`](../examples/full-example-json/) | **Schema-first copy template** — `@sg` schemagen, builtins; optional `program.appConfig` |
|
|
228
228
|
|
|
229
229
|
```bash
|
|
230
|
-
cd examples/full-example && just setup && just schemagen
|
|
231
|
-
|
|
230
|
+
cd examples/full-example-json && just setup && just schemagen
|
|
231
|
+
FULL_EXAMPLE_JSON_API_TOKEN=dev just run configure get apiToken --json
|
|
232
232
|
```
|
package/docs/configure.md
CHANGED
|
@@ -68,10 +68,8 @@ Non-interactive / CI: pass **`--yes`** (or **`--json`**, **`--sync`**, **`--remo
|
|
|
68
68
|
| --- | --- | --- |
|
|
69
69
|
| Binary | skipped (read-only) | Homebrew formula `bin.install` |
|
|
70
70
|
| Shell completions | skipped | Homebrew `generate_completions_from_executable` |
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
| Codex / OpenCode / OpenClaw skills | Y/n prompt | Agent-specific dirs when available |
|
|
74
|
-
| MCP config | Y/n prompt when `mcpServer.enabled` | Cursor, Claude Code/Desktop, OpenCode, Codex, OpenClaw, ChatGPT desktop |
|
|
71
|
+
| Agent skill | skipped (automatic) | `~/.agents/skills/<key>/` when `program.skill.enabled` |
|
|
72
|
+
| MCP config | skipped (automatic) | `~/.agents/mcp.json` when `mcpServer.enabled` ([.agents protocol](https://dotagentsprotocol.com/)) |
|
|
75
73
|
| App config | auto-runs wizard | Interactive wizard may update `~/.local/lib/<key>/config.json` when values change; `--sync` bootstraps an empty file on install |
|
|
76
74
|
|
|
77
75
|
### Externally managed binary (Homebrew)
|
|
@@ -79,37 +77,35 @@ Non-interactive / CI: pass **`--yes`** (or **`--json`**, **`--sync`**, **`--remo
|
|
|
79
77
|
When **`PATH`** resolves the program key to the **running executable** (e.g. after `brew install`):
|
|
80
78
|
|
|
81
79
|
- **`configure --status`** shows `app: system (PATH)`
|
|
82
|
-
-
|
|
80
|
+
- **`configure --sync`** refreshes the agent skill (when `program.skill.enabled`) and merges MCP into `~/.agents/mcp.json` (when `mcpServer.enabled`); also creates `~/.local/lib/<key>/config.json` as `{}` when missing (all apps)
|
|
83
81
|
|
|
84
|
-
MCP config uses the command name on **`PATH`**, not a Cellar path.
|
|
82
|
+
MCP config uses the command name on **`PATH`**, not a Cellar path. For Cursor, Claude Code, and Claude Desktop, copy the `mcpServers` entry manually — see [mcp.md](mcp.md) and `docs mcp`.
|
|
85
83
|
|
|
86
84
|
### Interactive default
|
|
87
85
|
|
|
88
|
-
Bare **`configure`** (TTY required)
|
|
86
|
+
Bare **`configure`** (TTY required) runs the app config wizard when `program.appConfig` has entries. Agent skills and MCP are **not** prompted — they install automatically via brew `post_install` / `--sync` when `program.skill.enabled` or `mcpServer.enabled` respectively.
|
|
89
87
|
|
|
90
|
-
|
|
91
|
-
- **Installed:** `[y/N]` — default keep; `n` uninstalls.
|
|
92
|
-
- **App config** (`program.appConfig` with entries): runs the config wizard automatically (no Y/n gate). Remove the config file with **`configure --remove-config --yes`**.
|
|
88
|
+
Remove the config file with **`configure --remove-config --yes`**.
|
|
93
89
|
|
|
94
|
-
The **`app`**
|
|
90
|
+
The **`app`** and **`skill`** / **`agentsMcp`** targets are shown in `--status` only — never mutated by interactive `configure` (use `--sync` / brew hooks).
|
|
95
91
|
|
|
96
92
|
### `configure.targets`
|
|
97
93
|
|
|
98
|
-
|
|
94
|
+
Optional gates for app binary status and app-config wizard participation in `--sync`:
|
|
99
95
|
|
|
100
96
|
```typescript
|
|
97
|
+
skill: { enabled: true },
|
|
98
|
+
mcpServer: { enabled: true },
|
|
101
99
|
configure: {
|
|
102
|
-
agentIntegration: "mcp", // | "skill" | "both" — default from mcpServer.enabled
|
|
103
100
|
targets: {
|
|
104
|
-
|
|
105
|
-
cursorSkill: { includedInAll: true },
|
|
101
|
+
configure: { includedInAll: true }, // optional: app config wizard on --sync
|
|
106
102
|
},
|
|
107
103
|
},
|
|
108
104
|
```
|
|
109
105
|
|
|
110
106
|
`ConfigureTargetSpec` is `boolean` or `{ enabled?: boolean; includedInAll?: boolean }`.
|
|
111
107
|
|
|
112
|
-
Artifact keys: `
|
|
108
|
+
Artifact keys: `app`, `configure`. Legacy `configure.targets.*Mcp` keys are rejected — MCP installs to `~/.agents/mcp.json` when `mcpServer.enabled`.
|
|
113
109
|
|
|
114
110
|
## App config (`program.appConfig`)
|
|
115
111
|
|
package/docs/developing.md
CHANGED
|
@@ -38,7 +38,7 @@ Sibling consumer repos (machine-specific paths in the root `justfile` `consumer_
|
|
|
38
38
|
|
|
39
39
|
`consumers-sync` reads the version from **this repo’s** `package.json` — not npm. Run it **after** `just release` so consumers pin a version that exists on the registry.
|
|
40
40
|
|
|
41
|
-
**Argsbarg authoring rules** — `scripts/merge-cli-program-rule.ts` and `scripts/merge-code-rule.ts` copy templates from `examples/full-example/.cursor/rules/` into each consumer, preserving any existing `**… conventions:**` footer block.
|
|
41
|
+
**Argsbarg authoring rules** — `scripts/merge-cli-program-rule.ts` and `scripts/merge-code-rule.ts` copy templates from `examples/full-example-json/.cursor/rules/` into each consumer, preserving any existing `**… conventions:**` footer block.
|
|
42
42
|
|
|
43
43
|
**Recommended in each consumer:** replace template placeholders with `**<app> conventions:**` bullets. Commit those files; merges refresh the shared top, not your footer.
|
|
44
44
|
|
|
@@ -55,7 +55,7 @@ Breaking changes (no backward compat). See [CHANGELOG.md](../CHANGELOG.md) `[Unr
|
|
|
55
55
|
7. **Cursor rules:** `just consumers-dev` merges `cli-program.mdc` + `code.mdc` (includes **Abstractions** needless-extraction rule).
|
|
56
56
|
8. **Verify:** `just test` and `just docgen` in each consumer repo.
|
|
57
57
|
|
|
58
|
-
**Consumer app skill** — `just install-local` in each consumer (part of `consumers-sync`) runs Homebrew dev install then `myapp configure --sync --yes`, which updates `~/.
|
|
58
|
+
**Consumer app skill** — `just install-local` in each consumer (part of `consumers-sync`) runs Homebrew dev install then `myapp configure --sync --yes`, which updates `~/.agents/skills/<app>/` when `program.skill.enabled` — not the argsbarg framework rule.
|
|
59
59
|
|
|
60
60
|
## npm package contents
|
|
61
61
|
|
|
@@ -63,14 +63,14 @@ Breaking changes (no backward compat). See [CHANGELOG.md](../CHANGELOG.md) `[Unr
|
|
|
63
63
|
|
|
64
64
|
When adding docs or examples intended for consumers, ensure they live under whitelisted paths (`docs/`, `examples/`, `src/`, etc.).
|
|
65
65
|
|
|
66
|
-
Exclude `examples/full-example/node_modules/` from the npm tarball via [`.npmignore`](../.npmignore).
|
|
66
|
+
Exclude `examples/full-example/node_modules/` and `examples/full-example-json/node_modules/` from the npm tarball via [`.npmignore`](../.npmignore).
|
|
67
67
|
|
|
68
|
-
##
|
|
68
|
+
## Copy templates
|
|
69
69
|
|
|
70
|
-
[`examples/full-example/`](../examples/full-example/) must enable every builtin (`capabilities.test.ts`). After builtin or schemagen doc changes:
|
|
70
|
+
Both [`examples/full-example/`](../examples/full-example/) (CLI) and [`examples/full-example-json/`](../examples/full-example-json/) (schema-first) must enable every builtin (`capabilities.test.ts`). After builtin or schemagen doc changes:
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
just example-full-
|
|
73
|
+
just example-full-check
|
|
74
74
|
just test
|
|
75
75
|
```
|
|
76
76
|
|
package/docs/mcp.md
CHANGED
|
@@ -44,86 +44,50 @@ bun run examples/nested.ts mcp
|
|
|
44
44
|
|
|
45
45
|
## Client setup
|
|
46
46
|
|
|
47
|
-
###
|
|
47
|
+
### `.agents` auto-install
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
When `mcpServer.enabled` is set, `configure --sync` merges a `mcpServers` entry into `~/.agents/mcp.json` per the [.agents protocol](https://dotagentsprotocol.com/):
|
|
50
50
|
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
"mcpServers": {
|
|
54
|
-
"myapp": {
|
|
55
|
-
"command": "bun",
|
|
56
|
-
"args": ["run", "myapp.ts", "ai", "mcp"]
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
51
|
+
```bash
|
|
52
|
+
myapp configure --sync --yes
|
|
60
53
|
```
|
|
61
54
|
|
|
62
|
-
|
|
55
|
+
### Manual client setup
|
|
63
56
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
`configure` (MCP targets) merges into `~/.claude.json` under `mcpServers`.
|
|
67
|
-
|
|
68
|
-
### Claude Desktop
|
|
69
|
-
|
|
70
|
-
`configure` (MCP targets) also merges into Claude Desktop config when app data is present:
|
|
71
|
-
|
|
72
|
-
| Platform | Path |
|
|
73
|
-
| --- | --- |
|
|
74
|
-
| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
75
|
-
| Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
76
|
-
| Linux | `~/.config/Claude/claude_desktop_config.json` |
|
|
77
|
-
|
|
78
|
-
Restart Claude Desktop after config changes. You can also install a **`.mcpb`** bundle via **`mcp bundle`** (see [MCP Bundle](#mcp-bundle-mcp-bundle)).
|
|
79
|
-
|
|
80
|
-
### OpenCode
|
|
81
|
-
|
|
82
|
-
When `~/.config/opencode` exists, **`configure`** (MCP targets) merges a local server under the top-level **`mcp`** key (not `mcpServers`):
|
|
57
|
+
Many clients do not read `~/.agents/mcp.json` yet. Copy the `mcpServers` entry from that file, or add:
|
|
83
58
|
|
|
84
59
|
```json
|
|
85
60
|
{
|
|
86
|
-
"
|
|
87
|
-
"mcp": {
|
|
61
|
+
"mcpServers": {
|
|
88
62
|
"myapp": {
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"enabled": true
|
|
63
|
+
"command": "myapp",
|
|
64
|
+
"args": ["mcp"]
|
|
92
65
|
}
|
|
93
66
|
}
|
|
94
67
|
}
|
|
95
68
|
```
|
|
96
69
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
```toml
|
|
104
|
-
[mcp_servers.myapp]
|
|
105
|
-
command = "myapp"
|
|
106
|
-
args = ["mcp"]
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Use **`codex mcp`** to list/add/remove servers, or **Settings → MCP → Open config.toml** in the Codex app. CLI and IDE extension share the same file.
|
|
110
|
-
|
|
111
|
-
### ChatGPT
|
|
70
|
+
| Client | Config file |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| **Cursor** | `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project) |
|
|
73
|
+
| **Claude Code** | `~/.claude.json` under `mcpServers`, or project `.mcp.json` |
|
|
74
|
+
| **Claude Desktop** | See platform paths below |
|
|
112
75
|
|
|
113
|
-
|
|
76
|
+
Restart Cursor or reload MCP after editing. Restart Claude Desktop after config changes.
|
|
114
77
|
|
|
115
|
-
**Desktop
|
|
78
|
+
**Claude Desktop** config paths:
|
|
116
79
|
|
|
117
80
|
| Platform | Path |
|
|
118
81
|
| --- | --- |
|
|
119
|
-
| macOS | `~/Library/Application Support/
|
|
120
|
-
| Windows | `%APPDATA%\
|
|
82
|
+
| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
83
|
+
| Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
84
|
+
| Linux | `~/.config/Claude/claude_desktop_config.json` |
|
|
121
85
|
|
|
122
|
-
|
|
86
|
+
You can also install a **`.mcpb`** bundle via **`mcp bundle`** (see [MCP Bundle](#mcp-bundle-mcp-bundle)).
|
|
123
87
|
|
|
124
88
|
### Other MCP hosts
|
|
125
89
|
|
|
126
|
-
Any host that spawns a subprocess and wires stdin/stdout works the same way: the **command** is your app, and **`mcp`** starts the server.
|
|
90
|
+
Copy the `mcpServers` entry from `~/.agents/mcp.json` into the host's native MCP config. Any host that spawns a subprocess and wires stdin/stdout works the same way: the **command** is your app, and **`mcp`** starts the server.
|
|
127
91
|
|
|
128
92
|
## Configuration
|
|
129
93
|
|
package/docs/output-schema.md
CHANGED
|
@@ -198,7 +198,7 @@ Handlers keep using runtime types; only discovered roots (and their type graph)
|
|
|
198
198
|
|
|
199
199
|
## Tests
|
|
200
200
|
|
|
201
|
-
In argsbarg: `src/cli-tool/schemagen/schemagen.test.ts` locks discovery and generation against `examples/full-example/`.
|
|
201
|
+
In argsbarg: `src/cli-tool/schemagen/schemagen.test.ts` locks discovery and generation against `examples/full-example-json/`.
|
|
202
202
|
|
|
203
203
|
Per consumer repo (optional):
|
|
204
204
|
|
|
@@ -214,7 +214,7 @@ Per consumer repo (optional):
|
|
|
214
214
|
|
|
215
215
|
Add a bullet under your app’s `**… conventions:**` block in `.cursor/rules/cli-program.mdc` pointing at `node_modules/argsbarg/docs/output-schema.md`.
|
|
216
216
|
|
|
217
|
-
**Reference implementation:** [`examples/full-example/`](../examples/full-example/) in this repo — `@sg` on command types, `__generated__/`, and `status` leaf with `StatusJsonOutputSchema`.
|
|
217
|
+
**Reference implementation:** [`examples/full-example-json/`](../examples/full-example-json/) in this repo — `@sg` on command types, `__generated__/`, and `status` leaf with `StatusJsonOutputSchema`.
|
|
218
218
|
|
|
219
219
|
## Out of scope
|
|
220
220
|
|
package/examples/formats.ts
CHANGED
|
@@ -15,12 +15,6 @@ import {
|
|
|
15
15
|
} from "../src/index";
|
|
16
16
|
|
|
17
17
|
const program = {
|
|
18
|
-
key: "formats.ts",
|
|
19
|
-
version: pkg.version,
|
|
20
|
-
description: "Value formats and ctx.inputs demo.",
|
|
21
|
-
fallbackCommand: "run",
|
|
22
|
-
fallbackMode: CliFallbackMode.MissingOnly,
|
|
23
|
-
mcpServer: { enabled: true },
|
|
24
18
|
commands: [
|
|
25
19
|
{
|
|
26
20
|
key: "run",
|
|
@@ -67,6 +61,11 @@ const program = {
|
|
|
67
61
|
},
|
|
68
62
|
},
|
|
69
63
|
],
|
|
64
|
+
description: "Value formats and ctx.inputs demo.",
|
|
65
|
+
fallbackCommand: "run",
|
|
66
|
+
fallbackMode: CliFallbackMode.MissingOnly,
|
|
67
|
+
key: "formats.ts",
|
|
68
|
+
version: pkg.version,
|
|
70
69
|
} satisfies CliProgram;
|
|
71
70
|
|
|
72
71
|
const cli = new Cli(program);
|