local-operator-ui 0.1.0-beta.3 → 0.1.0-beta.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 CHANGED
@@ -43,11 +43,35 @@ The Local Operator UI is a user interface for managing and interacting with the
43
43
 
44
44
  Before you begin, ensure you have the following installed:
45
45
 
46
- - **Node.js**: Version specified in `.nvmrc`. It's recommended to use [nvm](https://github.com/nvm-sh/nvm) for managing Node.js versions.
47
- - **yarn**: Installable via `npm install -g yarn`.
46
+ - **Node.js**: Version 22.13.1 or higher. It's recommended to use [nvm](https://github.com/nvm-sh/nvm) for managing Node.js versions.
48
47
  - **Local Operator Backend**: The UI connects to the Local Operator backend API. See the [Local Operator GitHub repository](https://github.com/damianvtran/local-operator) for installation instructions.
49
48
 
50
- ### Installation
49
+ ### NPM Installation
50
+
51
+ You can install and run Local Operator UI directly using npx:
52
+
53
+ ```bash
54
+ # Install and run in one command
55
+ npx local-operator-ui
56
+ ```
57
+
58
+ This will download and execute the latest version of the Local Operator UI, launching the application immediately.
59
+
60
+ ### Manual Installation
61
+
62
+ Alternatively, you can install the package globally:
63
+
64
+ ```bash
65
+ # Install globally
66
+ npm install -g local-operator-ui
67
+
68
+ # Run the application
69
+ local-operator-ui
70
+ ```
71
+
72
+ ### Development Setup
73
+
74
+ If you want to contribute or modify the application, follow these steps:
51
75
 
52
76
  **Clone the repository:**
53
77
 
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Local Operator UI CLI
5
+ *
6
+ * This script serves as the entry point for the npx command.
7
+ * It launches the Electron app.
8
+ */
9
+
10
+ const { spawn } = require("node:child_process");
11
+ const path = require("node:path");
12
+ const fs = require("node:fs");
13
+
14
+ // Get the path to the electron executable
15
+ const electronPath = require("electron");
16
+
17
+ // Get the path to the main.js file
18
+ const appPath = path.join(__dirname, "../out/main/index.js");
19
+
20
+ // Check if the main.js file exists
21
+ if (!fs.existsSync(appPath)) {
22
+ console.error("Error: Could not find the application entry point.");
23
+ console.error(
24
+ "This could happen if the application was not built correctly.",
25
+ );
26
+ console.error("Please report this issue to the package maintainer.");
27
+ process.exit(1);
28
+ }
29
+
30
+ // Launch the Electron app
31
+ const child = spawn(electronPath, [appPath], {
32
+ stdio: "inherit",
33
+ windowsHide: false,
34
+ });
35
+
36
+ // Handle process exit
37
+ child.on("close", (code) => {
38
+ process.exit(code);
39
+ });
40
+
41
+ // Handle errors
42
+ child.on("error", (err) => {
43
+ console.error("Failed to start Electron application:", err);
44
+ process.exit(1);
45
+ });
46
+
47
+ // Handle process termination
48
+ process.on("SIGINT", () => {
49
+ child.kill("SIGINT");
50
+ });
51
+
52
+ process.on("SIGTERM", () => {
53
+ child.kill("SIGTERM");
54
+ });
Binary file
Binary file
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "local-operator-ui",
3
- "version": "0.1.0-beta.3",
3
+ "version": "0.1.0-beta.5",
4
4
  "description": "User interface for the Local Operator agent environment",
5
5
  "main": "./out/main/index.js",
6
6
  "bin": {
7
- "local-operator-ui": "./out/main/index.js"
7
+ "local-operator-ui": "./bin/local-operator-ui.js"
8
8
  },
9
9
  "license": "MIT",
10
10
  "author": {
@@ -28,7 +28,7 @@
28
28
  "url": "https://github.com/damianvtran/local-operator-ui/issues"
29
29
  },
30
30
  "keywords": ["local-operator", "agent", "ui", "electron", "react"],
31
- "files": ["out", "LICENSE", "README.md"],
31
+ "files": ["out", "bin", "LICENSE", "README.md"],
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
@@ -36,6 +36,7 @@
36
36
  "start": "electron-vite preview",
37
37
  "dev": "electron-vite dev",
38
38
  "build": "electron-vite build",
39
+ "postbuild": "chmod +x ./bin/local-operator-ui.js",
39
40
  "lint": "npx @biomejs/biome check src",
40
41
  "lint:fix": "npx @biomejs/biome check --apply src",
41
42
  "format": "npx @biomejs/biome format src",
@@ -65,7 +66,11 @@
65
66
  "styled-components": "^6.1.14",
66
67
  "uuid": "^11.1.0",
67
68
  "zod": "^3.24.2",
68
- "zustand": "^5.0.3"
69
+ "zustand": "^5.0.3",
70
+ "electron-vite": "^3.0.0",
71
+ "react": "^18.3.1",
72
+ "react-dom": "^18.3.1",
73
+ "react-router-dom": "^6.16.0"
69
74
  },
70
75
  "devDependencies": {
71
76
  "@biomejs/biome": "^1.9.4",
@@ -74,14 +79,10 @@
74
79
  "@types/react": "18.3.18",
75
80
  "@types/react-dom": "18.3.5",
76
81
  "@vitejs/plugin-react": "^4.3.4",
77
- "electron-vite": "^3.0.0",
78
82
  "eslint": "^9.17.0",
79
83
  "eslint-plugin-react-hooks": "^5.0.0",
80
84
  "eslint-plugin-react-refresh": "^0.4.16",
81
85
  "jest": "^29.7.0",
82
- "react": "^18.3.1",
83
- "react-dom": "^18.3.1",
84
- "react-router-dom": "^6.16.0",
85
86
  "tsc": "^2.0.4",
86
87
  "typescript": "^5.8.2",
87
88
  "typescript-eslint": "^8.18.2",