@phystack/phyctl-phyos 4.5.57-dev → 4.5.58-dev

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 CHANGED
@@ -4,57 +4,44 @@ PhyStack control plane CLI for managing PhyOS devices.
4
4
 
5
5
  ## Installation
6
6
 
7
- Download the pre-built binary for your platform. No runtime dependencies required.
8
-
9
- ### Linux (x86_64)
7
+ ### Via npm (recommended)
10
8
 
11
9
  ```bash
12
- curl -fsSL https://os.phygrid.com/phystack-npm/releases/latest/phyctl-linux-x64.tar.gz | tar xz
13
- sudo mv phyctl /usr/local/bin/
14
- hash -r
15
- phyctl --version
10
+ npm install -g @phystack/phyctl-phyos
16
11
  ```
17
12
 
18
- ### Linux (ARM64)
13
+ npm automatically downloads the correct binary for your platform.
14
+
15
+ ### Direct binary download (no npm required)
19
16
 
20
17
  ```bash
21
- curl -fsSL https://os.phygrid.com/phystack-npm/releases/latest/phyctl-linux-arm64.tar.gz | tar xz
18
+ # Linux ARM64
19
+ curl -sL "https://registry.npmjs.org/@phystack/phyctl-linux-arm64/-/phyctl-linux-arm64-VERSION.tgz" | tar xz --strip-components=2 package/bin/phyctl
22
20
  sudo mv phyctl /usr/local/bin/
23
21
  hash -r
24
- phyctl --version
25
- ```
26
-
27
- ### macOS (Apple Silicon)
28
22
 
29
- ```bash
30
- curl -fsSL https://os.phygrid.com/phystack-npm/releases/latest/phyctl-darwin-arm64.tar.gz | tar xz
23
+ # Linux x86_64
24
+ curl -sL "https://registry.npmjs.org/@phystack/phyctl-linux-x64/-/phyctl-linux-x64-VERSION.tgz" | tar xz --strip-components=2 package/bin/phyctl
31
25
  sudo mv phyctl /usr/local/bin/
32
- phyctl --version
33
- ```
34
26
 
35
- ### macOS (Intel)
27
+ # macOS Apple Silicon
28
+ curl -sL "https://registry.npmjs.org/@phystack/phyctl-darwin-arm64/-/phyctl-darwin-arm64-VERSION.tgz" | tar xz --strip-components=2 package/bin/phyctl
29
+ sudo mv phyctl /usr/local/bin/
36
30
 
37
- ```bash
38
- curl -fsSL https://os.phygrid.com/phystack-npm/releases/latest/phyctl-darwin-x64.tar.gz | tar xz
31
+ # macOS Intel
32
+ curl -sL "https://registry.npmjs.org/@phystack/phyctl-darwin-x64/-/phyctl-darwin-x64-VERSION.tgz" | tar xz --strip-components=2 package/bin/phyctl
39
33
  sudo mv phyctl /usr/local/bin/
40
- phyctl --version
41
34
  ```
42
35
 
43
- ### Install a specific version
44
-
45
- Replace `latest` with the version number:
46
-
47
- ```bash
48
- curl -fsSL https://os.phygrid.com/phystack-npm/releases/4.5.54-dev/phyctl-linux-x64.tar.gz | tar xz
49
- ```
36
+ Replace `VERSION` with the desired version (e.g., `4.4.69`).
50
37
 
51
- > **Note:** If you previously had phyctl installed via npm, remove it first or run `hash -r` after installing the binary to clear the shell's path cache.
38
+ > **Note:** Run `hash -r` after installing to clear the shell's path cache.
52
39
 
53
40
  ## Supported platforms
54
41
 
55
- | Platform | Architecture | Download |
56
- |----------|-------------|----------|
57
- | Linux | x86_64 | [phyctl-linux-x64.tar.gz](https://os.phygrid.com/phystack-npm/releases/latest/phyctl-linux-x64.tar.gz) |
58
- | Linux | ARM64 | [phyctl-linux-arm64.tar.gz](https://os.phygrid.com/phystack-npm/releases/latest/phyctl-linux-arm64.tar.gz) |
59
- | macOS | ARM64 | [phyctl-darwin-arm64.tar.gz](https://os.phygrid.com/phystack-npm/releases/latest/phyctl-darwin-arm64.tar.gz) |
60
- | macOS | x86_64 | [phyctl-darwin-x64.tar.gz](https://os.phygrid.com/phystack-npm/releases/latest/phyctl-darwin-x64.tar.gz) |
42
+ | Platform | Architecture | npm package |
43
+ |----------|-------------|-------------|
44
+ | Linux | ARM64 | `@phystack/phyctl-linux-arm64` |
45
+ | Linux | x86_64 | `@phystack/phyctl-linux-x64` |
46
+ | macOS | ARM64 | `@phystack/phyctl-darwin-arm64` |
47
+ | macOS | x86_64 | `@phystack/phyctl-darwin-x64` |
package/bin/index.js ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ const { spawnSync } = require('child_process');
3
+ const path = require('path');
4
+
5
+ const BINARY = 'phyctl';
6
+ const key = `${process.platform}-${process.arch}`;
7
+ const pkg = `@phystack/${BINARY}-${key}`;
8
+
9
+ let binPath;
10
+ try {
11
+ binPath = path.join(path.dirname(require.resolve(`${pkg}/package.json`)), 'bin', BINARY);
12
+ } catch {
13
+ console.error(
14
+ `Unsupported or missing platform package: ${pkg}\n` +
15
+ `Platform: ${key}\n\n` +
16
+ `Install manually: npm install ${pkg}\n` +
17
+ `Or download: npx ${pkg}`
18
+ );
19
+ process.exit(1);
20
+ }
21
+
22
+ const result = spawnSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
23
+ process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phystack/phyctl-phyos",
3
- "version": "4.5.57-dev",
3
+ "version": "4.5.58-dev",
4
4
  "exports": "./index.js",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -14,24 +14,23 @@
14
14
  "test": "echo \"Error: no test specified\" && exit 1",
15
15
  "build": "rimraf dist && tsc",
16
16
  "build:binary": "bash build-binary.sh",
17
- "prepublishOnly": "bash build-binary.sh bin/phyctl",
18
17
  "start": "yarn build && node --inspect --enable-source-maps dist/index",
19
18
  "dev": "NODE_ENV=development yarn start"
20
19
  },
21
20
  "bin": {
22
- "phyctl": "./bin/phyctl"
21
+ "phyctl": "./bin/index.js"
23
22
  },
24
23
  "engines": {
25
24
  "node": ">=20.0.0"
26
25
  },
27
26
  "files": [
28
- "bin/phyctl"
27
+ "bin/**/*"
29
28
  ],
30
29
  "author": "PhyStack.com",
31
30
  "license": "MIT",
32
31
  "description": "",
33
32
  "dependencies": {
34
- "@phystack/hub-client": "4.5.57-dev",
33
+ "@phystack/hub-client": "4.5.58-dev",
35
34
  "commander": "^13.1.0",
36
35
  "inquirer": "^8.2.6",
37
36
  "lodash": "^4.17.21",
@@ -43,5 +42,11 @@
43
42
  "@types/node": "^20.14.9",
44
43
  "rimraf": "^5.0.7"
45
44
  },
46
- "gitHead": "d11ba954df0547448f973f74221cd3727b60b9ae"
45
+ "optionalDependencies": {
46
+ "@phystack/phyctl-darwin-arm64": "4.5.58-dev",
47
+ "@phystack/phyctl-darwin-x64": "4.5.58-dev",
48
+ "@phystack/phyctl-linux-arm64": "4.5.58-dev",
49
+ "@phystack/phyctl-linux-x64": "4.5.58-dev"
50
+ },
51
+ "gitHead": "4e51de0c4e43f46904625e89aa3286417cdc7c81"
47
52
  }
package/bin/phyctl DELETED
Binary file