on main help sign in
docs(readme): add Ollama and LMStudio config (#538)
2673806Kujtim Hoxha
README.md+62−5
@@ -138,19 +138,29 @@ Crush runs great with no configuration. That said, if you do need or want to
138customize Crush, configuration can be added either local to the project itself,
138customize Crush, configuration can be added either local to the project itself,
139or globally, with the following priority:
139or globally, with the following priority:
140
140
141−1. `./.crush.json`
141+1. `.crush.json`
142−2. `./crush.json`
142+2. `crush.json`
143−3. `$HOME/.config/crush/crush.json`
143+3. `$HOME/.config/crush/crush.json` (Windows: `%USERPROFILE%\AppData\Local\crush\crush.json`)
144
144
145Configuration itself is stored as a JSON object:
145Configuration itself is stored as a JSON object:
146
146
147```json
147```json
148{
148{
149− "this-setting": { }
149+ "this-setting": {"this": "that"},
150− "that-setting": { }
150+ "that-setting": ["ceci", "cela"]
151}
151}
152```
152```
153
153
154+As an additional note, Crush also stores ephemeral data, such as application state, in one additional location:
155+
156+```bash
157+# Unix
158+$HOME/.local/shared/crush/crush.json
159+
160+# Windows
161+%LOCALAPPDATA%\crush\crush.json
162+```
163+
154### LSPs
164### LSPs
155
165
156Crush can use LSPs for additional context to help inform its decisions, just
166Crush can use LSPs for additional context to help inform its decisions, just
@@ -245,6 +255,53 @@ permissions. Use this with care.
245You can also skip all permission prompts entirely by running Crush with the
255You can also skip all permission prompts entirely by running Crush with the
246`--yolo` flag. Be very, very careful with this feature.
256`--yolo` flag. Be very, very careful with this feature.
247
257
258+### Local Models
259+
260+Local models can also be configured via OpenAI-compatible API. Here are two common examples:
261+
262+#### Ollama
263+
264+```json
265+{
266+ "providers": {
267+ "ollama": {
268+ "name": "Ollama",
269+ "base_url": "http://localhost:11434/v1/",
270+ "type": "openai",
271+ "models": [
272+ {
273+ "name": "Qwen 3 30B",
274+ "id": "qwen3:30b",
275+ "context_window": 256000,
276+ "default_max_tokens": 20000
277+ }
278+ ]
279+ }
280+}
281+```
282+
283+#### LM Studio
284+
285+```json
286+{
287+ "providers": {
288+ "lmstudio": {
289+ "name": "LM Studio",
290+ "base_url": "http://localhost:1234/v1/",
291+ "type": "openai",
292+ "models": [
293+ {
294+ "name": "Qwen 3 30B",
295+ "id": "qwen/qwen3-30b-a3b-2507",
296+ "context_window": 256000,
297+ "default_max_tokens": 20000
298+ }
299+ ]
300+ }
301+ }
302+}
303+```
304+
248### Custom Providers
305### Custom Providers
249
306
250Crush supports custom provider configurations for both OpenAI-compatible and
307Crush supports custom provider configurations for both OpenAI-compatible and