@@ -15,51 +15,81 @@ An Electron-based desktop application for interacting with various AI models via
15
15
### Prerequisites
16
16
17
17
- Node.js (v18+)
18
- - npm or yarn
18
+ - npm
19
+ - pnpm (v10.x)
19
20
20
21
### Installation
21
22
22
23
1 . Clone the repository:
23
- ```
24
+ ``` bash
24
25
git clone https://github.com/TensorBlock/TensorBlock-Studio.git
25
26
cd tensorblock-studio
26
27
```
27
28
28
- 2 . Install dependencies:
29
- ```
30
- npm install
29
+ 2 . Install pnpm globally (If you don't have it installed)
30
+ ``` bash
31
+ npm install -g pnpm@latest-10
31
32
```
32
33
33
- 3 . Create a ` .env ` file in the root directory (based on ` .env.example ` ) :
34
- ```
35
- cp .env.example .env
34
+ 3 . Install dependencies :
35
+ ``` bash
36
+ pnpm install
36
37
```
37
38
38
- 4 . Add your OpenAI API key to the ` .env ` file:
39
+ ### Migrate from npm
40
+
41
+ 1 . Remove current ` node_modules ` folder. (If you have it)
42
+
43
+ 2 . Remove ` package-lock.json ` file from the root. (If you have it)
44
+
45
+ 3 . Install pnpm globally (If you don't have it installed)
46
+ ``` bash
47
+ npm install -g pnpm@latest-10
39
48
```
40
- VITE_OPENAI_API_KEY=your_openai_api_key_here
49
+
50
+ 4 . Install dependencies:
51
+ ``` bash
52
+ pnpm install
41
53
```
42
54
55
+ 5 . If you receive the warning:
56
+ ``` base
57
+ ╭ Warning ───────────────────────────────────────────────────────────────────────────────────╮
58
+ │ │
59
+ │ Ignored build scripts: electron, esbuild. │
60
+ │ Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts. │
61
+ │ │
62
+ ╰────────────────────────────────────────────────────────────────────────────────────────────╯
63
+ ```
64
+ Run ``` pnpm approve-builds ``` and allow all build scripts.
65
+
43
66
### Development
44
67
45
68
Run the application in development mode:
46
69
70
+ ``` bash
71
+ pnpm run dev
47
72
```
48
- npm run dev
73
+
74
+ Or:
75
+
76
+ ``` bash
77
+ npm run dev # This will also use pnpm to run the scripts
49
78
```
50
79
80
+
51
81
### Building for Production
52
82
53
- Build the application for production :
83
+ Package the application for your current platform :
54
84
55
- ```
56
- npm run build:prod
85
+ ``` bash
86
+ pnpm run electron: build:current_platform
57
87
```
58
88
59
- Package the application for your current platform :
89
+ Or :
60
90
61
- ```
62
- npm run electron:build:current_platform
91
+ ``` bash
92
+ npm run electron:build:current_platform # This will also use pnpm to run the scripts
63
93
```
64
94
65
95
## Architecture
0 commit comments