argsbarg 5.1.2 → 5.1.3
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 +6 -1
- package/README.md +49 -5
- package/docs/configure.md +5 -5
- package/docs/distribution-homebrew.md +18 -6
- package/docs/output-schema.md +1 -1
- package/examples/full-example/README.md +43 -58
- package/examples/full-example/scripts/create-identity.ts +1 -1
- package/examples/full-example/scripts/ensure-brew-github-token.sh +2 -1
- package/examples/full-example/scripts/formula-shared.ts +6 -6
- package/package.json +1 -1
- package/src/builtins/builtins.test.ts +2 -1
- package/src/builtins/configure-copy.ts +2 -4
- package/src/docs/api-guide.test.ts +3 -2
- package/src/parse.test.ts +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,11 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [5.1.3] - 2026-07-04
|
|
11
|
+
|
|
12
|
+
|
|
10
13
|
## [5.1.2] - 2026-07-04
|
|
11
14
|
|
|
12
15
|
### Changed
|
|
13
16
|
|
|
14
17
|
- **Private GitHub release installs** — release formulae use `GitHubPrivateReleaseDownloadStrategy` (GitHub API + `GitHub::API.credentials` / `HOMEBREW_GITHUB_API_TOKEN`); `just install-production` and `just test-release` export the token (with `gh auth token` fallback). Documented in `docs/distribution-homebrew.md`.
|
|
18
|
+
- **Homebrew install docs** — README template and consumer READMEs document private-tap install; `configure` CLI notes stay post-install only.
|
|
15
19
|
|
|
16
20
|
## [5.1.1] - 2026-07-04
|
|
17
21
|
|
|
@@ -601,7 +605,8 @@ const cli = { ... } satisfies CliProgram; // or : CliProgram
|
|
|
601
605
|
- 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`).
|
|
602
606
|
- Imports: use `CliPositional` where needed; replace `CliOptionDef` with `CliOption` or `CliPositional` as appropriate.
|
|
603
607
|
|
|
604
|
-
[Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v5.1.
|
|
608
|
+
[Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v5.1.3...HEAD
|
|
609
|
+
[5.1.3]: https://github.com/bdombro/bun-argsbarg/releases/tag/v5.1.3
|
|
605
610
|
[5.1.2]: https://github.com/bdombro/bun-argsbarg/releases/tag/v5.1.2
|
|
606
611
|
[5.1.1]: https://github.com/bdombro/bun-argsbarg/releases/tag/v5.1.1
|
|
607
612
|
[5.1.0]: https://github.com/bdombro/bun-argsbarg/releases/tag/v5.1.0
|
package/README.md
CHANGED
|
@@ -112,11 +112,11 @@ See **[docs/mcp.md](docs/mcp.md)** for configuration, env bootstrapping, custom
|
|
|
112
112
|
|
|
113
113
|
### Configure CLI
|
|
114
114
|
|
|
115
|
-
Ship via **Homebrew** (tap-from-repo). The formula installs the binary and shell completions; `post_install` runs agent artifact refresh
|
|
115
|
+
Ship via **Homebrew** (tap-from-repo). The formula installs the binary and shell completions; `post_install` runs agent artifact refresh. Private taps need `HOMEBREW_GITHUB_API_TOKEN` on install — see [docs/distribution-homebrew.md](docs/distribution-homebrew.md#end-user-install).
|
|
116
116
|
|
|
117
117
|
```bash
|
|
118
|
-
brew tap <org>/<repo>
|
|
119
|
-
brew install <tap>/myapp
|
|
118
|
+
brew tap <org>/<repo> git@github.com:<org>/<repo>.git
|
|
119
|
+
HOMEBREW_GITHUB_API_TOKEN="$(gh auth token)" brew install <tap>/myapp
|
|
120
120
|
myapp configure # interactive per-target setup; opt-in app config wizard
|
|
121
121
|
```
|
|
122
122
|
|
|
@@ -224,7 +224,51 @@ Check the `examples/` directory for full working scripts:
|
|
|
224
224
|
| `ArgsBargFullExample` | `examples/full-example/` | **Copy template:** all builtins, schemagen, Homebrew justfile, `outputSchema`, `from "argsbarg"`. |
|
|
225
225
|
|
|
226
226
|
|
|
227
|
-
Examples ship in the npm package under `node_modules/argsbarg/examples/`.
|
|
227
|
+
Examples ship in the npm package under `node_modules/argsbarg/examples/`.
|
|
228
|
+
|
|
229
|
+
## Bootstrap a new CLI
|
|
230
|
+
|
|
231
|
+
Copy the shipped `examples/full-example` template into a new directory:
|
|
232
|
+
|
|
233
|
+
Interactive (TTY):
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
bunx argsbarg create my-cli
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Non-interactive:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
bunx argsbarg create my-cli \
|
|
243
|
+
--key my-cli --release-repo org/my-cli --yes
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Edit `scripts/create-identity.ts` in the new repo to set `desc` (used by `program.description` and the Homebrew formula).
|
|
247
|
+
|
|
248
|
+
`create` copies the template (including `.cursor/rules/cli-program.mdc`), substitutes `{key}` / `{tap}` / `{releaseRepo}` placeholders in `README.md` and other files, runs `bun install`, schemagen, `bun test`, and `git init` + Initial commit when appropriate.
|
|
249
|
+
|
|
250
|
+
**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`.
|
|
251
|
+
|
|
252
|
+
Verify an existing tree: `bunx argsbarg create --check .`
|
|
253
|
+
|
|
254
|
+
To refresh the Cursor rule in an existing consumer: `bun scripts/merge-cli-program-rule.ts .` from an argsbarg checkout (or pass the npm package path to the template).
|
|
255
|
+
|
|
256
|
+
### What the full-example template includes
|
|
257
|
+
|
|
258
|
+
| Area | Files / wiring |
|
|
259
|
+
| --- | --- |
|
|
260
|
+
| All builtins | `completion`, `version`, `configure`, `docs`, `mcp`, `configure get`/`set` |
|
|
261
|
+
| `program.appConfig` | `src/types.ts` (`AppConfig`) → `schemas/configSchemas.ts` |
|
|
262
|
+
| `outputSchema` | `src/commands/status/types.ts` → `schemas/outputSchemas.ts` |
|
|
263
|
+
| Schemagen | `scripts/schemagen.ts` + `scripts/schemagen/discover-schema-roots.ts` |
|
|
264
|
+
| Command layout | `src/commands/<name>/command.ts`; registration in `src/program.ts` |
|
|
265
|
+
| MCP doc topics | `docs.topics` auto-exposed as `<key>://docs/<topic>` resources when docs + MCP enabled |
|
|
266
|
+
| Package import | `from "argsbarg"` (not relative to argsbarg `src/`) |
|
|
267
|
+
| Homebrew distribution | `scripts/formula-shared.ts`, `scripts/gen-dev-formula.ts`, `Formula/`, `justfile` |
|
|
268
|
+
| Dev tooling | Biome (`just format` / `just lint`), TypeScript, colocated tests |
|
|
269
|
+
| Cursor rules | `.cursor/rules/cli-program.mdc`, `.cursor/rules/code.mdc` |
|
|
270
|
+
|
|
271
|
+
When changing builtins or the template, run `just check-full-example` from the argsbarg repo root.
|
|
228
272
|
|
|
229
273
|
```bash
|
|
230
274
|
export PATH="$PATH:$(pwd)/examples"
|
|
@@ -240,7 +284,7 @@ nested.ts read ./README.md
|
|
|
240
284
|
bun ./examples/formats.ts run --tags demo,docs --on 2026-06-22
|
|
241
285
|
|
|
242
286
|
cd examples/full-example && just setup && just schemagen
|
|
243
|
-
|
|
287
|
+
just run status --json
|
|
244
288
|
```
|
|
245
289
|
|
|
246
290
|
|
package/docs/configure.md
CHANGED
|
@@ -6,15 +6,15 @@ Opt out with `configure: { enabled: false }` on the program root.
|
|
|
6
6
|
|
|
7
7
|
## End-user install (Homebrew)
|
|
8
8
|
|
|
9
|
+
Private GitHub release downloads require `HOMEBREW_GITHUB_API_TOKEN` on `brew install` and `brew upgrade`. See [distribution-homebrew.md](distribution-homebrew.md#end-user-install) for token setup (`gh auth token` or a personal access token with **Contents** read).
|
|
10
|
+
|
|
9
11
|
```bash
|
|
10
|
-
brew tap <org>/<repo>
|
|
11
|
-
brew install <tap>/<key>
|
|
12
|
+
brew tap <org>/<repo> git@github.com:<org>/<repo>.git
|
|
13
|
+
HOMEBREW_GITHUB_API_TOKEN="$(gh auth token)" brew install <tap>/<key>
|
|
12
14
|
<key> configure # interactive: per-target prompts; run when app config is required
|
|
13
15
|
```
|
|
14
16
|
|
|
15
|
-
Upgrade with `brew upgrade <key>`. Shell completions are installed by Homebrew during `brew install`. Users must configure their shell per [Homebrew Shell Completion](https://docs.brew.sh/Shell-Completion).
|
|
16
|
-
|
|
17
|
-
Private GitHub release assets require `HOMEBREW_GITHUB_API_TOKEN` at install time — see [distribution-homebrew.md](distribution-homebrew.md#end-user-install).
|
|
17
|
+
Upgrade with `HOMEBREW_GITHUB_API_TOKEN="$(gh auth token)" brew upgrade <key>`. Shell completions are installed by Homebrew during `brew install`. Users must configure their shell per [Homebrew Shell Completion](https://docs.brew.sh/Shell-Completion).
|
|
18
18
|
|
|
19
19
|
**Uninstall the binary:** remove agent artifacts first (while the CLI is still on PATH), then `brew uninstall`:
|
|
20
20
|
|
|
@@ -14,18 +14,30 @@ Argsbarg apps distribute the **binary and shell completions** through Homebrew,
|
|
|
14
14
|
|
|
15
15
|
### End-user install
|
|
16
16
|
|
|
17
|
+
For **private or internal GitHub taps**, prepend `HOMEBREW_GITHUB_API_TOKEN` on `brew install` and `brew upgrade` (release formulae download via the GitHub API).
|
|
18
|
+
|
|
19
|
+
If [GitHub CLI](https://cli.github.com/) is installed:
|
|
20
|
+
|
|
17
21
|
```bash
|
|
18
|
-
brew tap <org>/<repo>
|
|
19
|
-
brew install <tap>/{key}
|
|
22
|
+
brew tap <org>/<repo> git@github.com:<org>/<repo>.git
|
|
23
|
+
HOMEBREW_GITHUB_API_TOKEN="$(gh auth token)" brew install <tap>/{key}
|
|
20
24
|
{key} configure # when app config is required
|
|
21
25
|
```
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
Without `gh`, create a personal access token at [github.com/settings/personal-access-tokens/new](https://github.com/settings/personal-access-tokens/new):
|
|
28
|
+
|
|
29
|
+
- Resource owner — your org (e.g. sqsp)
|
|
30
|
+
- Repository access — the tap repo or all repositories
|
|
31
|
+
- Permissions — **Contents** (read-only)
|
|
24
32
|
|
|
25
33
|
```bash
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
HOMEBREW_GITHUB_API_TOKEN=YOUR_TOKEN brew install <tap>/{key}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Upgrade:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
HOMEBREW_GITHUB_API_TOKEN="$(gh auth token)" brew upgrade {key}
|
|
29
41
|
```
|
|
30
42
|
|
|
31
43
|
Local dev installs (`just install-local`) use a `file://` staging URL and do not need the token.
|
package/docs/output-schema.md
CHANGED
|
@@ -43,7 +43,7 @@ Production CLIs with several JSON commands tend to use **codegen** so types, han
|
|
|
43
43
|
|
|
44
44
|
## Recommended pipeline (copy per repo)
|
|
45
45
|
|
|
46
|
-
No shared npm package — each app copies the same **contract**. Reference implementations: **sqsp-qa-manager**, **idp-trees**, **
|
|
46
|
+
No shared npm package — each app copies the same **contract**. Reference implementations: **sqsp-qa-manager-poc**, **idp-trees**, **sqsp-i18n-tools-poc** (see each repo’s `docs/architecture.md` for which commands use which schema root).
|
|
47
47
|
|
|
48
48
|
```mermaid
|
|
49
49
|
flowchart LR
|
|
@@ -1,77 +1,69 @@
|
|
|
1
1
|
# full-example
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Argsbarg full example reference app
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Quick start
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
| --- | --- |
|
|
9
|
-
| All builtins | `completion`, `version`, `configure`, `docs`, `mcp`, `configure get`/`set` |
|
|
10
|
-
| `program.appConfig` | `src/types.ts` (`AppConfig`) → `schemas/configSchemas.ts` |
|
|
11
|
-
| `outputSchema` | `src/commands/status/types.ts` (`StatusJsonOutput`) → `schemas/outputSchemas.ts` |
|
|
12
|
-
| Schemagen | `scripts/schemagen.ts` + `scripts/schemagen/discover-schema-roots.ts` |
|
|
13
|
-
| Command layout | `src/commands/<name>/command.ts`; registration in `src/program.ts` |
|
|
14
|
-
| MCP doc topics | `docs.topics` auto-exposed as `<key>://docs/<topic>` resources when docs + MCP enabled |
|
|
15
|
-
| Package import | `from "argsbarg"` (not relative to argsbarg `src/`) |
|
|
16
|
-
| Homebrew distribution | `scripts/formula-shared.ts`, `scripts/gen-dev-formula.ts`, `Formula/`, `justfile` |
|
|
17
|
-
| Dev tooling | Biome (`just format` / `just lint`), TypeScript, colocated tests |
|
|
18
|
-
| Cursor rules | `.cursor/rules/cli-program.mdc`, `.cursor/rules/code.mdc` |
|
|
19
|
-
|
|
20
|
-
## Bootstrap a new CLI
|
|
21
|
-
|
|
22
|
-
Interactive (TTY):
|
|
7
|
+
From a git checkout at this directory (requires [Homebrew](https://brew.sh), [just](https://just.systems), and [Bun](https://bun.sh)):
|
|
23
8
|
|
|
24
9
|
```bash
|
|
25
|
-
|
|
10
|
+
brew install just bun
|
|
11
|
+
just setup
|
|
12
|
+
just schemagen # after changing src/**/types.ts
|
|
13
|
+
just run status --json
|
|
14
|
+
just run docs readme
|
|
26
15
|
```
|
|
27
16
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
bunx argsbarg create my-cli \
|
|
32
|
-
--key my-cli --release-repo org/my-cli --yes
|
|
33
|
-
```
|
|
17
|
+
Run `full-example configure` when the app needs secrets or other app config (interactive wizard).
|
|
34
18
|
|
|
35
|
-
|
|
19
|
+
## Install
|
|
36
20
|
|
|
37
|
-
|
|
21
|
+
Requires [Homebrew](https://brew.sh).
|
|
38
22
|
|
|
39
|
-
|
|
23
|
+
### End users
|
|
40
24
|
|
|
41
|
-
|
|
25
|
+
Private GitHub release downloads require `HOMEBREW_GITHUB_API_TOKEN` on `brew install` and `brew upgrade`.
|
|
42
26
|
|
|
43
|
-
|
|
27
|
+
If [GitHub CLI](https://cli.github.com/) is installed:
|
|
44
28
|
|
|
45
29
|
```bash
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
FULL_EXAMPLE_API_TOKEN=dev just run status --json
|
|
50
|
-
FULL_EXAMPLE_API_TOKEN=dev just run configure get apiToken --json
|
|
51
|
-
FULL_EXAMPLE_API_TOKEN=dev just run docs readme
|
|
30
|
+
brew tap bdombro/bun-argsbarg git@github.com:bdombro/bun-argsbarg.git
|
|
31
|
+
HOMEBREW_GITHUB_API_TOKEN="$(gh auth token)" brew install bdombro/bun-argsbarg/full-example
|
|
32
|
+
full-example configure
|
|
52
33
|
```
|
|
53
34
|
|
|
54
|
-
|
|
35
|
+
Without `gh`, create a personal access token at [github.com/settings/personal-access-tokens/new](https://github.com/settings/personal-access-tokens/new):
|
|
55
36
|
|
|
56
|
-
|
|
37
|
+
- Resource owner — your org
|
|
38
|
+
- Repository access — this repo (or all repositories)
|
|
39
|
+
- Permissions — **Contents** (read-only)
|
|
57
40
|
|
|
58
41
|
```bash
|
|
59
|
-
|
|
60
|
-
just install-local # first-time dev formula (`just install` is an alias)
|
|
61
|
-
just reinstall-local # fast binary swap during development
|
|
62
|
-
just install-production # uninstall local dev, install from GitHub tap (needs HOMEBREW_GITHUB_API_TOKEN for private repos)
|
|
63
|
-
just test-release # same token requirement when formula uses a GitHub release URL
|
|
42
|
+
HOMEBREW_GITHUB_API_TOKEN=YOUR_TOKEN brew install bdombro/bun-argsbarg/full-example
|
|
64
43
|
```
|
|
65
44
|
|
|
66
|
-
|
|
45
|
+
Upgrade:
|
|
67
46
|
|
|
68
47
|
```bash
|
|
69
|
-
|
|
70
|
-
just uninstall-config # app config only
|
|
71
|
-
just uninstall-release # release formula (keeps tap)
|
|
48
|
+
HOMEBREW_GITHUB_API_TOKEN="$(gh auth token)" brew upgrade full-example
|
|
72
49
|
```
|
|
73
50
|
|
|
74
|
-
See [
|
|
51
|
+
Shell completions install during `brew install`. See [Homebrew Shell Completion](https://docs.brew.sh/Shell-Completion).
|
|
52
|
+
|
|
53
|
+
### Developers
|
|
54
|
+
|
|
55
|
+
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/`):
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
brew install just bun
|
|
59
|
+
just setup
|
|
60
|
+
just install # build + local dev formula
|
|
61
|
+
just reinstall-local # fast binary swap during development
|
|
62
|
+
just install-production # remote tap install (needs HOMEBREW_GITHUB_API_TOKEN)
|
|
63
|
+
just test-release
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Undo a local dev install: `just uninstall` (formula + agent artifacts), `just uninstall-config` (app config only).
|
|
75
67
|
|
|
76
68
|
## Schemagen markers
|
|
77
69
|
|
|
@@ -84,15 +76,8 @@ Discovery walks `src/**/types.ts` only.
|
|
|
84
76
|
|
|
85
77
|
## Environment
|
|
86
78
|
|
|
79
|
+
Optional overrides for `program.appConfig` (the configure wizard is the usual path):
|
|
80
|
+
|
|
87
81
|
| Variable | Purpose |
|
|
88
82
|
| --- | --- |
|
|
89
|
-
| `FULL_EXAMPLE_API_TOKEN` | Overrides `apiToken`
|
|
90
|
-
|
|
91
|
-
## Maintainers (argsbarg repo)
|
|
92
|
-
|
|
93
|
-
When adding or changing builtins, update this example and run:
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
just check-full-example # from argsbarg repo root
|
|
97
|
-
just test # from examples/full-example
|
|
98
|
-
```
|
|
83
|
+
| `FULL_EXAMPLE_API_TOKEN` | Overrides `apiToken` when set in the shell |
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export const createIdentity = {
|
|
4
4
|
key: "full-example",
|
|
5
5
|
className: "FullExample",
|
|
6
|
-
tap: "
|
|
6
|
+
tap: "bdombro/bun-argsbarg",
|
|
7
7
|
homepage: "https://github.com/bdombro/bun-argsbarg",
|
|
8
8
|
releaseRepo: "bdombro/bun-argsbarg",
|
|
9
9
|
desc: "Argsbarg full example reference app",
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
: "${HOMEBREW_GITHUB_API_TOKEN:=$(gh auth token 2>/dev/null || true)}"
|
|
4
4
|
if [[ -z "${HOMEBREW_GITHUB_API_TOKEN}" ]]; then
|
|
5
5
|
echo "HOMEBREW_GITHUB_API_TOKEN is required to download private GitHub release assets." >&2
|
|
6
|
-
echo "
|
|
6
|
+
echo "Use: HOMEBREW_GITHUB_API_TOKEN=\"\$(gh auth token)\" (if gh is installed)" >&2
|
|
7
|
+
echo "Or create a PAT at https://github.com/settings/personal-access-tokens/new (Contents read on the tap repo)." >&2
|
|
7
8
|
exit 1
|
|
8
9
|
fi
|
|
9
10
|
export HOMEBREW_GITHUB_API_TOKEN
|
|
@@ -47,8 +47,6 @@ export const githubPrivateReleaseDownloadStrategyRuby = ` class GitHubPrivateRe
|
|
|
47
47
|
@owner, @repo, @tag, @filename = match.captures
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
private
|
|
51
|
-
|
|
52
50
|
def _fetch(url:, resolved_url: resolved_download_url, timeout:)
|
|
53
51
|
curl_download resolved_download_url,
|
|
54
52
|
"--header", "Accept: application/octet-stream",
|
|
@@ -56,6 +54,8 @@ export const githubPrivateReleaseDownloadStrategyRuby = ` class GitHubPrivateRe
|
|
|
56
54
|
to: temporary_path
|
|
57
55
|
end
|
|
58
56
|
|
|
57
|
+
private
|
|
58
|
+
|
|
59
59
|
def resolved_download_url
|
|
60
60
|
@resolved_download_url ||= begin
|
|
61
61
|
asset = GitHub.get_release(@owner, @repo, @tag).fetch("assets")
|
|
@@ -82,14 +82,13 @@ export function releaseFormulaUrl(version: string): string {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
export function renderFormula(coords: FormulaCoords): string {
|
|
85
|
-
const
|
|
85
|
+
const strategyBlock = coords.privateRelease ? `\n${githubPrivateReleaseDownloadStrategyRuby}\n\n ` : "";
|
|
86
86
|
return `class ${className} < Formula
|
|
87
|
-
|
|
87
|
+
desc "${desc}"
|
|
88
88
|
homepage "${homepage}"
|
|
89
|
-
${coords.urlStanza}
|
|
90
89
|
version "${coords.version}"
|
|
91
90
|
sha256 "${coords.sha256}"
|
|
92
|
-
|
|
91
|
+
|
|
93
92
|
${formulaInstallRuby}
|
|
94
93
|
|
|
95
94
|
${formulaPostInstallRuby}
|
|
@@ -97,6 +96,7 @@ export function renderFormula(coords: FormulaCoords): string {
|
|
|
97
96
|
${formulaCaveatsRuby}
|
|
98
97
|
|
|
99
98
|
${formulaTestRuby}
|
|
99
|
+
${strategyBlock}${coords.urlStanza}
|
|
100
100
|
end
|
|
101
101
|
`;
|
|
102
102
|
}
|
package/package.json
CHANGED
|
@@ -41,7 +41,8 @@ describe("builtins help copy", () => {
|
|
|
41
41
|
const configure = cliBuiltinConfigureCommand(fixture);
|
|
42
42
|
expect(configure.description).toContain("agent skills");
|
|
43
43
|
expect(configure.description).toContain("MCP config");
|
|
44
|
-
expect(configure.notes).toContain("brew
|
|
44
|
+
expect(configure.notes).toContain("brew upgrade");
|
|
45
|
+
expect(configure.notes).not.toContain("HOMEBREW_GITHUB_API_TOKEN");
|
|
45
46
|
const names = configureBuiltinOptions(fixture).map((o) => o.name);
|
|
46
47
|
expect(names).toContain("sync");
|
|
47
48
|
expect(names).toContain("remove-all");
|
|
@@ -48,12 +48,10 @@ export function docsSkillTopicDescription(program: CliProgram, caps: CliCapabili
|
|
|
48
48
|
return "Print a reference agent SKILL for AI agents.";
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
export function configureCommandNotes(program: CliProgram,
|
|
51
|
+
export function configureCommandNotes(program: CliProgram, _caps: CliCapabilities): string {
|
|
52
52
|
const app = program.key;
|
|
53
53
|
const lines = [
|
|
54
|
-
"
|
|
55
|
-
` brew tap <org>/<repo>`,
|
|
56
|
-
` brew install <tap>/${app}`,
|
|
54
|
+
"Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).",
|
|
57
55
|
"",
|
|
58
56
|
"Homebrew post_install runs:",
|
|
59
57
|
` ${app} configure --sync --yes`,
|
|
@@ -66,7 +66,7 @@ test("generateApiGuide covers the same command keys as cliSchemaExport", () => {
|
|
|
66
66
|
expect(schema.commands?.map((c) => c.key)).toEqual(["stat"]);
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
test("generateApiGuide
|
|
69
|
+
test("generateApiGuide configure notes point to README not brew install", () => {
|
|
70
70
|
const fixture: CliProgram = {
|
|
71
71
|
key: "myapp",
|
|
72
72
|
version: "1.0.0",
|
|
@@ -75,7 +75,8 @@ test("generateApiGuide resolves program key in install notes", () => {
|
|
|
75
75
|
};
|
|
76
76
|
const md = generateApiGuide(fixture);
|
|
77
77
|
expect(md).not.toContain("{argsbarg:program}");
|
|
78
|
-
expect(md).toContain("
|
|
78
|
+
expect(md).toContain("README");
|
|
79
|
+
expect(md).not.toContain("brew install <tap>");
|
|
79
80
|
expect(md).not.toContain("Upgrade to latest release");
|
|
80
81
|
});
|
|
81
82
|
|
package/src/parse.test.ts
CHANGED
|
@@ -617,8 +617,8 @@ test("cliSchemaJson omits handlers and completion built-ins", () => {
|
|
|
617
617
|
expect(schema).not.toHaveProperty("handler");
|
|
618
618
|
});
|
|
619
619
|
|
|
620
|
-
/** CliSchemaExport
|
|
621
|
-
test("cliSchemaExport
|
|
620
|
+
/** CliSchemaExport configure notes reference README for install. */
|
|
621
|
+
test("cliSchemaExport configure notes reference README for install", () => {
|
|
622
622
|
const root = testProgram({
|
|
623
623
|
key: "myapp",
|
|
624
624
|
version: "1.0.0",
|
|
@@ -634,7 +634,8 @@ test("cliSchemaExport resolves program key in install notes", () => {
|
|
|
634
634
|
|
|
635
635
|
const json = cliSchemaJson(root);
|
|
636
636
|
expect(json).not.toContain("{argsbarg:program}");
|
|
637
|
-
expect(json).toContain("
|
|
637
|
+
expect(json).toContain("README");
|
|
638
|
+
expect(json).not.toContain("brew install <tap>");
|
|
638
639
|
});
|
|
639
640
|
|
|
640
641
|
/** CliSchemaExport resolves {argsbarg:program} in consumer notes. */
|