Document local AI coding setup
This commit is contained in:
parent
aef8bfe76e
commit
7cacdf17c0
1
.gitignore
vendored
1
.gitignore
vendored
@ -132,3 +132,4 @@ dist
|
|||||||
.yarn/build-state.yml
|
.yarn/build-state.yml
|
||||||
.yarn/install-state.gz
|
.yarn/install-state.gz
|
||||||
.pnp.*
|
.pnp.*
|
||||||
|
.aider*
|
||||||
|
|||||||
104
README.md
104
README.md
@ -207,3 +207,107 @@ npx @openai/codex resume <session-id> --no-alt-screen -s workspace-write
|
|||||||
```
|
```
|
||||||
|
|
||||||
For repository-specific agent behavior, see `AGENTS.md`.
|
For repository-specific agent behavior, see `AGENTS.md`.
|
||||||
|
|
||||||
|
## Local AI coding setup
|
||||||
|
|
||||||
|
The following optional setup provides local coding assistance on Kubuntu or Ubuntu with Ollama, Aider, and the Continue extension for VS Code.
|
||||||
|
|
||||||
|
### Ollama
|
||||||
|
|
||||||
|
Install Ollama:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -fsSL https://ollama.com/install.sh | sh
|
||||||
|
sudo systemctl status ollama
|
||||||
|
```
|
||||||
|
|
||||||
|
Download the recommended local models:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ollama pull qwen2.5-coder:1.5b-base
|
||||||
|
ollama pull qwen2.5-coder:7b
|
||||||
|
ollama pull qwen2.5-coder:14b
|
||||||
|
ollama pull nomic-embed-text
|
||||||
|
```
|
||||||
|
|
||||||
|
Verify that the Ollama API is available:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl http://127.0.0.1:11434/api/tags
|
||||||
|
```
|
||||||
|
|
||||||
|
Recommended model usage:
|
||||||
|
|
||||||
|
| Use case | Model |
|
||||||
|
| --- | --- |
|
||||||
|
| Autocomplete | `qwen2.5-coder:1.5b-base` |
|
||||||
|
| Daily coding | `qwen2.5-coder:7b` |
|
||||||
|
| Larger refactoring and review | `qwen2.5-coder:14b` |
|
||||||
|
| Embeddings | `nomic-embed-text` |
|
||||||
|
|
||||||
|
### Aider
|
||||||
|
|
||||||
|
Install Aider with `uv`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
|
source ~/.bashrc
|
||||||
|
uv tool install aider-chat
|
||||||
|
```
|
||||||
|
|
||||||
|
Configure the local Ollama endpoint and optional aliases:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo 'export OLLAMA_API_BASE=http://127.0.0.1:11434' >> ~/.bashrc
|
||||||
|
echo 'alias aider7="aider --model ollama_chat/qwen2.5-coder:7b"' >> ~/.bashrc
|
||||||
|
echo 'alias aider14="aider --model ollama_chat/qwen2.5-coder:14b"' >> ~/.bashrc
|
||||||
|
source ~/.bashrc
|
||||||
|
```
|
||||||
|
|
||||||
|
Start Aider from the repository root:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd <project>
|
||||||
|
aider7
|
||||||
|
```
|
||||||
|
|
||||||
|
Ollama must be running locally on port `11434`. Aider works best inside a Git repository and may ask to add its local files to `.gitignore`.
|
||||||
|
|
||||||
|
### Continue for VS Code
|
||||||
|
|
||||||
|
Install the Continue extension from the VS Code extension view or with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
code --install-extension Continue.continue
|
||||||
|
```
|
||||||
|
|
||||||
|
Open the command palette with `Ctrl+Shift+P`, run `Continue: Open Config`, and use:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Local Ollama Coding
|
||||||
|
version: 0.0.1
|
||||||
|
schema: v1
|
||||||
|
|
||||||
|
models:
|
||||||
|
- name: Qwen Coder 7B
|
||||||
|
provider: ollama
|
||||||
|
model: qwen2.5-coder:7b
|
||||||
|
roles:
|
||||||
|
- chat
|
||||||
|
- edit
|
||||||
|
- apply
|
||||||
|
|
||||||
|
- name: Qwen Coder 1.5B
|
||||||
|
provider: ollama
|
||||||
|
model: qwen2.5-coder:1.5b-base
|
||||||
|
roles:
|
||||||
|
- autocomplete
|
||||||
|
|
||||||
|
- name: Nomic Embeddings
|
||||||
|
provider: ollama
|
||||||
|
model: nomic-embed-text
|
||||||
|
roles:
|
||||||
|
- embed
|
||||||
|
```
|
||||||
|
|
||||||
|
Enable Continue tab autocomplete in the VS Code settings. Use Aider with Ollama for project-wide terminal changes, Continue for editor navigation and autocomplete, and Codex for larger repository tasks.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user