codex-session-tui 0.2.5

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,21 @@
1
+ # @avikalpa/codex-session-explorer
2
+
3
+ This npm package ships prebuilt binaries for `codex-session-explorer`.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm i -g @avikalpa/codex-session-explorer
9
+ ```
10
+
11
+ ## Run
12
+
13
+ ```bash
14
+ codex-session-explorer
15
+ ```
16
+
17
+ The launcher automatically selects the binary for:
18
+
19
+ - Linux: `x64`, `arm64`
20
+ - macOS: `x64`, `arm64`
21
+ - Windows: `x64`, `arm64`
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require("node:child_process");
4
+ const { existsSync } = require("node:fs");
5
+ const { join } = require("node:path");
6
+
7
+ const platform = process.platform;
8
+ const arch = process.arch;
9
+
10
+ const targetMap = {
11
+ "linux:x64": "x86_64-unknown-linux-gnu",
12
+ "linux:arm64": "aarch64-unknown-linux-gnu",
13
+ "linux:arm": "armv7-unknown-linux-gnueabihf",
14
+ "darwin:x64": "x86_64-apple-darwin",
15
+ "darwin:arm64": "aarch64-apple-darwin",
16
+ "win32:x64": "x86_64-pc-windows-msvc",
17
+ "win32:arm64": "aarch64-pc-windows-msvc"
18
+ };
19
+
20
+ const key = `${platform}:${arch}`;
21
+ const target = targetMap[key];
22
+ if (!target) {
23
+ console.error(
24
+ `Unsupported platform/arch: ${platform}/${arch}. Supported: ${Object.keys(targetMap).join(", ")}`
25
+ );
26
+ process.exit(1);
27
+ }
28
+
29
+ const binName = platform === "win32" ? "codex-session-explorer.exe" : "codex-session-explorer";
30
+ const binPath = join(__dirname, "..", "dist", target, binName);
31
+
32
+ if (!existsSync(binPath)) {
33
+ console.error(`Binary not found: ${binPath}`);
34
+ console.error("The npm package appears incomplete for this platform.");
35
+ process.exit(1);
36
+ }
37
+
38
+ const result = spawnSync(binPath, process.argv.slice(2), {
39
+ stdio: "inherit"
40
+ });
41
+
42
+ if (result.error) {
43
+ console.error(result.error.message);
44
+ process.exit(1);
45
+ }
46
+ process.exit(result.status ?? 0);
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "codex-session-tui",
3
+ "version": "0.2.5",
4
+ "description": "Prebuilt codex-session-tui binaries for macOS, Linux, and Windows.",
5
+ "license": "MIT",
6
+ "bin": {
7
+ "codex-session-tui": "bin/codex-session-explorer.js",
8
+ "codex-session-explorer": "bin/codex-session-explorer.js"
9
+ },
10
+ "files": [
11
+ "bin",
12
+ "dist",
13
+ "README.md"
14
+ ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/avikalpa/codex-session-tui.git"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "engines": {
23
+ "node": ">=18"
24
+ }
25
+ }