@bluestep-systems/b6p-cli 1.1.0 → 1.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 +28 -0
- package/README.md +33 -1
- package/dist/cli.js +328 -301
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,34 @@ All notable changes to `@bluestep-systems/b6p-cli` will be documented in this fi
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.2.0] — 2026-11-19
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Plain `git pull` and `git push` with the stored token: `b6p auth setup-git`** (b6p-core 1.3.0's
|
|
15
|
+
`core.gitCredential`, ClickUp 1k5g91bqme2). It makes `b6p` git's credential helper, as `gh auth setup-git` does,
|
|
16
|
+
for the gateway (when https) and the tenants you have pulled scripts from: an empty `helper =` and then
|
|
17
|
+
`!b6p auth git-credential` per host in the file `git config --global` writes, so no other helper sees or keeps
|
|
18
|
+
the token. It says what it wrote and where, what was set up already, and any entry of yours that still makes git
|
|
19
|
+
ask another helper; running it again changes nothing. `--remove` takes b6p's entries out and reports any reset it
|
|
20
|
+
had to leave. A plain push to a draft does not build or publish; that still takes `b6p script push`. Needs git
|
|
21
|
+
2.27 (2.42 for setup); an older git fails setup with exit `1`, saying so.
|
|
22
|
+
- **`b6p auth set` offers to set git up** once a token is stored and git is not set up (Yes is the default). Piped,
|
|
23
|
+
or under `--yes`, it never asks and prints a one-line hint instead; under `--json` it prints
|
|
24
|
+
`{ authenticated, git: { configured, hint } }`.
|
|
25
|
+
- **`b6p auth status` reports git**: set up, not set up (and which other helper git asks), or git too old. Under
|
|
26
|
+
`--json` it is the new `git` field.
|
|
27
|
+
- **`b6p kb pull` (a new clone) and `b6p script pull` print a one-line hint** to run `b6p auth setup-git` when git
|
|
28
|
+
there would not use the token. The hint never fails the pull. Known gap: after a script pull the hint reads the
|
|
29
|
+
git config in effect where the workspace is, not the draft clone's own config, since core's pull result does
|
|
30
|
+
not name the draft folder yet.
|
|
31
|
+
- `b6p auth git-credential get|store|erase`, hidden from help, is the command git runs. It is recognised by its
|
|
32
|
+
position (`b6p auth git-credential <action>`) and run before any option parsing, so `--help`, `--version` or an
|
|
33
|
+
unknown flag after it change nothing; it writes only core's answer to stdout and always exits `0`, even when a
|
|
34
|
+
cache fails to load in the background, stdout or stderr cannot be written, or Node is too old.
|
|
35
|
+
|
|
8
36
|
## [1.1.0] — 2026-11-19
|
|
9
37
|
|
|
10
38
|
### Added
|
package/README.md
CHANGED
|
@@ -77,6 +77,29 @@ b6p auth set
|
|
|
77
77
|
If no token is stored, the first command you run asks for it. A `401` with a `b6pt_` token usually
|
|
78
78
|
means the token expired or its account lost access, not that it is the wrong kind of token.
|
|
79
79
|
|
|
80
|
+
### Plain `git pull` and `git push`
|
|
81
|
+
|
|
82
|
+
`b6p` can be git's credential helper, the way `gh auth setup-git` is for github.com, so plain `git pull`
|
|
83
|
+
and `git push` in a knowledge-base clone or a script's `draft/` folder use the stored token without asking:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
b6p auth setup-git # set git up (b6p auth set offers to do this for you)
|
|
87
|
+
b6p auth setup-git --remove # take it out again
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
It answers git only for the gateway (when its URL is https) and for the tenants you have pulled a script
|
|
91
|
+
from, over https, and for nothing else. Setup writes, for each of those hosts, a
|
|
92
|
+
`[credential "https://<host>"]` section to the file `git config --global` writes: an empty `helper =`, so
|
|
93
|
+
no other helper (`store`, `cache`, a keychain) answers for that host or keeps a copy of the token, then
|
|
94
|
+
`helper = !b6p auth git-credential`. Your own entries are never moved or removed: if one still applies to a
|
|
95
|
+
host after b6p's (in a repository's own config, say), setup says which and what to change. Running it again
|
|
96
|
+
changes nothing; after a first script pull from another tenant, run it again to add that tenant. `b6p auth
|
|
97
|
+
status` says whether git is set up, and a `kb pull` or `script pull` prints a one-line hint when it is not.
|
|
98
|
+
|
|
99
|
+
A plain `git push` to a script's draft lands the commit but does not build or publish it: that still takes
|
|
100
|
+
`b6p script push`. git asks `b6p` by name, so `b6p` must be on the `PATH` git sees. Needs git 2.27 or later
|
|
101
|
+
(2.42 or later for setup). `b6p auth git-credential` is the command git runs; it is not for typing.
|
|
102
|
+
|
|
80
103
|
## Commands
|
|
81
104
|
|
|
82
105
|
`b6p` is organised as `b6p <subsystem> <verb>`. Each top-level name is a part of the
|
|
@@ -107,7 +130,9 @@ platform; the verbs beneath it act on that part.
|
|
|
107
130
|
| Command | Purpose |
|
|
108
131
|
|---|---|
|
|
109
132
|
| `b6p auth set` | Set or update the access token |
|
|
110
|
-
| `b6p auth status` | Report whether a token is stored (never prompts) |
|
|
133
|
+
| `b6p auth status` | Report whether a token is stored, and whether git is set up to use it (never prompts) |
|
|
134
|
+
| `b6p auth setup-git` | Set git to use the token for plain `git pull` and `git push` ([details](#plain-git-pull-and-git-push)) |
|
|
135
|
+
| `b6p auth setup-git --remove` | Take b6p's entries out of your git config |
|
|
111
136
|
| `b6p auth clear` | Clear the stored token |
|
|
112
137
|
| `b6p auth token list` | List your own tokens, expired ones included, marked `(expired)` (the secret is never shown) |
|
|
113
138
|
| `b6p auth token create --alias <a> --scopes <s,…> [--expires <90d\|date\|date-time\|never>]` | Mint a token; the secret is printed once |
|
|
@@ -415,6 +440,13 @@ Set a token non-interactively by piping it in:
|
|
|
415
440
|
echo "$B6P_TOKEN" | b6p auth set
|
|
416
441
|
```
|
|
417
442
|
|
|
443
|
+
Piped (or under `--yes` or `--json`), `auth set` does not ask about git; it prints a one-line hint to run
|
|
444
|
+
`b6p auth setup-git` when git is not set up. Under `--json` the hint is in the result instead:
|
|
445
|
+
`{ "authenticated": true, "git": { "configured": false, "hint": "…" } }` (`configured` is `null` when git could
|
|
446
|
+
not be checked, and `hint` is `null` when there is nothing to say). `b6p --json auth status` carries git's state as `git`: core's
|
|
447
|
+
status (`configured`, `hosts`, `otherHelpers`, `scope`) with `error: null`, or `{ "error": "<why>" }` when
|
|
448
|
+
git cannot be checked.
|
|
449
|
+
|
|
418
450
|
## WebDAV URL format
|
|
419
451
|
|
|
420
452
|
```
|