opencommit 3.2.19 → 3.3.1

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.
Files changed (3) hide show
  1. package/README.md +23 -2
  2. package/out/cli.cjs +1664 -1008
  3. package/package.json +7 -8
package/README.md CHANGED
@@ -90,6 +90,25 @@ export OLLAMA_HOST=0.0.0.0
90
90
 
91
91
  This will make Ollama listen on all interfaces, including IPv6 and IPv4, resolving the connection issue. You can add this line to your shell configuration file (like `.bashrc` or `.zshrc`) to make it persistent across sessions.
92
92
 
93
+ ### Running locally with llama.cpp
94
+
95
+ You can run OpenCommit with local models served by [llama.cpp](https://github.com/ggerganov/llama.cpp):
96
+
97
+ - install and build llama.cpp
98
+ - start the server with a GGUF model: `./llama-server -m model.gguf --port 8080`
99
+ - run (in your project directory):
100
+
101
+ ```sh
102
+ git add <files...>
103
+ oco config set OCO_AI_PROVIDER='llamacpp' OCO_API_URL='http://localhost:8080'
104
+ ```
105
+
106
+ If the server is running on a different machine, set the URL accordingly:
107
+
108
+ ```sh
109
+ oco config set OCO_API_URL='http://192.168.1.10:8080'
110
+ ```
111
+
93
112
  ### Flags
94
113
 
95
114
  There are multiple optional flags that can be used with the `oco` command:
@@ -122,7 +141,7 @@ Create a `.env` file and add OpenCommit config variables there like this:
122
141
 
123
142
  ```env
124
143
  ...
125
- OCO_AI_PROVIDER=<openai (default), anthropic, azure, ollama, gemini, flowise, deepseek, aimlapi>
144
+ OCO_AI_PROVIDER=<openai (default), anthropic, azure, ollama, llamacpp, gemini, flowise, deepseek, aimlapi>
126
145
  OCO_API_KEY=<your OpenAI API token> // or other LLM provider API token
127
146
  OCO_API_URL=<may be used to set proxy path to OpenAI api>
128
147
  OCO_API_CUSTOM_HEADERS=<JSON string of custom HTTP headers to include in API requests>
@@ -227,7 +246,7 @@ oco models --provider anthropic
227
246
 
228
247
  By default OpenCommit uses [OpenAI](https://openai.com).
229
248
 
230
- You could switch to [Azure OpenAI Service](https://learn.microsoft.com/azure/cognitive-services/openai/) or Flowise or Ollama.
249
+ You could switch to [Azure OpenAI Service](https://learn.microsoft.com/azure/cognitive-services/openai/) or Flowise or Ollama or llama.cpp.
231
250
 
232
251
  ```sh
233
252
  oco config set OCO_AI_PROVIDER=azure OCO_API_KEY=<your_azure_api_key> OCO_API_URL=<your_azure_endpoint>
@@ -235,6 +254,8 @@ oco config set OCO_AI_PROVIDER=azure OCO_API_KEY=<your_azure_api_key> OCO_API_UR
235
254
  oco config set OCO_AI_PROVIDER=flowise OCO_API_KEY=<your_flowise_api_key> OCO_API_URL=<your_flowise_endpoint>
236
255
 
237
256
  oco config set OCO_AI_PROVIDER=ollama OCO_API_KEY=<your_ollama_api_key> OCO_API_URL=<your_ollama_endpoint>
257
+
258
+ oco config set OCO_AI_PROVIDER=llamacpp OCO_API_URL=<your_llamacpp_endpoint>
238
259
  ```
239
260
 
240
261
  ### Use with Proxy