@command-center/command-center 0.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/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # Command Center CLI
2
+
3
+ Binary distribution of UpToSpeed Command Center, a desktop-friendly interface for reviewing repositories and generating walkthroughs. This package installs a thin Node.js wrapper that launches the precompiled Command Center binary for your platform.
4
+
5
+ ## Supported Platforms
6
+
7
+ - macOS arm64
8
+ - macOS x64
9
+ - Linux arm64
10
+ - Linux x64
11
+ - Windows x64
12
+
13
+ If your platform is missing, please open an issue so we can add another target.
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install -g @command-center/command-center
19
+ ```
20
+
21
+ This command places a `command-center` executable on your `$PATH`. The wrapper selects the appropriate binary from the package’s `dist/` directory and forwards all CLI arguments to it.
22
+
23
+ ## Usage
24
+
25
+ ```bash
26
+ command-center [flags]
27
+ ```
28
+
29
+ Common flags:
30
+
31
+ - `--debug` – print embedded asset information after startup
32
+ - `--help` – show runtime help from the bundled binary
33
+
34
+ The application starts an HTTP server (defaults to port `9000`). Open the printed URL in your browser to launch the UI. Environment variables are loaded from `.env` in the directory where you run the command; create that file to provide API keys or override the port.
35
+
36
+ ## Upgrade
37
+
38
+ ```bash
39
+ npm update -g @command-center/command-center
40
+ ```
41
+
42
+ After updating, run `command-center --version` to verify the new binary.
43
+
44
+ ## Troubleshooting
45
+
46
+ - **“Unsupported platform”** – The wrapper could not map your `process.platform`/`process.arch` combination. Please file an issue with your OS and architecture.
47
+ - **“Expected binary … was not found”** – Reinstall the package. If you are working from a git checkout, run `bun run build:binary` before linking with `npm link`.
48
+ - **Permission errors** – On POSIX systems, ensure the binaries in `dist/` remain executable (`chmod +x dist/command-center-*`).
49
+
50
+ ## Developing From Source
51
+
52
+ The npm package does not include development tooling or source code. To contribute or build your own binaries, clone the repository and follow the instructions in `README.dev.md`.
53
+
54
+ ### Release Workflow
55
+
56
+ Run these commands from `packages/command-center-cli/`:
57
+
58
+ 1. `npm install`
59
+ 2. `npm run prepare:dist`
60
+ 3. `npm run check:dist`
61
+ 4. `npm pack` (optional)
62
+ 5. Install the tarball to smoke-test (optional):
63
+ - `npm install -g ./@command-center-command-center-<version>.tgz`
64
+ - `command-center --version`
65
+ - `npm uninstall -g @command-center/command-center`
66
+ 6. `npm publish --access public`
67
+
68
+ Use `npm run bump:minor` (or patch/major) beforehand to increment the version as needed.
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawn } from "node:child_process";
4
+ import { existsSync } from "node:fs";
5
+ import { fileURLToPath } from "node:url";
6
+ import path from "node:path";
7
+
8
+ const PLATFORM_KEY = `${process.platform}:${process.arch}`;
9
+
10
+ // TAG_PLATFORM_MATRIX 2025.10.02: Keep binary names in sync with scripts/build-all.ts outputs.
11
+ const PLATFORM_BINARIES = new Map([
12
+ ["darwin:arm64", "command-center-macos-arm64"],
13
+ ["darwin:x64", "command-center-macos-x64"],
14
+ ["linux:arm64", "command-center-linux-arm64"],
15
+ ["linux:x64", "command-center-linux-x64"],
16
+ ["win32:x64", "command-center-win-x64.exe"],
17
+ ]);
18
+
19
+ const __filename = fileURLToPath(import.meta.url);
20
+ const __dirname = path.dirname(__filename);
21
+
22
+ function fail(message) {
23
+ console.error(`command-center (wrapper): ${message}`);
24
+ process.exit(1);
25
+ }
26
+
27
+ function resolveBinary() {
28
+ const binaryName = PLATFORM_BINARIES.get(PLATFORM_KEY);
29
+ if (!binaryName) {
30
+ fail(
31
+ `unsupported platform '${process.platform}' with architecture '${process.arch}'.` +
32
+ "\n • Please open an issue so we can add build support." +
33
+ "\n • As a workaround, you can run 'bun run build:binary' and execute the output manually.",
34
+ );
35
+ }
36
+
37
+ const binaryPath = path.join(__dirname, "..", "dist", binaryName);
38
+ if (!existsSync(binaryPath)) {
39
+ fail(
40
+ `expected binary '${binaryName}' was not found at ${binaryPath}.` +
41
+ "\n • Ensure the package was published with binaries (run 'bun run build:binary' before publishing)." +
42
+ "\n • If you are developing locally, rebuild the binaries and try again.",
43
+ );
44
+ }
45
+
46
+ return binaryPath;
47
+ }
48
+
49
+ const binaryPath = resolveBinary();
50
+ const child = spawn(binaryPath, process.argv.slice(2), {
51
+ stdio: "inherit",
52
+ });
53
+
54
+ child.on("error", (error) => {
55
+ fail(`failed to launch bundled binary (${error.message}).`);
56
+ });
57
+
58
+ child.on("exit", (code, signal) => {
59
+ if (signal) {
60
+ console.error(`command-center (wrapper): process terminated with signal ${signal}.`);
61
+ process.exit(1);
62
+ }
63
+ process.exit(code === null ? 1 : code);
64
+ });
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@command-center/command-center",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Binary distribution of UpToSpeed Command Center",
6
+ "bin": {
7
+ "command-center": "./bin/command-center.js"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "dist/",
12
+ "README.md"
13
+ ],
14
+ "scripts": {
15
+ "prepare:dist": "node ./scripts/prepare-dist.cjs",
16
+ "check:dist": "node ./scripts/assert-dist-binaries.cjs",
17
+ "prepublishOnly": "npm run prepare:dist && npm run check:dist",
18
+ "bump:minor": "npm version minor",
19
+ "release": "npm run prepare:dist && npm run check:dist && npm publish"
20
+ },
21
+ "engines": {
22
+ "node": ">=18.0.0"
23
+ },
24
+ "keywords": [
25
+ "command-center",
26
+ "uptospeed",
27
+ "cli"
28
+ ],
29
+ "license": "MIT",
30
+ "publishConfig": {
31
+ "access": "public"
32
+ }
33
+ }