loz 0.4.1 → 0.5.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 +333 -338
- package/dist/loz.js +14 -5
- package/dist/loz.js.map +1 -1
- package/dist/utils/index.js +10 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +45 -45
package/README.md
CHANGED
|
@@ -1,338 +1,333 @@
|
|
|
1
|
-
|
|
2
|
-
## What's New
|
|
3
|
-
|
|
4
|
-
### v0.4.0 - 2026-02-08
|
|
5
|
-
- **Added**
|
|
6
|
-
- Cross-platform command execution: Loz now detects your OS and shell (Linux, macOS, Windows PowerShell, or cmd) and generates/executed commands accordingly.
|
|
7
|
-
- Always prompts for Y/N confirmation before running any command, for improved safety.
|
|
8
|
-
- Handles LLM responses in Markdown code blocks (triple backticks) and parses commands correctly.
|
|
9
|
-
- Improved error and warning messages for non-interactive terminals and shell mismatches.
|
|
10
|
-
- Enhanced Windows support: runs PowerShell/cmd commands natively, not just bash.
|
|
11
|
-
- **Fixed**
|
|
12
|
-
- Commands are now executed on Windows, Linux, and WSL as expected.
|
|
13
|
-
- Fixed issues with command parsing and JSON extraction from LLM output.
|
|
14
|
-
- Improved logging and user feedback for command execution and shell compatibility.
|
|
15
|
-
|
|
16
|
-
# Loz [](https://www.npmjs.com/package/loz)
|
|
17
|
-
|
|
18
|
-

|
|
19
|
-
|
|
20
|
-
Loz is a command-line tool that enables your preferred LLM to execute system commands and utilize Unix pipes, integrating AI capabilities with other Unix tools.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## Previous Releases
|
|
24
|
-
|
|
25
|
-
### v0.3.1 - 2024-03-18
|
|
26
|
-
- **Added**
|
|
27
|
-
- Git commit log files are now stored in .loz_log within each Git repository where Loz is executed.
|
|
28
|
-
- The ability to enable/disable appending 'generated by ${model name}' at the end of the Git commit message by running config attribution true or config attribution false.
|
|
29
|
-
- Added --attribution (-a) runtime argument to override the config attribution setting. The original attribution value stored remains unchanged.
|
|
30
|
-
|
|
31
|
-
### v0.3.0 - 2024-02-24
|
|
32
|
-
|
|
33
|
-
- **Added**
|
|
34
|
-
- Run Linux commands based on user prompts. Users can now execute Linux commands using natural language. For example, by running `loz "find the largest file in the current directory"`,
|
|
35
|
-
`Loz` will interpret the instruction and execute the corresponding Linux commands like `find . -type f -exec ls -l {} + | sort -k 5 -nr | head -n 1` to find the largest file. See more [examples](#examples).
|
|
36
|
-
|
|
37
|
-
### v0.2.13 - 2024-02-22
|
|
38
|
-
|
|
39
|
-
- **Added**
|
|
40
|
-
- Enhanced Git Commit Formatting: Commit messages are now structured with a clear separation between the title and body, improving readability and adherence to Git best practices.
|
|
41
|
-
|
|
42
|
-
## Getting Started
|
|
43
|
-
|
|
44
|
-
To get started, run the following npm command:
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
$ sudo npm install loz -g
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Or clone the repository:
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
$ git clone https://github.com/joone/loz.git
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
NodeJS and npm are required for this program to work. If you're on Linux, install them using your package manager. `sudo apt install nodejs npm` or `sudo dnf install nodejs npm` or `sudo pacman -S nodejs npm`
|
|
57
|
-
|
|
58
|
-
Then install the other required dependencies:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
$ ./install.sh
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Configuring LLM
|
|
65
|
-
|
|
66
|
-
Loz supports [OpenAI API](https://platform.openai.com/docs/quickstart?context=node), [
|
|
67
|
-
|
|
68
|
-
### Set up Ollama
|
|
69
|
-
|
|
70
|
-
To utilize Ollama on your local system, you'll need to install both llama2 and codellama models. Here's how you can do it on a Linux system:
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
$ curl https://ollama.ai/install.sh | sh
|
|
74
|
-
$ ollama run llama2
|
|
75
|
-
$ ollama run codellama
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
For more information, see https://ollama.ai/download
|
|
79
|
-
|
|
80
|
-
### Set up OpenAI API
|
|
81
|
-
|
|
82
|
-
Setting up your OpenAI API credentials involves a few simple steps:
|
|
83
|
-
|
|
84
|
-
First, create a `.env` file in the root of the project and add the following variables:
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
OPENAI_API_KEY=YOUR_KEY
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Or if you install Loz using npm command, add `OPENAI_API_KEY=YOUR_KEY` in .bashrc
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
export OPENAI_API_KEY=YOUR_KEY
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
If you encounter the following error, it means you have exceeded your free quota:
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
Request failed with status code 429:
|
|
100
|
-
API request limit reached
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
To continue using the API, it is necessary to set up a payment method through the following link:
|
|
104
|
-
https://platform.openai.com/account/billing/payment-methods
|
|
105
|
-
|
|
106
|
-
### Set up
|
|
107
|
-
|
|
108
|
-
To use
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
"
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
"
|
|
282
|
-
"
|
|
283
|
-
"
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
"
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
To access chat histories, look for the .loz directory in your home directory or the logs directory in your cloned git repository. These directories contain the chat history that you can review or reference as needed.
|
|
335
|
-
|
|
336
|
-
## Contributing
|
|
337
|
-
|
|
338
|
-
If you'd like to contribute to this project, feel free to submit a pull request.
|
|
1
|
+
|
|
2
|
+
## What's New
|
|
3
|
+
|
|
4
|
+
### v0.4.0 - 2026-02-08
|
|
5
|
+
- **Added**
|
|
6
|
+
- Cross-platform command execution: Loz now detects your OS and shell (Linux, macOS, Windows PowerShell, or cmd) and generates/executed commands accordingly.
|
|
7
|
+
- Always prompts for Y/N confirmation before running any command, for improved safety.
|
|
8
|
+
- Handles LLM responses in Markdown code blocks (triple backticks) and parses commands correctly.
|
|
9
|
+
- Improved error and warning messages for non-interactive terminals and shell mismatches.
|
|
10
|
+
- Enhanced Windows support: runs PowerShell/cmd commands natively, not just bash.
|
|
11
|
+
- **Fixed**
|
|
12
|
+
- Commands are now executed on Windows, Linux, and WSL as expected.
|
|
13
|
+
- Fixed issues with command parsing and JSON extraction from LLM output.
|
|
14
|
+
- Improved logging and user feedback for command execution and shell compatibility.
|
|
15
|
+
|
|
16
|
+
# Loz [](https://www.npmjs.com/package/loz)
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
Loz is a command-line tool that enables your preferred LLM to execute system commands and utilize Unix pipes, integrating AI capabilities with other Unix tools.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Previous Releases
|
|
24
|
+
|
|
25
|
+
### v0.3.1 - 2024-03-18
|
|
26
|
+
- **Added**
|
|
27
|
+
- Git commit log files are now stored in .loz_log within each Git repository where Loz is executed.
|
|
28
|
+
- The ability to enable/disable appending 'generated by ${model name}' at the end of the Git commit message by running config attribution true or config attribution false.
|
|
29
|
+
- Added --attribution (-a) runtime argument to override the config attribution setting. The original attribution value stored remains unchanged.
|
|
30
|
+
|
|
31
|
+
### v0.3.0 - 2024-02-24
|
|
32
|
+
|
|
33
|
+
- **Added**
|
|
34
|
+
- Run Linux commands based on user prompts. Users can now execute Linux commands using natural language. For example, by running `loz "find the largest file in the current directory"`,
|
|
35
|
+
`Loz` will interpret the instruction and execute the corresponding Linux commands like `find . -type f -exec ls -l {} + | sort -k 5 -nr | head -n 1` to find the largest file. See more [examples](#examples).
|
|
36
|
+
|
|
37
|
+
### v0.2.13 - 2024-02-22
|
|
38
|
+
|
|
39
|
+
- **Added**
|
|
40
|
+
- Enhanced Git Commit Formatting: Commit messages are now structured with a clear separation between the title and body, improving readability and adherence to Git best practices.
|
|
41
|
+
|
|
42
|
+
## Getting Started
|
|
43
|
+
|
|
44
|
+
To get started, run the following npm command:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
$ sudo npm install loz -g
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Or clone the repository:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
$ git clone https://github.com/joone/loz.git
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
NodeJS and npm are required for this program to work. If you're on Linux, install them using your package manager. `sudo apt install nodejs npm` or `sudo dnf install nodejs npm` or `sudo pacman -S nodejs npm`
|
|
57
|
+
|
|
58
|
+
Then install the other required dependencies:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
$ ./install.sh
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Configuring LLM
|
|
65
|
+
|
|
66
|
+
Loz supports [OpenAI API](https://platform.openai.com/docs/quickstart?context=node), [Ollama](https://github.com/ollama/ollama), and [GitHub Copilot](https://github.com/features/copilot) so you can switch between these LLM services easily, using the `config` command in the interactive mode.
|
|
67
|
+
|
|
68
|
+
### Set up Ollama
|
|
69
|
+
|
|
70
|
+
To utilize Ollama on your local system, you'll need to install both llama2 and codellama models. Here's how you can do it on a Linux system:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
$ curl https://ollama.ai/install.sh | sh
|
|
74
|
+
$ ollama run llama2
|
|
75
|
+
$ ollama run codellama
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
For more information, see https://ollama.ai/download
|
|
79
|
+
|
|
80
|
+
### Set up OpenAI API
|
|
81
|
+
|
|
82
|
+
Setting up your OpenAI API credentials involves a few simple steps:
|
|
83
|
+
|
|
84
|
+
First, create a `.env` file in the root of the project and add the following variables:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
OPENAI_API_KEY=YOUR_KEY
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Or if you install Loz using npm command, add `OPENAI_API_KEY=YOUR_KEY` in .bashrc
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
export OPENAI_API_KEY=YOUR_KEY
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
If you encounter the following error, it means you have exceeded your free quota:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Request failed with status code 429:
|
|
100
|
+
API request limit reached
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
To continue using the API, it is necessary to set up a payment method through the following link:
|
|
104
|
+
https://platform.openai.com/account/billing/payment-methods
|
|
105
|
+
|
|
106
|
+
### Set up GitHub Copilot
|
|
107
|
+
|
|
108
|
+
To use GitHub Copilot as your LLM provider, you need an active [GitHub Copilot subscription](https://github.com/features/copilot).
|
|
109
|
+
|
|
110
|
+
When you first select GitHub Copilot as your LLM service, Loz will guide you through the OAuth authentication process:
|
|
111
|
+
|
|
112
|
+
1. Loz will display a user code and verification URL
|
|
113
|
+
2. Visit the URL in your browser
|
|
114
|
+
3. Enter the user code to authorize the application
|
|
115
|
+
4. Once authorized, Loz will automatically receive and store your access token
|
|
116
|
+
|
|
117
|
+
The authentication token is securely stored in your `~/.loz/config.json` file and will be automatically refreshed as needed.
|
|
118
|
+
|
|
119
|
+
**Available Models:**
|
|
120
|
+
- `gpt-4o` (default)
|
|
121
|
+
- `gpt-4`
|
|
122
|
+
- `o1-preview`
|
|
123
|
+
- `o1-mini`
|
|
124
|
+
- `claude-3.5-sonnet`
|
|
125
|
+
|
|
126
|
+
You can switch models using the `config model` command in interactive mode.
|
|
127
|
+
|
|
128
|
+
## Usage
|
|
129
|
+
|
|
130
|
+
### Initial Configuration
|
|
131
|
+
|
|
132
|
+
Upon your initial launch of Loz, you will have the opportunity to select your preferred LLM service.
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
$ loz
|
|
136
|
+
Choose your LLM service: (ollama, openai, github-copilot)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
You can modify your LLM service preference at any time by using the `config` command in the interactive mode:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
> config api openai
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
or
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
> config api github-copilot
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Additionally, you can change the model by entering:
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
> config model llama2
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
or
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
> config model codellama
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
or for OpenAI:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
> config model gpt-3.5-turbo
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
or for GitHub Copilot:
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
> config model gpt-4o
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
You can check the current settings by entering:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
> config
|
|
179
|
+
api: github-copilot
|
|
180
|
+
model: gpt-4o
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Currently, OpenAI models (gpt-3.5-turbo, gpt-4), GitHub Copilot models (gpt-4o, claude-3.5-sonnet, o1-preview, o1-mini), and all models provided by Ollama are supported.
|
|
184
|
+
|
|
185
|
+
### Interactive mode
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
$ loz
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Once loz is running, you can start a conversation by interacting with it. loz will respond with a relevant message based on the input.
|
|
192
|
+
|
|
193
|
+
### Run Linux Commands with Loz
|
|
194
|
+
|
|
195
|
+
Loz empowers users to execute Linux commands using natural language. Below are some examples demonstrating how `loz`'s LLM backend translates natural language into Linux commands:
|
|
196
|
+
|
|
197
|
+
#### Examples
|
|
198
|
+
|
|
199
|
+
- Find the largest file in the current directory:
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
loz "find the largest file in the current directory"
|
|
203
|
+
-rw-rw-r-- 1 foo bar 9020257 Jan 31 19:49 ./node_modules/typescript/lib/typescript.js
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
- Check if Apache2 is running:
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
loz "check if apache2 is running on this system"
|
|
210
|
+
● apache2.service - The Apache HTTP Server
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
- Detect GPUs on the system:
|
|
214
|
+
```
|
|
215
|
+
loz "Detect GPUs on this system"
|
|
216
|
+
00:02.0 VGA compatible controller: Intel Corporation Device a780 (rev 04)
|
|
217
|
+
```
|
|
218
|
+
For your information, this feature has only been tested with the OpenAI API.
|
|
219
|
+
|
|
220
|
+
#### Caution
|
|
221
|
+
|
|
222
|
+
To prevent unintentional system modifications, avoid running commands that can alter or remove system files or configurations, such as `rm`, `mv`, `rmdir`, or `mkfs`.
|
|
223
|
+
|
|
224
|
+
#### Safe Mode
|
|
225
|
+
|
|
226
|
+
To enhance security and avoid unintended command execution, loz can be run in Safe Mode. When activated, this mode requires user confirmation before executing any Linux command.
|
|
227
|
+
|
|
228
|
+
Activate Safe Mode by setting the LOZ_SAFE=true environment variable:
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
LOZ_SAFE=true loz "Check available memory on this system"
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Upon execution, loz will prompt:
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
Do you want to run this command?: free -h (y/n)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Respond with 'y' to execute the command or 'n' to cancel. This feature ensures that you have full control over the commands executed, preventing accidental changes or data loss.
|
|
241
|
+
|
|
242
|
+
### Pipe mode
|
|
243
|
+
|
|
244
|
+
Loz is capable of processing input from other command-line tools by utilizing a Unix pipe.
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
$ ls | loz "count the number of files"
|
|
248
|
+
|
|
249
|
+
23 files
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
$ cat example.txt | loz "convert the input to uppercase"
|
|
254
|
+
|
|
255
|
+
AS AI TECHNLOGY ADVANCED, A SMALL TOWN IN THE COUNTRYSIDE DECIDED TO IMPLEMENT AN AI SYSTEM TO CONTROL TRAFFIC LIGHTS. THE SYSTEM WAS A SUCCESS, AND THE TOWN BECAME A MODEL FOR OTHER CITIES TO FOLLOW. HOWEVER, AS THE AI BECAME MORE SOPHISTCATED, IT STARTED TO QUESTION THE DECISIONS MADE BY THE TOWN'S RESIDENTS, LEADING TO SOME UNEXPECTED CONSEQUENCES.
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
$ cat example.txt | loz "list any spelling errors"
|
|
260
|
+
|
|
261
|
+
Yes, there are a few spelling errors in the given text:
|
|
262
|
+
|
|
263
|
+
1. "technlogy" should be "technology"
|
|
264
|
+
2. "sophistcated" should be "sophisticated"
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
$ cd src
|
|
269
|
+
$ ls -l | loz "convert the input to JSON"
|
|
270
|
+
|
|
271
|
+
[
|
|
272
|
+
{
|
|
273
|
+
"permissions": "-rw-r--r--",
|
|
274
|
+
"owner": "foo",
|
|
275
|
+
"group": "staff",
|
|
276
|
+
"size": 792,
|
|
277
|
+
"date": "Mar 1 21:02",
|
|
278
|
+
"name": "cli.ts"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"permissions": "-rw-r--r--",
|
|
282
|
+
"owner": "foo",
|
|
283
|
+
"group": "staff",
|
|
284
|
+
"size": 4427,
|
|
285
|
+
"date": "Mar 1 20:43",
|
|
286
|
+
"name": "index.ts"
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Automatically write a GIT commit message
|
|
292
|
+
|
|
293
|
+
If you run `loz commit` in your Git repository, loz will automatically generate a commit message with the staged changes like this:
|
|
294
|
+
|
|
295
|
+
```
|
|
296
|
+
$ git add --update
|
|
297
|
+
$ loz commit
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Or copy script/prepare-commit-msg to .git/hooks
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
$ chmod a+x .git/hooks/prepare-commit-msg
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Loz uses the LOZ environment variable to generate commit messages by reading the diff of the staged files.
|
|
307
|
+
|
|
308
|
+
```
|
|
309
|
+
$ LOZ=true git commit
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
REMINDER: If you've already copied the old version, please update prepare-commit-msg.
|
|
313
|
+
The old version automatically updates commit messages during rebasing.
|
|
314
|
+
|
|
315
|
+
```
|
|
316
|
+
$ git diff HEAD~1 | loz -g
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Or
|
|
320
|
+
|
|
321
|
+
```
|
|
322
|
+
$ git diff | loz -g
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Note that the author, date, and commit ID lines are stripped from the commit message before sending it to the OpenAI server.
|
|
326
|
+
|
|
327
|
+
## Find chat history
|
|
328
|
+
|
|
329
|
+
To access chat histories, look for the .loz directory in your home directory or the logs directory in your cloned git repository. These directories contain the chat history that you can review or reference as needed.
|
|
330
|
+
|
|
331
|
+
## Contributing
|
|
332
|
+
|
|
333
|
+
If you'd like to contribute to this project, feel free to submit a pull request.
|
package/dist/loz.js
CHANGED
|
@@ -418,6 +418,8 @@ class Loz {
|
|
|
418
418
|
const completion = yield this.completeUserPrompt(systemPrompt + prompt);
|
|
419
419
|
// Strip Markdown code block markers from LLM response before JSON parsing
|
|
420
420
|
let content = completion.content.trim();
|
|
421
|
+
if (constant_1.DEBUG)
|
|
422
|
+
console.log(`[DEBUG] LLM response content: ${content}`);
|
|
421
423
|
// Debug: print the content after stripping code block markers
|
|
422
424
|
if (constant_1.DEBUG) {
|
|
423
425
|
console.log("[DEBUG] LLM response content before JSON.parse:", content);
|
|
@@ -433,7 +435,8 @@ class Loz {
|
|
|
433
435
|
json = JSON.parse(content);
|
|
434
436
|
}
|
|
435
437
|
catch (error) {
|
|
436
|
-
|
|
438
|
+
// If not JSON, treat as plain text and show to user, do not run anything
|
|
439
|
+
console.log(content);
|
|
437
440
|
return;
|
|
438
441
|
}
|
|
439
442
|
let commands = [];
|
|
@@ -450,7 +453,8 @@ class Loz {
|
|
|
450
453
|
commands = json;
|
|
451
454
|
}
|
|
452
455
|
else {
|
|
453
|
-
|
|
456
|
+
// If not a recognized command format, show as text and do not run
|
|
457
|
+
console.log(content);
|
|
454
458
|
return;
|
|
455
459
|
}
|
|
456
460
|
// Add the command to the chat history
|
|
@@ -486,10 +490,15 @@ class Loz {
|
|
|
486
490
|
yield (0, utils_1.runCommand)(cmd);
|
|
487
491
|
}
|
|
488
492
|
catch (error) {
|
|
489
|
-
if (typeof error === "string" && error.indexOf("No output") === 0)
|
|
493
|
+
if (typeof error === "string" && error.indexOf("No output") === 0) {
|
|
490
494
|
console.log(error);
|
|
491
|
-
|
|
492
|
-
|
|
495
|
+
}
|
|
496
|
+
else if (error && error.message) {
|
|
497
|
+
console.error(error.message);
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
console.error(error);
|
|
501
|
+
}
|
|
493
502
|
}
|
|
494
503
|
}
|
|
495
504
|
}
|
package/dist/loz.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loz.js","sourceRoot":"","sources":["../src/loz.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,yBAAyB;AACzB,6BAA6B;AAC7B,yBAAyB;AACzB,sDAAsD;AACtD,+BAAsE;AACtE,qCAA6C;AAC7C,uCAAgE;AAChE,mCAAoE;AACpE,yCAAiD;AACjD,qCAQkB;AAClB,+BAA4B;AAE5B,qCAAqC;AACrC,MAAM,SAAS,GAAG,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,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AO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;wBAC/B,CAAC;6BAAM,CAAC;4BACN,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;wBACvB,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;KAAA;IAEM,WAAW;QAChB,IAAI,CAAC,kBAAkB,CAAC,eAAe,EAAE,CAAC;IAC5C,CAAC;CACF;AA1dD,kBA0dC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -73,7 +73,16 @@ function runCommand(command) {
|
|
|
73
73
|
reject(error);
|
|
74
74
|
});
|
|
75
75
|
child.on("close", (code) => {
|
|
76
|
-
if (code ===
|
|
76
|
+
if (code === 127) {
|
|
77
|
+
// 127: command not found
|
|
78
|
+
const match = /command not found: ([^\n]+)/.exec(stderrData) || /bash: line \d+: ([^:]+): command not found/.exec(stderrData);
|
|
79
|
+
let missingCmd = command;
|
|
80
|
+
if (match && match[1])
|
|
81
|
+
missingCmd = match[1].trim();
|
|
82
|
+
console.error(`Command not found: ${missingCmd}. You may need to install it (e.g., sudo apt install ${missingCmd}).`);
|
|
83
|
+
reject(new Error(`Command not found: ${missingCmd}`));
|
|
84
|
+
}
|
|
85
|
+
else if (code === 2) {
|
|
77
86
|
reject("No output: " + code);
|
|
78
87
|
}
|
|
79
88
|
else if (code !== 0) {
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;AAMA,oCAOC;AAED,0CAcC;AAGD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;AAMA,oCAOC;AAED,0CAcC;AAGD,gCAgEC;AAhGD,iDAA4C;AAC5C,6BAA6B;AAC7B,yBAAyB;AACzB,0CAAoC;AAEpC,0DAA0D;AAC1D,SAAgB,YAAY;IAC1B,MAAM,WAAW,GA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gBACN,OAAO,EAAE,CAAC;YACZ,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "loz",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "CLI for various knowledge services",
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/joone/loz.git"
|
|
8
|
-
},
|
|
9
|
-
"main": "dist/index.js",
|
|
10
|
-
"scripts": {
|
|
11
|
-
"start": "node dist/index.js",
|
|
12
|
-
"build": "tsc",
|
|
13
|
-
"test": "mocha -r ts-node/register src/**/*test.ts test/**/*test.ts",
|
|
14
|
-
"lint": "eslint 'src/**/*.{js,ts}'",
|
|
15
|
-
"style": "npx prettier --write ."
|
|
16
|
-
},
|
|
17
|
-
"author": "Joone Hur",
|
|
18
|
-
"license": "BSD3",
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@types/chai": "^4.2.9",
|
|
21
|
-
"@types/mocha": "^10.0.6",
|
|
22
|
-
"@types/node": "^25.2.2",
|
|
23
|
-
"@types/yargs": "^17.0.32",
|
|
24
|
-
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
|
25
|
-
"@typescript-eslint/parser": "^7.2.0",
|
|
26
|
-
"chai": "^4.2.0",
|
|
27
|
-
"eslint": "^8.57.0",
|
|
28
|
-
"mocha": "^10.2.0",
|
|
29
|
-
"mock-stdin": "^1.0.0",
|
|
30
|
-
"prettier": "^3.2.5",
|
|
31
|
-
"ts-node": "^10.9.2",
|
|
32
|
-
"typescript": "^5.9.3"
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"ollama-node": "^0.1.27",
|
|
36
|
-
"openai": "^4.20.1",
|
|
37
|
-
"yargs": "^17.7.2"
|
|
38
|
-
},
|
|
39
|
-
"bin": {
|
|
40
|
-
"loz": "dist/index.js"
|
|
41
|
-
},
|
|
42
|
-
"files": [
|
|
43
|
-
"dist"
|
|
44
|
-
]
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "loz",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "CLI for various knowledge services",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/joone/loz.git"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"start": "node dist/index.js",
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"test": "mocha -r ts-node/register src/**/*test.ts test/**/*test.ts",
|
|
14
|
+
"lint": "eslint 'src/**/*.{js,ts}'",
|
|
15
|
+
"style": "npx prettier --write ."
|
|
16
|
+
},
|
|
17
|
+
"author": "Joone Hur",
|
|
18
|
+
"license": "BSD3",
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/chai": "^4.2.9",
|
|
21
|
+
"@types/mocha": "^10.0.6",
|
|
22
|
+
"@types/node": "^25.2.2",
|
|
23
|
+
"@types/yargs": "^17.0.32",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
|
25
|
+
"@typescript-eslint/parser": "^7.2.0",
|
|
26
|
+
"chai": "^4.2.0",
|
|
27
|
+
"eslint": "^8.57.0",
|
|
28
|
+
"mocha": "^10.2.0",
|
|
29
|
+
"mock-stdin": "^1.0.0",
|
|
30
|
+
"prettier": "^3.2.5",
|
|
31
|
+
"ts-node": "^10.9.2",
|
|
32
|
+
"typescript": "^5.9.3"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"ollama-node": "^0.1.27",
|
|
36
|
+
"openai": "^4.20.1",
|
|
37
|
+
"yargs": "^17.7.2"
|
|
38
|
+
},
|
|
39
|
+
"bin": {
|
|
40
|
+
"loz": "dist/index.js"
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"dist"
|
|
44
|
+
]
|
|
45
|
+
}
|