argsbarg 6.1.10 → 6.2.2

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.
Files changed (136) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/README.md +49 -49
  3. package/docs/README.md +5 -4
  4. package/docs/ai-skills.md +36 -23
  5. package/docs/bundled-docs.md +1 -1
  6. package/docs/cli-program.md +19 -20
  7. package/docs/config-schema.md +3 -3
  8. package/docs/configure.md +12 -16
  9. package/docs/developing.md +9 -9
  10. package/docs/mcp.md +21 -57
  11. package/docs/output-schema.md +3 -3
  12. package/examples/formats.ts +5 -6
  13. package/examples/full-example/AGENTS.md +75 -0
  14. package/examples/full-example/CLAUDE.md +1 -0
  15. package/examples/full-example/README.md +7 -69
  16. package/examples/full-example/docs/README.md +1 -1
  17. package/examples/full-example/docs/cli-schema.json +1 -1659
  18. package/examples/full-example/docs/cli.md +2 -1538
  19. package/examples/full-example/docs/http.md +0 -7
  20. package/examples/full-example/docs/mcp.md +23 -59
  21. package/examples/full-example/docs/openapi.json +2 -782
  22. package/examples/full-example/docs/skill.md +18 -14
  23. package/examples/full-example/justfile +5 -17
  24. package/examples/full-example/scripts/create-identity.ts +2 -1
  25. package/examples/full-example/src/commands/status/command.test.ts +2 -2
  26. package/examples/full-example/src/commands/status/command.ts +7 -6
  27. package/examples/full-example/src/program.ts +4 -10
  28. package/examples/full-example-json/AGENTS.md +86 -0
  29. package/examples/full-example-json/CLAUDE.md +1 -0
  30. package/examples/full-example-json/Formula/.gitkeep +0 -0
  31. package/examples/full-example-json/Formula/full-example-json.rb +35 -0
  32. package/examples/full-example-json/README.md +27 -0
  33. package/examples/full-example-json/biome.json +22 -0
  34. package/examples/full-example-json/bun.lock +48 -0
  35. package/examples/full-example-json/docs/README.md +27 -0
  36. package/examples/full-example-json/docs/cli-schema.json +2145 -0
  37. package/examples/full-example-json/docs/cli.md +1990 -0
  38. package/examples/full-example-json/docs/http.md +92 -0
  39. package/examples/full-example-json/docs/mcp.md +116 -0
  40. package/examples/full-example-json/docs/openapi.json +1246 -0
  41. package/examples/full-example-json/docs/skill.md +57 -0
  42. package/examples/full-example-json/justfile +171 -0
  43. package/examples/full-example-json/package.json +22 -0
  44. package/examples/full-example-json/scripts/create-identity.ts +12 -0
  45. package/examples/full-example-json/scripts/dev-formula.ts +97 -0
  46. package/examples/full-example-json/scripts/formula-shared.test.ts +68 -0
  47. package/examples/full-example-json/scripts/formula-shared.ts +170 -0
  48. package/examples/full-example-json/scripts/print-identity.ts +28 -0
  49. package/examples/full-example-json/scripts/release.ts +212 -0
  50. package/examples/full-example-json/src/commands/echo/command.ts +26 -0
  51. package/examples/full-example-json/src/commands/status/command.test.ts +10 -0
  52. package/examples/full-example-json/src/commands/status/command.ts +28 -0
  53. package/examples/full-example-json/src/index.ts +10 -0
  54. package/examples/full-example-json/src/program.ts +33 -0
  55. package/examples/full-example-json/src/types/md.d.ts +4 -0
  56. package/examples/full-example-json/tsconfig.json +17 -0
  57. package/examples/minimal.ts +17 -17
  58. package/examples/nested.ts +10 -10
  59. package/examples/option-required.ts +13 -13
  60. package/examples/servers.ts +10 -10
  61. package/index.d.ts +17 -43
  62. package/package.json +1 -1
  63. package/src/cli-tool/create.test.ts +44 -68
  64. package/src/cli-tool/create.ts +81 -17
  65. package/src/cli-tool/full-example-capabilities.test.ts +33 -18
  66. package/src/cli-tool/post-create.ts +31 -17
  67. package/src/cli-tool/program.ts +16 -7
  68. package/src/cli-tool/prompt.ts +27 -0
  69. package/src/cli-tool/run-create.ts +19 -7
  70. package/src/cli-tool/schemagen/schemagen.test.ts +3 -3
  71. package/src/configure/artifacts/install-validate.test.ts +20 -33
  72. package/src/configure/artifacts/paths.ts +9 -53
  73. package/src/configure/artifacts/status.test.ts +13 -16
  74. package/src/configure/artifacts/status.ts +5 -22
  75. package/src/configure/artifacts/target-base.ts +6 -15
  76. package/src/configure/artifacts/target-effective.ts +16 -54
  77. package/src/configure/artifacts/target-mcp-json.ts +2 -5
  78. package/src/configure/artifacts/target-registry.ts +0 -7
  79. package/src/configure/artifacts/target-scope.ts +7 -17
  80. package/src/configure/artifacts/target-skill.ts +6 -15
  81. package/src/configure/artifacts/target-types.ts +6 -54
  82. package/src/configure/artifacts/targets/agents-mcp.ts +11 -0
  83. package/src/configure/artifacts/targets/configure.ts +1 -5
  84. package/src/configure/artifacts/targets/index.ts +4 -44
  85. package/src/configure/artifacts/targets/skill.ts +12 -0
  86. package/src/configure/artifacts/targets.test.ts +21 -59
  87. package/src/configure/configure.test.ts +35 -46
  88. package/src/configure/index.ts +19 -19
  89. package/src/configure/prompt.ts +2 -12
  90. package/src/core/parse.test.ts +21 -32
  91. package/src/core/types.ts +18 -44
  92. package/src/core/validate.ts +28 -45
  93. package/src/docs/docs.test.ts +4 -4
  94. package/src/docs/mcp-guide.ts +41 -71
  95. package/src/docs/resolve.ts +1 -1
  96. package/src/exports/cli.ts +1 -1
  97. package/src/index.ts +1 -1
  98. package/src/skill/generate.ts +26 -45
  99. package/src/skill/install.ts +18 -38
  100. package/src/skill/naming.ts +3 -27
  101. package/src/test/integration/config.test.ts +3 -3
  102. package/src/test/integration/mcp.test.ts +4 -4
  103. package/{examples/mcp-test.ts → src/test/mcp-integration-fixture.ts} +20 -22
  104. package/src/configure/artifacts/target-mcp-cli.ts +0 -127
  105. package/src/configure/artifacts/targets/chatgpt-mcp.ts +0 -12
  106. package/src/configure/artifacts/targets/claude-code-mcp.ts +0 -15
  107. package/src/configure/artifacts/targets/claude-desktop-mcp.ts +0 -12
  108. package/src/configure/artifacts/targets/claude-skill.ts +0 -16
  109. package/src/configure/artifacts/targets/codex-mcp.ts +0 -25
  110. package/src/configure/artifacts/targets/codex-skill.ts +0 -14
  111. package/src/configure/artifacts/targets/cursor-mcp.ts +0 -15
  112. package/src/configure/artifacts/targets/cursor-skill.ts +0 -16
  113. package/src/configure/artifacts/targets/openclaw-mcp.ts +0 -25
  114. package/src/configure/artifacts/targets/openclaw-skill.ts +0 -17
  115. package/src/configure/artifacts/targets/opencode-mcp.ts +0 -96
  116. package/src/configure/artifacts/targets/opencode-skill.ts +0 -15
  117. /package/examples/{full-example → full-example-json}/src/commands/render-json/__generated__/RenderJsonInputSchema.json +0 -0
  118. /package/examples/{full-example → full-example-json}/src/commands/render-json/__generated__/index.ts +0 -0
  119. /package/examples/{full-example → full-example-json}/src/commands/render-json/command.test.ts +0 -0
  120. /package/examples/{full-example → full-example-json}/src/commands/render-json/command.ts +0 -0
  121. /package/examples/{full-example → full-example-json}/src/commands/render-json/types.ts +0 -0
  122. /package/examples/{full-example → full-example-json}/src/commands/status/__generated__/StatusJsonOutputSchema.json +0 -0
  123. /package/examples/{full-example → full-example-json}/src/commands/status/__generated__/index.ts +0 -0
  124. /package/examples/{full-example → full-example-json}/src/commands/status/types.ts +0 -0
  125. /package/examples/{full-example → full-example-json}/src/commands/workspaces/__generated__/WorkspaceNameInputSchema.json +0 -0
  126. /package/examples/{full-example → full-example-json}/src/commands/workspaces/__generated__/index.ts +0 -0
  127. /package/examples/{full-example → full-example-json}/src/commands/workspaces/command.test.ts +0 -0
  128. /package/examples/{full-example → full-example-json}/src/commands/workspaces/command.ts +0 -0
  129. /package/examples/{full-example → full-example-json}/src/commands/workspaces/types.ts +0 -0
  130. /package/examples/{full-example → full-example-json}/src/db/index.test.ts +0 -0
  131. /package/examples/{full-example → full-example-json}/src/db/index.ts +0 -0
  132. /package/examples/{full-example → full-example-json}/src/db/migrate.test.ts +0 -0
  133. /package/examples/{full-example → full-example-json}/src/db/migrate.ts +0 -0
  134. /package/examples/{full-example → full-example-json}/src/db/migrations/001_workspaces.sql +0 -0
  135. /package/examples/{full-example → full-example-json}/src/db/tables/workspaces.ts +0 -0
  136. /package/examples/{full-example → full-example-json}/src/types/argsbarg.d.ts +0 -0
package/docs/mcp.md CHANGED
@@ -44,86 +44,50 @@ bun run examples/nested.ts mcp
44
44
 
45
45
  ## Client setup
46
46
 
47
- ### Cursor
47
+ ### `.agents` auto-install
48
48
 
49
- Add a server entry under `mcpServers` in your Cursor MCP config:
49
+ When `mcpServer.enabled` is set, `configure --sync` merges a `mcpServers` entry into `~/.agents/mcp.json` per the https://dotagentsprotocol.com:
50
50
 
51
- ```json
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
- Use your real binary or script path. For a compiled CLI, `command` can be the installed binary and `args` can be `["mcp"]`.
55
+ ### Manual client setup
63
56
 
64
- ### Claude Code
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
- "$schema": "https://opencode.ai/config.json",
87
- "mcp": {
61
+ "mcpServers": {
88
62
  "myapp": {
89
- "type": "local",
90
- "command": ["myapp", "mcp"],
91
- "enabled": true
63
+ "command": "myapp",
64
+ "args": ["mcp"]
92
65
  }
93
66
  }
94
67
  }
95
68
  ```
96
69
 
97
- OpenCode reads `opencode.jsonc`, `opencode.json`, or `config.json` in that directory. Argsbarg updates the first existing file, or creates `config.json`. JSON-with-comments (`.jsonc`) is not auto-edited — add the block manually or use a `.json` config file.
98
-
99
- ### OpenAI Codex
100
-
101
- When **`codex`** is on PATH, **`configure`** (MCP targets) runs `codex mcp add <server> -- <binary> mcp`, which writes **`~/.codex/config.toml`**. Otherwise add manually:
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
- **Web / Connectors (OpenAI’s documented path)** — **Settings → Connectors → Developer mode** with a **remote HTTPS MCP URL**. ChatGPT does not spawn local stdio binaries; bridge and tunnel local servers when needed.
76
+ Restart Cursor or reload MCP after editing. Restart Claude Desktop after config changes.
114
77
 
115
- **Desktop JSON (gated auto-install)** — when ChatGPT app data exists, **`configure`** (MCP targets) also merges `mcpServers` into:
78
+ **Claude Desktop** config paths:
116
79
 
117
80
  | Platform | Path |
118
81
  | --- | --- |
119
- | macOS | `~/Library/Application Support/ChatGPT/chatgpt_mcp_config.json` |
120
- | Windows | `%APPDATA%\OpenAI\ChatGPT\chatgpt_mcp_config.json` |
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
- Local JSON support varies by desktop build. Prefer **Connectors** for ChatGPT web or when tools do not appear after install.
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
 
@@ -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
 
@@ -212,9 +212,9 @@ 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 `**… conventions:**` block in `.cursor/rules/cli-program.mdc` pointing at `node_modules/argsbarg/docs/output-schema.md`.
215
+ Add a bullet under your app’s `**… conventions:**` block in `AGENTS.md` 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
 
@@ -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);
@@ -0,0 +1,75 @@
1
+ # full-example
2
+
3
+ ## Tooling
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`, `docs/skill.md`
12
+
13
+ <!-- argsbarg:managed -->
14
+
15
+ ## Argsbarg schema
16
+
17
+ When adding or changing argsbarg schema, leaf handlers, or MCP exposure:
18
+
19
+ 1. **Read** `node_modules/argsbarg/docs/cli-program.md` (required — authoritative guide).
20
+ 2. MCP tools, varargs → `node_modules/argsbarg/docs/mcp.md`.
21
+ 3. JSON stdout / `outputSchema` and `@sg` schemagen → `node_modules/argsbarg/docs/output-schema.md` and `examples/full-example-json/`.
22
+ 4. App config / `program.appConfig` → `node_modules/argsbarg/docs/config-schema.md`.
23
+ 5. `configure`, Homebrew distribution → `node_modules/argsbarg/docs/configure.md` and `distribution-homebrew.md`.
24
+ 6. Bundled `docs` built-in → `node_modules/argsbarg/docs/bundled-docs.md`.
25
+ 7. **Examples** (shipped under `node_modules/argsbarg/examples/`):
26
+ - **CLI copy template** (this repo) — builtins only, no schemagen
27
+ - **Schema-first copy template** — `@sg`, `inputSchema`/`outputSchema`, REST CRUD → `examples/full-example-json/`
28
+
29
+ **Hard rules** (details and examples are in the docs above — do not contradict them):
30
+
31
+ - Reserved root commands: `completion`, `configure`, `mcp`, `version`, `docs`.
32
+ - `satisfies CliProgram` / `CliLeaf`; action-oriented `description` on root, commands, options, and positionals.
33
+ - Omit `mcpTool` unless genuinely CLI-only (`enabled: false`) or an irreducible wire limit — fix schema and headless handlers first.
34
+ - Interactive leaves: one headless path for MCP, non-TTY CLI, and `--yes` / `--dry-run` / `--json` (`shouldRunHeadless*`, `requireYesInNonTty`); not raw `isTTY`.
35
+ - String options: `format` / `default` / `pattern` per `cli-program.md`.
36
+ - Varargs (`argMax: 0`): CLI space-separated; MCP JSON array only — no comma-splitting positionals.
37
+
38
+ ## Code conventions
39
+
40
+ ### JSDoc
41
+
42
+ Add doc comments for exported surfaces that are not obvious from the name alone. Skip comments on short test callbacks and pure re-export files.
43
+
44
+ ### Names
45
+
46
+ Use names that describe the domain role, not generic placeholders like `data` or `handler`, except in very small scopes.
47
+
48
+ ### Structure
49
+
50
+ After imports, put **exported** symbols first (alphabetical within each kind), then **module-private** helpers at the bottom. Use `~/…` only where you would otherwise use `../` (or deeper) to reach another module under `src/`. Same-directory (`./`) and child (`./foo/…`) imports stay relative. Use `.ts` extensions.
51
+
52
+ ### Module boundaries
53
+
54
+ | Path | Owns | Must not |
55
+ | --- | --- | --- |
56
+ | `src/index.ts` | Thin entry: `new Cli(program).run()` | Inline leaf handlers, business logic |
57
+ | `src/types/` | Global type declarations (e.g. `md.d.ts`) | Runtime logic |
58
+ | `src/program.ts` | `CliProgram` assembly: `docs`, `commands: […]` | Inline leaf handlers, business logic |
59
+ | `src/commands/<name>/` | One user-facing command: `command.ts` | Shared helpers unrelated to the command |
60
+ | `scripts/` | Dev tooling (formula helpers) | Production command paths |
61
+
62
+ When adding commands: `src/commands/<name>/command.ts`; register in `program.ts` **alphabetically by command key**.
63
+
64
+ **Argsbarg schema:** see Argsbarg schema section above.
65
+
66
+ ### Execution
67
+
68
+ - **CLI:** `bun ./src/index.ts …` or `just run …`
69
+ - **Tests:** `just test` (after `just check`)
70
+
71
+ <!-- /argsbarg:managed -->
72
+
73
+ **full-example conventions:**
74
+
75
+ Replace with app-specific bullets.
@@ -0,0 +1 @@
1
+ @AGENTS.md
@@ -1,16 +1,16 @@
1
1
  # full-example
2
2
 
3
- Argsbarg copy template / reference app (not a kitchen-sink product).
3
+ Argsbarg **CLI copy template** — production shell without schemagen (not a kitchen-sink product).
4
+
5
+ For `@sg` schemagen, JSON Schema validation, and REST CRUD patterns, use `examples/full-example-json/` or `argsbarg create --template json`.
4
6
 
5
7
  ## What's in this app
6
8
 
7
- - **Builtins enabled:** CLI, shell completion, `docs`, MCP, HTTP API, `configure` (wizard available; no default `appConfig` in the template)
9
+ - **Builtins enabled:** CLI, shell completion, `docs`, MCP, HTTP API, `configure`, agent skills
8
10
  - **Commands:**
9
- - `echo` — simple flags/positionals
10
- - `render-json` — `kind: "json"` leaf, schemagen `inputSchema`, `ctx.inputsAs`
11
- - `status` — schemagen `outputSchema`, `--json`
12
- - `workspaces` — REST CRUD, `:id` param routers, verb leaves, schemagen input schemas
13
- - **Tooling:** `@sg` schemagen, `just docgen`, Homebrew/just dev workflow
11
+ - `echo` — simple flags/positionals (MCP-friendly)
12
+ - `status` — app version with optional `--json` (no `outputSchema`)
13
+ - **Tooling:** `just docgen`, Homebrew/just dev workflow (no schemagen)
14
14
 
15
15
  ## Quick start
16
16
 
@@ -19,68 +19,6 @@ From a git checkout at this directory (requires [Homebrew](https://brew.sh), [ju
19
19
  ```bash
20
20
  brew install just bun
21
21
  just setup
22
- just schemagen # after changing @sg types in src/
23
22
  just run status --json
24
23
  just run docs readme
25
24
  ```
26
-
27
- ## Install
28
-
29
- Requires [Homebrew](https://brew.sh).
30
-
31
- ### End users
32
-
33
- Private GitHub release downloads require [GitHub CLI](https://cli.github.com/) authentication. Run once before `brew install` or `brew upgrade`:
34
-
35
- ```bash
36
- brew install gh # skip if already installed
37
- gh auth login # skip if already authenticated
38
- ```
39
-
40
- Install:
41
-
42
- ```bash
43
- brew tap bdombro/bun-argsbarg git@github.com:bdombro/bun-argsbarg.git
44
- brew install bdombro/bun-argsbarg/full-example
45
- ```
46
-
47
- Upgrade:
48
-
49
- ```bash
50
- brew upgrade full-example
51
- ```
52
-
53
- Shell completions install during `brew install`. See [Homebrew Shell Completion](https://docs.brew.sh/Shell-Completion).
54
-
55
- ### Developers
56
-
57
- Requires [Homebrew](https://brew.sh), [just](https://just.systems), and [Bun](https://bun.sh). From the repository root (this directory — the folder with `justfile` and `Formula/`):
58
-
59
- ```bash
60
- brew install just bun
61
- just setup
62
- just install # build + local dev formula
63
- just reinstall-local # fast binary swap during development
64
- just install-production # remote tap install (requires gh auth login)
65
- just test-release
66
- ```
67
-
68
- Undo a local dev install: `just uninstall` (formula + agent artifacts), `just uninstall-config` (app config only, without uninstalling the formula).
69
-
70
- ## Schemagen (`@sg`)
71
-
72
- Mark schema-facing types with `/** @sg */` immediately above the declaration (no blank line). Run `argsbarg schemagen` (via `just schemagen` or `just setup`).
73
-
74
- | Type | Generated artifact | Import |
75
- | --- | --- | --- |
76
- | `RenderJsonInput` | `RenderJsonInputSchema.json` | `RenderJsonInputSchema` from `./__generated__` |
77
- | `StatusJsonOutput` | `StatusJsonOutputSchema.json` | `StatusJsonOutputSchema` from `./__generated__` |
78
- | `WorkspaceNameInput` | `WorkspaceNameInputSchema.json` | `WorkspaceNameInputSchema` from `./__generated__` |
79
-
80
- ## Consumer docs
81
-
82
- Regenerate committed reference docs under `docs/` (see [docs/README.md](docs/README.md)):
83
-
84
- ```bash
85
- just docgen
86
- ```
@@ -5,7 +5,7 @@ Reference template for argsbarg consumer docgen. Every builtin is enabled in `sr
5
5
  | If you are… | Read |
6
6
  | --- | --- |
7
7
  | **Using the CLI** | [../README.md](../README.md) |
8
- | **Authoring argsbarg schema** | `node_modules/argsbarg/docs/cli-program.md` — see `.cursor/rules/cli-program.mdc` |
8
+ | **Authoring argsbarg schema** | `node_modules/argsbarg/docs/cli-program.md` — see [`AGENTS.md`](../AGENTS.md) |
9
9
  | **HTTP API / curl** | [http.md](http.md) — generated; or run `full-example docs http` |
10
10
  | **MCP tools** | [mcp.md](mcp.md) — generated; or run `full-example docs mcp` |
11
11
  | **Full command tree (markdown)** | [cli.md](cli.md) — generated |