curl http://localhost:11434/api/generate -d '{"model":"qwen2.5:1.5b","prompt":"Finish the joke in one short sentence: Why do programmers prefer dark mode? Because...","stream":false}' # bash/zsh
Invoke-RestMethod http://localhost:11434/api/generate -Method Post -Body '{"model":"qwen2.5:1.5b","prompt":"Finish the joke in one short sentence: Why do programmers prefer dark mode? Because...","stream":false}' # PowerShell
Restart Cursor. Ask things like *"list my recent notes"* or *"create a note called scratch with today's date"*.
> Linux: `host.docker.internal` doesn't resolve by default. Add `"--add-host=host.docker.internal:host-gateway"` to the args array.
### Local model as Cursor's chat model
Cursor Settings → Models → add a custom OpenAI-compatible model:
- **Base URL:** `http://localhost:11434/v1`
- **API Key:** anything (e.g. `ollama`)
- **Model:** `qwen2.5:1.5b`
Only affects the chat model picker — Cursor Tab and background jobs still use Cursor's cloud models. If Cursor rejects the local URL (older versions validate from the cloud), expose it via `cloudflared tunnel --url http://localhost:11434` and use the tunnel URL instead.
## Useful commands
All commands below assume `COMPOSE_FILE=docker-compose.ollama-stack.yml` is set; otherwise prepend `-f docker-compose.ollama-stack.yml`.
```bash
docker compose logs -f <service> # tail logs
docker compose exec ollama ollama list # list installed models
docker compose exec ollama ollama pull qwen2.5-coder:3b # add a model
docker compose down # stop (keeps everything)
docker compose down -v # stop + wipe models & chat history (notes survive)
docker compose pull && docker compose up -d # update
```
Any model tag from https://ollama.com/library works. Rough RAM rule: 1B ≈ 1 GB, 3B ≈ 2 GB, 7B ≈ 5 GB.
## Data
-`./data/` — your notes (plain markdown, back this up)