argsbarg 7.0.10 → 7.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/CHANGELOG.md +26 -1
- package/README.md +3 -2
- package/docs/ai-skills.md +2 -2
- package/docs/cli-program.md +3 -5
- package/docs/developing.md +3 -3
- package/docs/mcp.md +20 -7
- package/docs/output-schema.md +1 -1
- package/examples/full-example/AGENTS.md +20 -12
- package/examples/full-example/README.md +57 -12
- package/examples/full-example/biome.json +5 -4
- package/examples/full-example/bunfig.toml +3 -0
- package/examples/full-example/justfile +22 -27
- package/examples/full-example-json/AGENTS.md +14 -12
- package/examples/full-example-json/README.md +63 -15
- package/examples/full-example-json/biome.json +1 -3
- package/examples/full-example-json/bunfig.toml +3 -0
- package/examples/full-example-json/justfile +22 -27
- package/examples/mcp-plugin/.claude-plugin/plugin.json +11 -0
- package/examples/mcp-plugin/.cursor/hooks/run-tests-on-stop.ts +56 -0
- package/examples/mcp-plugin/.cursor/hooks.json +12 -0
- package/examples/mcp-plugin/.cursor-plugin/plugin.json +12 -0
- package/examples/mcp-plugin/.mcp.json +6 -0
- package/examples/mcp-plugin/AGENTS.md +90 -0
- package/examples/mcp-plugin/CLAUDE.md +1 -0
- package/examples/mcp-plugin/README.md +70 -0
- package/examples/mcp-plugin/biome.json +20 -0
- package/examples/mcp-plugin/bun.lock +48 -0
- package/examples/mcp-plugin/bunfig.toml +3 -0
- package/examples/mcp-plugin/docs/README.md +27 -0
- package/examples/mcp-plugin/docs/cli-schema.json +2085 -0
- package/examples/mcp-plugin/docs/cli.md +2026 -0
- package/examples/mcp-plugin/docs/http.md +92 -0
- package/examples/mcp-plugin/docs/mcp.md +116 -0
- package/examples/mcp-plugin/docs/openapi.json +1243 -0
- package/examples/mcp-plugin/justfile +89 -0
- package/examples/mcp-plugin/mcp.json +8 -0
- package/examples/mcp-plugin/package.json +23 -0
- package/examples/mcp-plugin/scripts/create-identity.ts +12 -0
- package/examples/mcp-plugin/scripts/mcp.mjs +11106 -0
- package/examples/mcp-plugin/scripts/release.ts +225 -0
- package/examples/mcp-plugin/skills/mcp-plugin/SKILL.md +59 -0
- package/examples/mcp-plugin/src/commands/echo/command.ts +26 -0
- package/examples/mcp-plugin/src/commands/render-json/__generated__/RenderJsonInputSchema.json +15 -0
- package/examples/mcp-plugin/src/commands/render-json/__generated__/index.ts +5 -0
- package/examples/mcp-plugin/src/commands/render-json/command.test.ts +46 -0
- package/examples/mcp-plugin/src/commands/render-json/command.ts +30 -0
- package/examples/mcp-plugin/src/commands/render-json/types.ts +9 -0
- package/examples/mcp-plugin/src/commands/status/__generated__/StatusJsonOutputSchema.json +15 -0
- package/examples/mcp-plugin/src/commands/status/__generated__/index.ts +5 -0
- package/examples/mcp-plugin/src/commands/status/command.test.ts +10 -0
- package/examples/mcp-plugin/src/commands/status/command.ts +28 -0
- package/examples/mcp-plugin/src/commands/status/types.ts +6 -0
- package/examples/mcp-plugin/src/commands/workspaces/__generated__/WorkspaceNameInputSchema.json +15 -0
- package/examples/mcp-plugin/src/commands/workspaces/__generated__/index.ts +5 -0
- package/examples/mcp-plugin/src/commands/workspaces/command.test.ts +58 -0
- package/examples/mcp-plugin/src/commands/workspaces/command.ts +94 -0
- package/examples/mcp-plugin/src/commands/workspaces/types.ts +6 -0
- package/examples/mcp-plugin/src/db/index.test.ts +86 -0
- package/examples/mcp-plugin/src/db/index.ts +77 -0
- package/examples/mcp-plugin/src/db/tables/workspaces.ts +58 -0
- package/examples/mcp-plugin/src/index.ts +10 -0
- package/examples/mcp-plugin/src/program.ts +32 -0
- package/examples/mcp-plugin/src/types/argsbarg.d.ts +11 -0
- package/examples/mcp-plugin/src/types/md.d.ts +4 -0
- package/examples/mcp-plugin/tsconfig.json +17 -0
- package/index.d.ts +12 -0
- package/package.json +1 -1
- package/src/builtins/mcp.ts +1 -1
- package/src/cli-tool/create.test.ts +5 -0
- package/src/cli-tool/create.ts +9 -1
- package/src/config/manifest.ts +56 -0
- package/src/config/resolve.test.ts +12 -12
- package/src/configure/configure.test.ts +5 -3
- package/src/core/parse.test.ts +6 -5
- package/src/core/types.ts +12 -0
- package/src/exports/mcp.ts +12 -0
- package/src/help.test.ts +36 -0
- package/src/help.ts +32 -19
- package/src/mcp/bundle.ts +12 -3
- package/src/mcp/claude.test.ts +2 -7
- package/src/mcp/claude.ts +49 -67
- package/src/mcp/cursor.test.ts +151 -0
- package/src/mcp/cursor.ts +155 -0
- package/src/mcp/hidden-mcpb.test.ts +34 -1
- package/src/mcp/plugin-shared.ts +107 -0
- package/src/mcp/result.ts +5 -1
- package/src/mcp/server.ts +3 -2
- package/src/test/fixtures.ts +13 -0
- package/src/test/integration/mcp.test.ts +8 -7
- package/examples/full-example/scripts/print-identity.ts +0 -28
- package/examples/full-example-json/scripts/print-identity.ts +0 -28
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [7.1.0] - 2026-09-18
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Updated copy-template READMEs (`full-example`, `full-example-json`) to be user-facing (Homebrew install via tap and simplified formula install, CLI commands, usage examples, agent/MCP integration, and documentation links) rather than template contributor guides.
|
|
15
|
+
- Copy-template justfiles use hardcoded CLI/tap literals (substituted by `argsbarg create`); removed `scripts/print-identity.ts` and runtime `bun` indirection. `{tapOrg}` / `{tapRepo}` remain only for Homebrew tap paths. Comment documents `set shell`.
|
|
16
|
+
- Inverted `AGENTS.md` hierarchy in copy templates and consumer sync: argsbarg managed framework baseline sits at the top (under the app title) with an explicit precedence note, and all app-specific sections (`## Tooling`, `## Documentation`, `## App conventions`, custom sections) live below `<!-- /argsbarg:managed -->` so project-specific rules override framework defaults. `merge-agents-md` automatically migrates legacy sandwich layouts to the new structure.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **`mcp-plugin` copy template** (`examples/mcp-plugin/`) — Agent MCP plugin template for Cursor and Claude Code marketplaces, featuring in-repo manifests (`.cursor-plugin/plugin.json`, `mcp.json`, `.claude-plugin/plugin.json`, `.mcp.json`), a standalone bundled Node script (`scripts/mcp.mjs`), and an in-memory datastore with `@sg` schemagen.
|
|
21
|
+
- Cross-runtime MCP stdio loop using `process.stdin` in `mcpServeStdioLoop` to support standalone bundled execution under Node.js as well as Bun.
|
|
22
|
+
- bunfig.toml to examples so bun will auto-install deps on run
|
|
23
|
+
- **`mcpServer.cursorPlugin`** — opt-in Cursor plugin zip packaging (`dist/cursor-plugin/<name>.zip`) via `mcp bundle`, generating `.cursor-plugin/plugin.json`, `mcp.json` with `${CURSOR_PLUGIN_ROOT}`, and preservation of repository skills.
|
|
24
|
+
- **Plugin skill preservation** — `mcp bundle` (`claudePlugin` and `cursorPlugin`) copies repository skills (`skills/<key>/`) when present in the project, falling back to generated MCP routing stubs when absent.
|
|
25
|
+
- **Extended bundle metadata** — `CliMcpBundleConfig` supports `displayName`, `homepage`, `repository`, `license`, and `skillsDir` overrides for plugin manifests.
|
|
26
|
+
|
|
27
|
+
## [7.0.11] - 2026-09-16
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- **Help table box sizing and wrapping** — fixed an off-by-two sizing bug in TTY help rendering where table rows wrapped their description column based on `hw - 2` instead of the inner content width `hw - 4`. This caused long table lines to exceed the terminal width and the box borders by up to 2 columns, resulting in the trailing border character `│` wrapping onto a new line in terminals matching `stdout.columns`.
|
|
32
|
+
|
|
10
33
|
## [7.0.10] - 2026-09-16
|
|
11
34
|
|
|
12
35
|
### Added
|
|
@@ -1010,7 +1033,9 @@ const cli = { ... } satisfies CliProgram; // or : CliProgram
|
|
|
1010
1033
|
- 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`).
|
|
1011
1034
|
- Imports: use `CliPositional` where needed; replace `CliOptionDef` with `CliOption` or `CliPositional` as appropriate.
|
|
1012
1035
|
|
|
1013
|
-
[Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v7.0
|
|
1036
|
+
[Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v7.1.0...HEAD
|
|
1037
|
+
[7.1.0]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.1.0
|
|
1038
|
+
[7.0.11]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.11
|
|
1014
1039
|
[7.0.10]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.10
|
|
1015
1040
|
[7.0.9]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.9
|
|
1016
1041
|
[7.0.7]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.7
|
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
Logo
|
|
1
|
+

|
|
2
|
+
<!-- Big money NE - https://patorjk.com/software/taag/#p=testall&f=Bulbhead&t=shebangsy&x=none&v=4&h=4&w=80&we=false> -->
|
|
2
3
|
|
|
3
4
|
[GitHub](https://github.com/bdombro/bun-argsbarg)
|
|
4
5
|
[License: MIT](LICENSE)
|
|
@@ -381,7 +382,7 @@ ArgsBarg ships authoring docs under `node_modules/argsbarg/docs/`. Because AI ag
|
|
|
381
382
|
bun scripts/merge-agents-md.ts .
|
|
382
383
|
```
|
|
383
384
|
|
|
384
|
-
This refreshes the argsbarg-managed section
|
|
385
|
+
This refreshes the argsbarg-managed section at the top of `AGENTS.md` while preserving all app-specific sections below it. See **Agent instructions** in [docs/cli-program.md](docs/cli-program.md).
|
|
385
386
|
|
|
386
387
|
### 3. Agent Skills & Workspace Configuration
|
|
387
388
|
|
package/docs/ai-skills.md
CHANGED
|
@@ -15,9 +15,9 @@ Because developers customize `skills/<app>/SKILL.md` with domain workflows, exec
|
|
|
15
15
|
- **Commands catalog** — compact intent-based router directing agents to the right subcommands
|
|
16
16
|
- **Workflow & Pitfalls** — guidelines for automated execution (e.g. using non-interactive flags like `--yes`)
|
|
17
17
|
|
|
18
|
-
## Claude Code
|
|
18
|
+
## Claude Code and Cursor plugins
|
|
19
19
|
|
|
20
|
-
When `mcpServer.claudePlugin: true` is configured, running `myapp mcp bundle` packages `dist/claude-plugin/<name>.zip`
|
|
20
|
+
When `mcpServer.claudePlugin: true` and/or `mcpServer.cursorPlugin: true` is configured, running `myapp mcp bundle` packages plugin archives (`dist/claude-plugin/<name>.zip` and `dist/cursor-plugin/<name>.zip`). If a repository skill directory exists (`skills/<key>/`), the package bundles that custom skill; otherwise it falls back to a generated MCP pointer skill that routes agents to the bundled MCP server. These are dist packaging artifacts, not installed via `configure`.
|
|
21
21
|
|
|
22
22
|
## Uninstalling legacy skills
|
|
23
23
|
|
package/docs/cli-program.md
CHANGED
|
@@ -584,18 +584,16 @@ bun scripts/merge-agents-md.ts .
|
|
|
584
584
|
|
|
585
585
|
`bunx argsbarg create` copies `AGENTS.md` and `CLAUDE.md` (`@AGENTS.md`) into new projects automatically.
|
|
586
586
|
|
|
587
|
-
2. **Add
|
|
587
|
+
2. **Add app-specific sections below the managed block** (recommended). The framework baseline lives between `<!-- argsbarg:managed -->` and `<!-- /argsbarg:managed -->` at the top of the file. All application-specific sections (`## Tooling`, `## Documentation`, `## App conventions`, custom rules) live below the closing marker where they take precedence over framework defaults. Example:
|
|
588
588
|
|
|
589
589
|
```markdown
|
|
590
|
-
|
|
590
|
+
## App conventions
|
|
591
591
|
|
|
592
592
|
- Shared mutator flags: `readQaMutatingFlags(ctx)` in `src/cli/shared.ts`.
|
|
593
593
|
- Per command: `read*Flags` + `resolve*Input` in `commands/<name>/resolve.ts`.
|
|
594
594
|
```
|
|
595
595
|
|
|
596
|
-
If you maintain argsbarg from a sibling checkout, `just consumers-dev` / `just consumers-sync` refresh the shared managed section and **keep**
|
|
597
|
-
|
|
598
|
-
3. **Optional:** add consumer-specific sections above the `<!-- argsbarg:managed -->` marker in `AGENTS.md` (project context, Ink patterns, domain notes).
|
|
596
|
+
If you maintain argsbarg from a sibling checkout, `just consumers-dev` / `just consumers-sync` refresh the shared managed section and **keep** all app-specific sections below it. Commit `AGENTS.md` in your repo.
|
|
599
597
|
|
|
600
598
|
- **Not this file:** `skills/<app>/SKILL.md` in your repository is the **app** skill — how to *invoke* the CLI. `AGENTS.md` is for *authoring* argsbarg schema.
|
|
601
599
|
|
package/docs/developing.md
CHANGED
|
@@ -36,15 +36,15 @@ Sibling consumer repos (machine-specific paths in the root `justfile` `consumer_
|
|
|
36
36
|
|
|
37
37
|
| Recipe | When | Effect |
|
|
38
38
|
| --- | --- | --- |
|
|
39
|
-
| `just consumers-dev` | Before publish; hacking on argsbarg locally | `bun add argsbarg@file:<relative>`; fix `.bin/argsbarg` symlink; refresh `AGENTS.md` from template (
|
|
39
|
+
| `just consumers-dev` | Before publish; hacking on argsbarg locally | `bun add argsbarg@file:<relative>`; fix `.bin/argsbarg` symlink; refresh `AGENTS.md` from template (preserves app-specific sections below managed block) |
|
|
40
40
|
| `just consumers-sync` | After release | Sets `"argsbarg": "^<this package.json version>"`, `bun install`, merge `AGENTS.md`, `just build`, `just docgen`, `just install-local` (Homebrew dev formula + agent artifacts; `just install` is an alias) |
|
|
41
41
|
| `just consumers-schemagen` | After `@sg` type changes in consumers | Runs `argsbarg schemagen` in each `consumer_apps` path (fails if missing) |
|
|
42
42
|
|
|
43
43
|
`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.
|
|
44
44
|
|
|
45
|
-
**Argsbarg authoring rules** — `scripts/merge-agents-md.ts` copies the template from `examples/full-example-json/AGENTS.md` into each consumer
|
|
45
|
+
**Argsbarg authoring rules** — `scripts/merge-agents-md.ts` copies the template from `examples/full-example-json/AGENTS.md` into each consumer. The framework baseline is placed at the top, and all app-specific sections live below `<!-- /argsbarg:managed -->` where they take precedence over framework defaults.
|
|
46
46
|
|
|
47
|
-
**Recommended in each consumer:** replace template placeholders
|
|
47
|
+
**Recommended in each consumer:** replace template placeholders under `## App conventions` with project-specific bullets. Commit `AGENTS.md`; merges refresh the managed section, not your app-specific sections.
|
|
48
48
|
|
|
49
49
|
## Upgrading consumer apps to 7.0
|
|
50
50
|
|
package/docs/mcp.md
CHANGED
|
@@ -343,17 +343,19 @@ When `mcpServer.enabled` is true, **`mcp bundle`** writes dist artifacts you opt
|
|
|
343
343
|
```bash
|
|
344
344
|
just build
|
|
345
345
|
./dist/myapp mcp bundle
|
|
346
|
-
# → dist/myapp.mcpb
|
|
346
|
+
# → dist/myapp.mcpb (when mcpServer.mcpd: true)
|
|
347
347
|
# → dist/claude-plugin/myapp.zip (when mcpServer.claudePlugin: true)
|
|
348
|
+
# → dist/cursor-plugin/myapp.zip (when mcpServer.cursorPlugin: true)
|
|
348
349
|
```
|
|
349
350
|
|
|
350
|
-
Enable
|
|
351
|
+
Enable any combination of packaging flags:
|
|
351
352
|
|
|
352
353
|
```typescript
|
|
353
354
|
mcpServer: {
|
|
354
355
|
enabled: true,
|
|
355
356
|
mcpd: true, // Claude Desktop `.mcpb`
|
|
356
357
|
claudePlugin: true, // Claude Code plugin zip
|
|
358
|
+
cursorPlugin: true, // Cursor plugin zip
|
|
357
359
|
},
|
|
358
360
|
```
|
|
359
361
|
|
|
@@ -363,8 +365,9 @@ Expects the compiled binary at **`dist/<program.key>`**. Stdout prints one path
|
|
|
363
365
|
| --- | --- |
|
|
364
366
|
| **`dist/<key>.mcpb`** | Claude Desktop MCP Bundle — when `mcpd: true` (default **false**) |
|
|
365
367
|
| **`dist/claude-plugin/<name>.zip`** | Claude Code plugin zip — when `claudePlugin: true` (default **false**) |
|
|
368
|
+
| **`dist/cursor-plugin/<name>.zip`** | Cursor plugin zip — when `cursorPlugin: true` (default **false**) |
|
|
366
369
|
|
|
367
|
-
Manifest metadata is generated from your schema (`mcpServerId`, tools, `program.appConfig` user config for env-mapped entries). Optional pack-time fields live under **`mcpServer.bundle`** (`author`, `icon`, `longDescription`).
|
|
370
|
+
Manifest metadata is generated from your schema (`mcpServerId`, tools, `program.appConfig` user config for env-mapped entries). Optional pack-time fields live under **`mcpServer.bundle`** (`author`, `displayName`, `homepage`, `icon`, `license`, `longDescription`, `repository`, `skillsDir`).
|
|
368
371
|
|
|
369
372
|
**Claude Code plugin zip layout** (paths at archive root):
|
|
370
373
|
|
|
@@ -372,14 +375,24 @@ Manifest metadata is generated from your schema (`mcpServerId`, tools, `program.
|
|
|
372
375
|
.claude-plugin/plugin.json # includes "mcpServers": ".mcp.json"
|
|
373
376
|
.mcp.json
|
|
374
377
|
bin/myapp # executable (0755 preserved in the zip)
|
|
375
|
-
skills/<dirName
|
|
378
|
+
skills/<dirName>/...
|
|
376
379
|
```
|
|
377
380
|
|
|
378
|
-
|
|
381
|
+
**Cursor plugin zip layout** (paths at archive root):
|
|
379
382
|
|
|
380
|
-
|
|
383
|
+
```
|
|
384
|
+
.cursor-plugin/plugin.json # Cursor plugin manifest
|
|
385
|
+
mcp.json # includes mcpServers with ${CURSOR_PLUGIN_ROOT}
|
|
386
|
+
bin/myapp # executable (0755 preserved in the zip)
|
|
387
|
+
skills/<dirName>/...
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
`plugin.json` and `mcp.json` configure Cursor and Claude to load the bundled MCP server when the plugin is enabled. The plugin zip preserves the executable bit on `bin/<key>`.
|
|
391
|
+
|
|
392
|
+
If the repository has a skill directory under `skills/<dirName>/` (or `mcpServer.bundle.skillsDir`), the plugin bundles that repository skill. Otherwise, it falls back to a generated **MCP routing stub** telling the agent to use the plugin's MCP toolset.
|
|
381
393
|
|
|
382
|
-
Load locally with `claude --plugin-dir ./dist/claude-plugin/myapp.zip`.
|
|
394
|
+
Load Claude plugin locally with `claude --plugin-dir ./dist/claude-plugin/myapp.zip`.
|
|
395
|
+
Unpack Cursor plugin locally into `~/.cursor/plugins/local/<name>`.
|
|
383
396
|
|
|
384
397
|
Bare **`myapp mcp`** still runs the stdio MCP server (unchanged for `configure` MCP targets and MCP hosts). Use **`configure install`** for Cursor, Claude Code, Claude Desktop, and OpenCode JSON config.
|
|
385
398
|
|
package/docs/output-schema.md
CHANGED
|
@@ -212,7 +212,7 @@ Per consumer repo (optional):
|
|
|
212
212
|
4. `just docgen` / `myapp docs cli --save` — refresh consumer docs.
|
|
213
213
|
5. Document which commands use which roots in **your** `docs/architecture.md` (argsbarg does not maintain per-app tables).
|
|
214
214
|
|
|
215
|
-
Add a bullet under your app’s
|
|
215
|
+
Add a bullet under your app’s `## App conventions` section in `AGENTS.md` pointing at `node_modules/argsbarg/docs/output-schema.md`.
|
|
216
216
|
|
|
217
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
|
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
# full-example
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
- Bun only (`bun`, `bunx`, `bun test`). No Node/npm/pnpm.
|
|
6
|
-
|
|
7
|
-
## Documentation
|
|
8
|
-
|
|
9
|
-
- `README.md` — user-facing install/commands
|
|
10
|
-
- `docs/architecture.md` — maintainer internals (create if missing)
|
|
11
|
-
- Generated: `just docgen` → `docs/cli.md`, `docs/cli-schema.json`
|
|
12
|
-
- `skills/full-example/SKILL.md` — agent skill router (scaffolded from template; customize as needed)
|
|
3
|
+
<!-- argsbarg:managed — overwritten on merge; framework baseline; app-specific sections below take precedence -->
|
|
13
4
|
|
|
14
|
-
|
|
5
|
+
> **Baseline framework rules:** The conventions below are defaults for argsbarg projects. Project-specific sections below this managed block override these defaults.
|
|
15
6
|
|
|
16
7
|
## Argsbarg schema
|
|
17
8
|
|
|
@@ -70,8 +61,25 @@ When adding commands: `src/commands/<name>/command.ts`; register in `program.ts`
|
|
|
70
61
|
- **Tests:** `just test` (after `just check`)
|
|
71
62
|
- **Repository skill:** When adding, renaming, or removing commands, update `skills/<key>/SKILL.md` so the intent-based router remains accurate for end-user agents. (`just docgen` updates `./docs/` only and never overwrites `skills/`).
|
|
72
63
|
|
|
64
|
+
### Abstractions
|
|
65
|
+
|
|
66
|
+
Avoid needless extraction: keep single-use helpers in the calling file by default. Split only when reused elsewhere, the caller is large or hard to follow, or extraction clarifies a substantial unit. Do not create tiny one-off helpers.
|
|
67
|
+
- ❌ `utils/formatX.ts` — 60-line helper used by one command
|
|
68
|
+
- ✅ inline helper in that command file
|
|
69
|
+
|
|
73
70
|
<!-- /argsbarg:managed -->
|
|
74
71
|
|
|
75
|
-
|
|
72
|
+
## Tooling
|
|
73
|
+
|
|
74
|
+
- Bun only (`bun`, `bunx`, `bun test`). No Node/npm/pnpm.
|
|
75
|
+
|
|
76
|
+
## Documentation
|
|
77
|
+
|
|
78
|
+
- `README.md` — user-facing install/commands
|
|
79
|
+
- `docs/architecture.md` — maintainer internals (create if missing)
|
|
80
|
+
- Generated: `just docgen` → `docs/cli.md`, `docs/cli-schema.json`
|
|
81
|
+
- `skills/full-example/SKILL.md` — agent skill router (scaffolded from template; customize as needed)
|
|
82
|
+
|
|
83
|
+
## App conventions
|
|
76
84
|
|
|
77
85
|
Replace with app-specific bullets.
|
|
@@ -1,24 +1,69 @@
|
|
|
1
1
|
# full-example
|
|
2
2
|
|
|
3
|
-
Argsbarg
|
|
3
|
+
Argsbarg CLI copy template (MCP, HTTP, configure, skills; no schemagen).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Install via Homebrew:
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
```bash
|
|
10
|
+
brew tap bdombro/bun-argsbarg git@github.com:bdombro/bun-argsbarg.git
|
|
11
|
+
brew install full-example
|
|
12
|
+
full-example configure install
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`full-example configure install` sets up shell completions, agent skills, and MCP configuration.
|
|
16
|
+
|
|
17
|
+
## Commands
|
|
18
|
+
|
|
19
|
+
- `full-example echo` — Echo text back to stdout or inspect flags.
|
|
20
|
+
- `full-example status` — Show application version with optional `--json`.
|
|
21
|
+
|
|
22
|
+
### Built-in commands
|
|
23
|
+
|
|
24
|
+
- `full-example completion` — Install or inspect shell tab completions (bash, zsh, fish).
|
|
25
|
+
- `full-example configure` — Manage agent artifacts (skills, MCP, application configuration).
|
|
26
|
+
- `full-example docs` — Browse bundled documentation topics (`cli`, `mcp`, `http`, `readme`).
|
|
27
|
+
- `full-example mcp` — Start the Model Context Protocol (stdio) server for AI coding agents.
|
|
28
|
+
- `full-example version` — Display version information.
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Print a message
|
|
34
|
+
full-example echo "Hello, world!"
|
|
35
|
+
|
|
36
|
+
# Inspect JSON status
|
|
37
|
+
full-example status --json
|
|
38
|
+
|
|
39
|
+
# Start the MCP server for AI agents
|
|
40
|
+
full-example mcp
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## AI Agent & MCP Integration
|
|
44
|
+
|
|
45
|
+
`full-example` includes an integrated MCP server and agent skills out of the box:
|
|
46
|
+
|
|
47
|
+
- **MCP server**: Run `full-example mcp` or register via `full-example configure install`.
|
|
48
|
+
- **Agent skill**: See `skills/full-example/SKILL.md` for agent router instructions.
|
|
49
|
+
|
|
50
|
+
## Documentation
|
|
51
|
+
|
|
52
|
+
| Need | Resource |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| CLI reference | [docs/cli.md](docs/cli.md) or `full-example docs cli` |
|
|
55
|
+
| MCP tools | [docs/mcp.md](docs/mcp.md) or `full-example docs mcp` |
|
|
56
|
+
| HTTP API | [docs/http.md](docs/http.md) or `full-example docs http` |
|
|
57
|
+
| Agent skill router | [skills/full-example/SKILL.md](skills/full-example/SKILL.md) |
|
|
58
|
+
| CLI schema (JSON) | [docs/cli-schema.json](docs/cli-schema.json) |
|
|
14
59
|
|
|
15
|
-
##
|
|
60
|
+
## Development
|
|
16
61
|
|
|
17
|
-
|
|
62
|
+
Requires [Homebrew](https://brew.sh), [just](https://just.systems), and [Bun](https://bun.sh):
|
|
18
63
|
|
|
19
64
|
```bash
|
|
20
65
|
brew install just bun
|
|
21
66
|
just setup
|
|
22
|
-
just
|
|
23
|
-
just
|
|
67
|
+
just check
|
|
68
|
+
just test
|
|
24
69
|
```
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
"linter": {
|
|
5
5
|
"enabled": true,
|
|
6
6
|
"rules": {
|
|
7
|
-
"preset": "recommended"
|
|
7
|
+
"preset": "recommended",
|
|
8
|
+
"complexity": {
|
|
9
|
+
"noStaticOnlyClass": "off"
|
|
10
|
+
}
|
|
8
11
|
}
|
|
9
12
|
},
|
|
10
13
|
"formatter": {
|
|
@@ -14,9 +17,7 @@
|
|
|
14
17
|
},
|
|
15
18
|
"overrides": [
|
|
16
19
|
{
|
|
17
|
-
"includes": ["**/*.json"]
|
|
18
|
-
"formatter": { "enabled": false },
|
|
19
|
-
"linter": { "enabled": false }
|
|
20
|
+
"includes": ["**/*.json"]
|
|
20
21
|
}
|
|
21
22
|
]
|
|
22
23
|
}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
+
# bash (not sh); -e bail on errors, -u error on unset vars, pipefail fails pipelines when any stage fails
|
|
1
2
|
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
|
|
2
3
|
|
|
3
4
|
export PATH := justfile_directory() + "/node_modules/.bin:" + env_var("PATH")
|
|
4
5
|
|
|
5
|
-
cli_key := `bun scripts/print-identity.ts key`
|
|
6
|
-
tap_org := `bun scripts/print-identity.ts tapOrg`
|
|
7
|
-
tap_repo := `bun scripts/print-identity.ts tapRepo`
|
|
8
|
-
tap := `bun scripts/print-identity.ts tap`
|
|
9
|
-
release_repo := `bun scripts/print-identity.ts releaseRepo`
|
|
10
|
-
tap_git_url := "git@github.com:" + release_repo + ".git"
|
|
11
6
|
brew_prefix := `brew --prefix`
|
|
12
|
-
tap_parent := brew_prefix + "/Library/Taps/"
|
|
13
|
-
tap_path := tap_parent + "/homebrew-"
|
|
7
|
+
tap_parent := brew_prefix + "/Library/Taps/{tapOrg}"
|
|
8
|
+
tap_path := tap_parent + "/homebrew-{tapRepo}"
|
|
14
9
|
|
|
15
10
|
# List available recipes (default)
|
|
16
11
|
_:
|
|
@@ -18,7 +13,7 @@ _:
|
|
|
18
13
|
|
|
19
14
|
# Compile the CLI binary to dist/full-example
|
|
20
15
|
build:
|
|
21
|
-
bun build ./src/index.ts --compile --outfile=dist/
|
|
16
|
+
bun build ./src/index.ts --compile --outfile=dist/full-example
|
|
22
17
|
@rm -f .*.bun-build
|
|
23
18
|
|
|
24
19
|
# Run typecheck and format
|
|
@@ -34,11 +29,11 @@ demo-http:
|
|
|
34
29
|
|
|
35
30
|
# demo a CLI command
|
|
36
31
|
demo-cli:
|
|
37
|
-
@just run
|
|
32
|
+
@just run full-example status
|
|
38
33
|
|
|
39
34
|
# demo a CLI command
|
|
40
35
|
demo-help:
|
|
41
|
-
@just run
|
|
36
|
+
@just run full-example --help
|
|
42
37
|
|
|
43
38
|
# Run the CLI from source with optional args; restarts on file changes
|
|
44
39
|
dev *ARGS:
|
|
@@ -70,26 +65,26 @@ install-local: uninstall build
|
|
|
70
65
|
mkdir -p {{tap_parent}}
|
|
71
66
|
ln -sfn '{{justfile_directory()}}' {{tap_path}}
|
|
72
67
|
bun scripts/dev-formula.ts install
|
|
73
|
-
HOMEBREW_NO_ASK=1 brew reinstall --formula
|
|
68
|
+
HOMEBREW_NO_ASK=1 brew reinstall --formula bdombro/bun-argsbarg/full-example || HOMEBREW_NO_ASK=1 brew install --force --formula bdombro/bun-argsbarg/full-example
|
|
74
69
|
bun scripts/dev-formula.ts reset
|
|
75
|
-
|
|
70
|
+
full-example configure install
|
|
76
71
|
|
|
77
72
|
# Remove local dev install, then install from GitHub tap (requires gh auth login)
|
|
78
73
|
install-production: uninstall
|
|
79
|
-
brew tap
|
|
80
|
-
brew install
|
|
81
|
-
|
|
74
|
+
brew tap bdombro/bun-argsbarg git@github.com:bdombro/bun-argsbarg.git
|
|
75
|
+
brew install full-example
|
|
76
|
+
full-example configure install
|
|
82
77
|
|
|
83
78
|
# Alias for backward compatibility
|
|
84
79
|
reinstall: reinstall-local
|
|
85
80
|
|
|
86
81
|
# Rebuild binary and swap into Cellar (run install-local first; run `just refresh` for skills/MCP)
|
|
87
82
|
reinstall-local: build
|
|
88
|
-
install -m 755 dist/
|
|
83
|
+
install -m 755 dist/full-example "$(brew --prefix full-example)/bin/full-example"
|
|
89
84
|
|
|
90
85
|
# Refresh agent skills/MCP without reinstalling the binary
|
|
91
86
|
refresh:
|
|
92
|
-
|
|
87
|
+
full-example configure install
|
|
93
88
|
|
|
94
89
|
# Lint sources without writing
|
|
95
90
|
lint:
|
|
@@ -101,7 +96,7 @@ run *ARGS:
|
|
|
101
96
|
|
|
102
97
|
# Generate JSON Schema artifacts from TypeScript types (not used in this template)
|
|
103
98
|
schemagen:
|
|
104
|
-
@echo "
|
|
99
|
+
@echo "No @sg types in the cli template. Use argsbarg create --template json or add /** @sg */ types first."
|
|
105
100
|
|
|
106
101
|
# Install bun/npm dependencies
|
|
107
102
|
setup:
|
|
@@ -118,12 +113,12 @@ release *ARGS:
|
|
|
118
113
|
|
|
119
114
|
# Install release formula from tap and run formula test
|
|
120
115
|
test-release:
|
|
121
|
-
HOMEBREW_NO_ASK=1 brew untap
|
|
116
|
+
HOMEBREW_NO_ASK=1 brew untap bdombro/bun-argsbarg 2>/dev/null || true
|
|
122
117
|
mkdir -p {{tap_parent}}
|
|
123
118
|
ln -sfn '{{justfile_directory()}}' {{tap_path}}
|
|
124
|
-
HOMEBREW_NO_ASK=1 brew uninstall --formula
|
|
125
|
-
brew install --formula
|
|
126
|
-
brew test
|
|
119
|
+
HOMEBREW_NO_ASK=1 brew uninstall --formula bdombro/bun-argsbarg/full-example 2>/dev/null || true
|
|
120
|
+
brew install --formula bdombro/bun-argsbarg/full-example
|
|
121
|
+
brew test full-example
|
|
127
122
|
|
|
128
123
|
# Typecheck without emitting build artifacts
|
|
129
124
|
typecheck:
|
|
@@ -131,7 +126,7 @@ typecheck:
|
|
|
131
126
|
|
|
132
127
|
# Undo dev/Homebrew install (remove agent artifacts, then keg + untap)
|
|
133
128
|
uninstall:
|
|
134
|
-
@
|
|
135
|
-
@HOMEBREW_NO_ASK=1 brew uninstall --formula
|
|
136
|
-
@HOMEBREW_NO_ASK=1 brew uninstall --formula
|
|
137
|
-
@HOMEBREW_NO_ASK=1 brew untap
|
|
129
|
+
@full-example configure uninstall --yes 2>/dev/null || just run configure uninstall --yes
|
|
130
|
+
@HOMEBREW_NO_ASK=1 brew uninstall --formula bdombro/bun-argsbarg/full-example 2>/dev/null || true
|
|
131
|
+
@HOMEBREW_NO_ASK=1 brew uninstall --formula bdombro/bun-argsbarg/full-example-local 2>/dev/null || true
|
|
132
|
+
@HOMEBREW_NO_ASK=1 brew untap bdombro/bun-argsbarg 2>/dev/null || true
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
# full-example-json
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
- Bun only (`bun`, `bunx`, `bun test`). No Node/npm/pnpm.
|
|
3
|
+
<!-- argsbarg:managed — overwritten on merge; framework baseline; app-specific sections below take precedence -->
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- `README.md` — user-facing install/commands
|
|
10
|
-
- `docs/architecture.md` — maintainer internals (create if missing)
|
|
11
|
-
- Generated: `just docgen` → `docs/cli.md`, `docs/cli-schema.json`
|
|
12
|
-
- `skills/full-example-json/SKILL.md` — agent skill router (scaffolded from template; customize as needed)
|
|
13
|
-
|
|
14
|
-
<!-- argsbarg:managed -->
|
|
5
|
+
> **Baseline framework rules:** The conventions below are defaults for argsbarg projects. Project-specific sections below this managed block override these defaults.
|
|
15
6
|
|
|
16
7
|
## Argsbarg schema
|
|
17
8
|
|
|
@@ -83,6 +74,17 @@ Avoid needless extraction: keep single-use helpers in the calling file by defaul
|
|
|
83
74
|
|
|
84
75
|
<!-- /argsbarg:managed -->
|
|
85
76
|
|
|
86
|
-
|
|
77
|
+
## Tooling
|
|
78
|
+
|
|
79
|
+
- Bun only (`bun`, `bunx`, `bun test`). No Node/npm/pnpm.
|
|
80
|
+
|
|
81
|
+
## Documentation
|
|
82
|
+
|
|
83
|
+
- `README.md` — user-facing install/commands
|
|
84
|
+
- `docs/architecture.md` — maintainer internals (create if missing)
|
|
85
|
+
- Generated: `just docgen` → `docs/cli.md`, `docs/cli-schema.json`
|
|
86
|
+
- `skills/full-example-json/SKILL.md` — agent skill router (scaffolded from template; customize as needed)
|
|
87
|
+
|
|
88
|
+
## App conventions
|
|
87
89
|
|
|
88
90
|
Replace with app-specific bullets.
|
|
@@ -1,27 +1,75 @@
|
|
|
1
1
|
# full-example-json
|
|
2
2
|
|
|
3
|
-
Argsbarg
|
|
3
|
+
Argsbarg schema-first copy template (@sg schemagen, JSON schemas, REST CRUD).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Install via Homebrew:
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
9
|
+
```bash
|
|
10
|
+
brew tap bdombro/bun-argsbarg git@github.com:bdombro/bun-argsbarg.git
|
|
11
|
+
brew install full-example-json
|
|
12
|
+
full-example-json configure install
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`full-example-json configure install` sets up shell completions, agent skills, and MCP configuration.
|
|
16
|
+
|
|
17
|
+
## Commands
|
|
18
|
+
|
|
19
|
+
- `full-example-json echo` — Echo text back to stdout or inspect flags.
|
|
20
|
+
- `full-example-json render-json` — Process structured JSON payloads with schema validation.
|
|
21
|
+
- `full-example-json status` — Show application version with schemagen output schema (`--json`).
|
|
22
|
+
- `full-example-json workspaces` — Manage workspace resources (REST CRUD with in-memory SQLite).
|
|
23
|
+
|
|
24
|
+
### Built-in commands
|
|
25
|
+
|
|
26
|
+
- `full-example-json completion` — Install or inspect shell tab completions (bash, zsh, fish).
|
|
27
|
+
- `full-example-json configure` — Manage agent artifacts (skills, MCP, application configuration).
|
|
28
|
+
- `full-example-json docs` — Browse bundled documentation topics (`cli`, `mcp`, `http`, `readme`).
|
|
29
|
+
- `full-example-json mcp` — Start the Model Context Protocol (stdio) server for AI coding agents.
|
|
30
|
+
- `full-example-json version` — Display version information.
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Print a message
|
|
36
|
+
full-example-json echo "Hello, world!"
|
|
37
|
+
|
|
38
|
+
# Inspect JSON status
|
|
39
|
+
full-example-json status --json
|
|
40
|
+
|
|
41
|
+
# List workspaces
|
|
42
|
+
full-example-json workspaces list
|
|
43
|
+
|
|
44
|
+
# Start the MCP server for AI agents
|
|
45
|
+
full-example-json mcp
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## AI Agent & MCP Integration
|
|
49
|
+
|
|
50
|
+
`full-example-json` includes an integrated MCP server and agent skills out of the box:
|
|
51
|
+
|
|
52
|
+
- **MCP server**: Run `full-example-json mcp` or register via `full-example-json configure install`.
|
|
53
|
+
- **Agent skill**: See `skills/full-example-json/SKILL.md` for agent router instructions.
|
|
54
|
+
|
|
55
|
+
## Documentation
|
|
56
|
+
|
|
57
|
+
| Need | Resource |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| CLI reference | [docs/cli.md](docs/cli.md) or `full-example-json docs cli` |
|
|
60
|
+
| MCP tools | [docs/mcp.md](docs/mcp.md) or `full-example-json docs mcp` |
|
|
61
|
+
| HTTP API | [docs/http.md](docs/http.md) or `full-example-json docs http` |
|
|
62
|
+
| Agent skill router | [skills/full-example-json/SKILL.md](skills/full-example-json/SKILL.md) |
|
|
63
|
+
| CLI schema (JSON) | [docs/cli-schema.json](docs/cli-schema.json) |
|
|
16
64
|
|
|
17
|
-
##
|
|
65
|
+
## Development
|
|
18
66
|
|
|
19
|
-
|
|
67
|
+
Requires [Homebrew](https://brew.sh), [just](https://just.systems), and [Bun](https://bun.sh):
|
|
20
68
|
|
|
21
69
|
```bash
|
|
22
70
|
brew install just bun
|
|
23
71
|
just setup
|
|
24
|
-
just schemagen # after
|
|
25
|
-
just
|
|
26
|
-
just
|
|
72
|
+
just schemagen # after modifying @sg types in src/
|
|
73
|
+
just check
|
|
74
|
+
just test
|
|
27
75
|
```
|