@bluestep-systems/b6p-cli 0.1.1 → 0.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 +18 -0
- package/README.md +33 -0
- package/dist/cli.js +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ 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
|
+
## [0.2.0] — 2026-06-29
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Standalone binaries.** Each GitHub Release now ships self-contained, Node-bundling `b6p`
|
|
13
|
+
executables for Windows (x64) and macOS (x64 + arm64), built in CI via Node SEA and attached to
|
|
14
|
+
the Release (`b6p-windows-x64.exe`, `b6p-macos-x64`, `b6p-macos-arm64`, each with a `.sha256`
|
|
15
|
+
checksum sidecar). They run the full CLI on machines with **no Node or npm installed** — download
|
|
16
|
+
one file, put it on `PATH`, and `b6p <command>` works. The npm package
|
|
17
|
+
(`npm i -g @bluestep-systems/b6p-cli`) is **unchanged** and remains the primary distribution. See
|
|
18
|
+
[the toolchain ADR](docs/adr/0001-standalone-binary-toolchain.md).
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- `b6p --version` now reports the actual package version instead of a hardcoded `0.0.1`. The version
|
|
23
|
+
is injected at build time via an esbuild `define` (`__B6P_VERSION__`), so it stays correct in both
|
|
24
|
+
the npm bundle and the standalone binary — neither of which can read `package.json` at runtime.
|
|
25
|
+
|
|
8
26
|
## [0.1.1] — 2026-06-24
|
|
9
27
|
|
|
10
28
|
### Fixed
|
package/README.md
CHANGED
|
@@ -26,6 +26,39 @@ required to install it.
|
|
|
26
26
|
b6p --help
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
## Standalone binary (no Node required)
|
|
30
|
+
|
|
31
|
+
For machines without Node.js or npm, each
|
|
32
|
+
[GitHub Release](https://github.com/Bluestep-Systems/b6p-cli/releases) also ships a self-contained
|
|
33
|
+
`b6p` binary with Node bundled in — download one file and run it.
|
|
34
|
+
|
|
35
|
+
| Platform | Asset |
|
|
36
|
+
|---|---|
|
|
37
|
+
| Windows (x64) | `b6p-windows-x64.exe` |
|
|
38
|
+
| macOS (Intel / x64) | `b6p-macos-x64` |
|
|
39
|
+
| macOS (Apple Silicon / arm64) | `b6p-macos-arm64` |
|
|
40
|
+
|
|
41
|
+
Each asset has a matching `<asset>.sha256` checksum sidecar. Download the latest with:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
https://github.com/Bluestep-Systems/b6p-cli/releases/latest/download/<asset>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Install by saving the file into the shared BlueStep tools directory under the bare command name, then
|
|
48
|
+
ensuring that directory is on your `PATH`:
|
|
49
|
+
|
|
50
|
+
| | Directory | Save as |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| Windows | `%LOCALAPPDATA%\BlueStep\bin\` | `b6p.exe` |
|
|
53
|
+
| macOS | `~/.bluestep/bin/` | `b6p` |
|
|
54
|
+
|
|
55
|
+
Then `b6p <command>` works from any shell, with no Node or npm present. On macOS the binary is ad-hoc
|
|
56
|
+
signed (so it runs) but not notarized; a copy downloaded via a browser may be quarantined by Gatekeeper —
|
|
57
|
+
clear it with `xattr -d com.apple.quarantine ~/.bluestep/bin/b6p` and make it executable with
|
|
58
|
+
`chmod +x ~/.bluestep/bin/b6p`.
|
|
59
|
+
|
|
60
|
+
The npm install above is unchanged and remains the recommended path wherever Node is available.
|
|
61
|
+
|
|
29
62
|
## Commands
|
|
30
63
|
|
|
31
64
|
| Command | Purpose |
|
package/dist/cli.js
CHANGED
|
@@ -531,7 +531,7 @@ ${Q}: `);return le?M.find(Ke=>Ke.toLowerCase()===le.toLowerCase()):M[0]})}info(C
|
|
|
531
531
|
`)}};var HK=class{quiet;pauser=null;constructor(C={}){this.quiet=C.quiet??!1}setActivityPauser(C){this.pauser=C}async withProgress(C,M){let Q=C.length,le=0,Ke=[];this.pauser?.pause(),this.quiet||process.stderr.write(`${M.title}
|
|
532
532
|
`);for(let Ft of C){let Ir=await Ft.execute();if(Ke.push(Ir),le++,!this.quiet){let Wn=Math.round(le/Q*100),Pn=Ft.description?` - ${Ft.description}`:"";process.stderr.write(`\r [${le}/${Q}] ${Wn}%${Pn}`)}}return this.quiet||(process.stderr.write(`
|
|
533
533
|
`),M.cleanupMessage&&process.stderr.write(` ${M.cleanupMessage}
|
|
534
|
-
`)),this.pauser?.resume(),Ke}};var $K=class de{static FRAMES=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];static INTERVAL_MS=100;timer=null;frame=0;label;enabled;paused=!1;constructor(C,M={}){this.label=C,this.enabled=M.enabled??process.stderr.isTTY===!0}start(){!this.enabled||this.timer||(this.render(),this.timer=setInterval(()=>{this.frame=(this.frame+1)%de.FRAMES.length,this.render()},de.INTERVAL_MS),this.timer.unref?.())}setLabel(C){this.label=C,this.enabled&&this.timer&&!this.paused&&this.render()}pause(){!this.enabled||this.paused||(this.paused=!0,this.clearLine())}resume(){!this.enabled||!this.paused||(this.paused=!1,this.render())}stop(){this.timer&&(clearInterval(this.timer),this.timer=null),this.enabled&&this.clearLine()}render(){this.paused||process.stderr.write(`\r${de.FRAMES[this.frame]} ${this.label}`)}clearLine(){process.stderr.write("\r\x1B[K")}};function XE(de){return S4.resolve(process.cwd(),de)}async function PS(de,C="Working\u2026"){let M=new VK({autoYes:de.yes,json:de.json}),Q=new qK({verbose:de.verbose}),le=new HK({quiet:de.quiet||de.json}),Ke=new $K(C,{enabled:!de.json&&!de.quiet&&process.stderr.isTTY===!0});M.setActivityPauser(Ke),Q.setActivityPauser(Ke),le.setActivityPauser(Ke);let Ft=new wRe.SharedFilePersistence;await zvt(Ft);let Ir=new ERe.B6PCore({fs:new WK,persistence:Ft,prompt:M,logger:Q,progress:le});return Ke.start(),{core:Ir,prompt:M,spinner:Ke}}async function zvt(de){let C=S4.join(kRe.homedir(),".b6p"),M=S4.join(C,"secrets.json"),Q=S4.join(C,"state");await de.seedIfMissing({publicEntries:async()=>{let le=[];try{let Ft=await LB.readdir(Q);for(let Ir of Ft){if(!Ir.endsWith(".json"))continue;let Wn=S4.join(Q,Ir);try{let Pn=await LB.readFile(Wn,"utf-8"),ei=JSON.parse(Pn);le.push({size:Pn.length,data:ei})}catch{}}}catch{}le.sort((Ft,Ir)=>Ft.size-Ir.size);let Ke={};for(let Ft of le)Object.assign(Ke,Ft.data);return Ke},secretEntries:async()=>{try{let le=await LB.readFile(M,"utf-8");return JSON.parse(le)}catch{return{}}}})}var Up=new qMe("b6p").description("BlueStep B6P script management CLI").version("0.0
|
|
534
|
+
`)),this.pauser?.resume(),Ke}};var $K=class de{static FRAMES=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];static INTERVAL_MS=100;timer=null;frame=0;label;enabled;paused=!1;constructor(C,M={}){this.label=C,this.enabled=M.enabled??process.stderr.isTTY===!0}start(){!this.enabled||this.timer||(this.render(),this.timer=setInterval(()=>{this.frame=(this.frame+1)%de.FRAMES.length,this.render()},de.INTERVAL_MS),this.timer.unref?.())}setLabel(C){this.label=C,this.enabled&&this.timer&&!this.paused&&this.render()}pause(){!this.enabled||this.paused||(this.paused=!0,this.clearLine())}resume(){!this.enabled||!this.paused||(this.paused=!1,this.render())}stop(){this.timer&&(clearInterval(this.timer),this.timer=null),this.enabled&&this.clearLine()}render(){this.paused||process.stderr.write(`\r${de.FRAMES[this.frame]} ${this.label}`)}clearLine(){process.stderr.write("\r\x1B[K")}};function XE(de){return S4.resolve(process.cwd(),de)}async function PS(de,C="Working\u2026"){let M=new VK({autoYes:de.yes,json:de.json}),Q=new qK({verbose:de.verbose}),le=new HK({quiet:de.quiet||de.json}),Ke=new $K(C,{enabled:!de.json&&!de.quiet&&process.stderr.isTTY===!0});M.setActivityPauser(Ke),Q.setActivityPauser(Ke),le.setActivityPauser(Ke);let Ft=new wRe.SharedFilePersistence;await zvt(Ft);let Ir=new ERe.B6PCore({fs:new WK,persistence:Ft,prompt:M,logger:Q,progress:le});return Ke.start(),{core:Ir,prompt:M,spinner:Ke}}async function zvt(de){let C=S4.join(kRe.homedir(),".b6p"),M=S4.join(C,"secrets.json"),Q=S4.join(C,"state");await de.seedIfMissing({publicEntries:async()=>{let le=[];try{let Ft=await LB.readdir(Q);for(let Ir of Ft){if(!Ir.endsWith(".json"))continue;let Wn=S4.join(Q,Ir);try{let Pn=await LB.readFile(Wn,"utf-8"),ei=JSON.parse(Pn);le.push({size:Pn.length,data:ei})}catch{}}}catch{}le.sort((Ft,Ir)=>Ft.size-Ir.size);let Ke={};for(let Ft of le)Object.assign(Ke,Ft.data);return Ke},secretEntries:async()=>{try{let le=await LB.readFile(M,"utf-8");return JSON.parse(le)}catch{return{}}}})}var Up=new qMe("b6p").description("BlueStep B6P script management CLI").version("0.2.0").option("--yes","Skip confirmation prompts").option("--json","Machine-readable JSON output").option("--verbose","Verbose logging").option("--quiet","Suppress progress output");Up.command("push [target-url]").description("Push a script to a WebDAV target").option("--file <path>","Derive target from local file metadata").option("--root <path>","Script root folder").option("--snapshot","Push as snapshot").option("--message <text>","Commit message for snapshot history (implies --snapshot)").action(async(de,C)=>{let M=Up.opts(),{core:Q,prompt:le,spinner:Ke}=await PS(M),Ft=C.snapshot||C.message!==void 0;try{C.file?await Q.pushCurrent({filePath:XE(C.file),snapshot:Ft,message:C.message}):await Q.push({targetUrl:de,rootPath:XE(C.root||"."),snapshot:Ft,message:C.message})}finally{Ke.stop(),le.close()}});Up.command("pull [formula-url]").description("Pull a script from a WebDAV location").option("--file <path>","Derive source from local file metadata").option("--workspace <path>","Target workspace folder (default: cwd)").action(async(de,C)=>{let M=Up.opts(),{core:Q,prompt:le,spinner:Ke}=await PS(M);try{if(de)await Q.pull({formulaUrl:de,workspacePath:XE(C.workspace||".")});else{let Ft=XE(C.file??"."),Ir=C.workspace?XE(C.workspace):Q.deriveWorkspacePath(Ft)??process.cwd();await Q.pullCurrent({filePath:Ft,workspacePath:Ir})}}finally{Ke.stop(),le.close()}});Up.command("audit").description("Compare local script against server state").option("--file <path>","File within the script to audit (default: cwd)").option("--pull","Pull if differences are detected").option("--workspace <path>","Workspace folder (default: cwd)").action(async de=>{let C=Up.opts(),{core:M,prompt:Q,spinner:le}=await PS(C);try{let Ke=XE(de.file??"."),Ft=de.workspace?XE(de.workspace):M.deriveWorkspacePath(Ke)??process.cwd();if(de.pull)await M.auditPull({filePath:Ke,workspacePath:Ft});else{let Ir=await M.audit({filePath:Ke,workspacePath:Ft});C.json&&process.stdout.write(JSON.stringify(Ir,null,2)+`
|
|
535
535
|
`)}}finally{le.stop(),Q.close()}});Up.command("deploy <config-file>").description("Quick deploy from a config file to multiple targets").action(async de=>{let C=Up.opts(),{core:M,prompt:Q,spinner:le}=await PS(C);try{await M.deploy({configPath:XE(de)})}finally{le.stop(),Q.close()}});var PRe=Up.command("auth").description("Manage credentials");PRe.command("set").description("Set or update credentials").action(async()=>{let de=Up.opts(),{core:C,prompt:M,spinner:Q}=await PS(de);try{await C.updateCredentials()}finally{Q.stop(),M.close()}});PRe.command("clear").description("Clear stored credentials").action(async()=>{let de=Up.opts(),{core:C,prompt:M,spinner:Q}=await PS(de);try{await C.auth.clear()}finally{Q.stop(),M.close()}});Up.command("sessions").description("Manage sessions").command("clear").description("Clear all active sessions").action(async()=>{let de=Up.opts(),{core:C,prompt:M,spinner:Q}=await PS(de);try{await C.sessionManager.clearAll()}finally{Q.stop(),M.close()}});var DRe=Up.command("config").description("Manage configuration");DRe.command("set <key> <value>").description("Set a configuration value").action(async(de,C)=>{let M=Up.opts(),{core:Q,prompt:le,spinner:Ke}=await PS(M);try{let Ft;try{Ft=JSON.parse(C)}catch{Ft=C}await Q.setConfig(de,Ft)}finally{Ke.stop(),le.close()}});DRe.command("reset").description("Reset all settings to defaults").action(async()=>{let de=Up.opts(),{core:C,prompt:M,spinner:Q}=await PS(de);try{await C.clearSettings()}finally{Q.stop(),M.close()}});Up.command("report").description("Report current state").action(async()=>{let de=Up.opts(),{core:C,prompt:M,spinner:Q}=await PS(de);try{let le=await C.report();de.json&&process.stdout.write(JSON.stringify(le,null,2)+`
|
|
536
536
|
`)}finally{Q.stop(),M.close()}});Up.command("check-updates").description("Check for extension updates").action(async()=>{let de=Up.opts(),{core:C,prompt:M,spinner:Q}=await PS(de);try{await C.checkForUpdates()}finally{Q.stop(),M.close()}});Up.command("setup").description("Print the setup URL for a script").requiredOption("--file <path>","File within the script").action(async de=>{let C=Up.opts(),{core:M,prompt:Q,spinner:le}=await PS(C);try{let Ke=await M.getSetupUrl({filePath:XE(de.file)});Ke&&(C.json?process.stdout.write(JSON.stringify({setupUrl:Ke},null,2)+`
|
|
537
537
|
`):Q.info(`Setup URL: ${Ke}`))}finally{le.stop(),Q.close()}});Up.parseAsync(process.argv).catch(de=>{process.stderr.write(`${de.message}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluestep-systems/b6p-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Command-line interface for BlueStep B6P script management",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/Bluestep-Systems/b6p-cli#readme",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"compile": "node esbuild.js --production",
|
|
30
|
+
"build:sea": "node scripts/build-sea.mjs",
|
|
30
31
|
"watch": "node esbuild.js --watch",
|
|
31
32
|
"check-types": "tsc -p tsconfig.json --noEmit",
|
|
32
33
|
"clean": "rm -rf dist",
|