lcode-cli 0.1.1__tar.gz → 0.2.0__tar.gz
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.
- lcode_cli-0.2.0/CHANGELOG.md +105 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/PKG-INFO +23 -15
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/README.md +22 -14
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/SECURITY.md +9 -4
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/configuration.md +13 -5
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/how-it-works.md +7 -3
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/index.md +4 -3
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/installation.md +14 -6
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/models.md +49 -16
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/quickstart.md +3 -2
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/troubleshooting.md +26 -6
- lcode_cli-0.2.0/docs/usage.md +198 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/install.sh +4 -3
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/__init__.py +1 -1
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/agent.py +156 -28
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/cli.py +35 -5
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/config.py +14 -1
- lcode_cli-0.2.0/src/lcode/limits.py +41 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/models.toml +21 -23
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/permissions.py +3 -3
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/repl.py +136 -9
- lcode_cli-0.2.0/src/lcode/sessions.py +122 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/tools.py +78 -1
- lcode_cli-0.2.0/src/lcode/web.py +360 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/tests/conftest.py +1 -1
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/tests/test_agent.py +81 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/tests/test_catalog.py +1 -1
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/tests/test_cli.py +13 -0
- lcode_cli-0.2.0/tests/test_sessions.py +174 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/tests/test_tools.py +6 -1
- lcode_cli-0.2.0/tests/test_web.py +248 -0
- lcode_cli-0.1.1/CHANGELOG.md +0 -55
- lcode_cli-0.1.1/docs/usage.md +0 -116
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.editorconfig +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.github/CODEOWNERS +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.github/ISSUE_TEMPLATE/model_request.yml +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.github/dependabot.yml +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.github/workflows/ci.yml +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.github/workflows/docs.yml +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.github/workflows/release.yml +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.gitignore +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/.pre-commit-config.yaml +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/AGENTS.md +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/CODE_OF_CONDUCT.md +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/CONTRIBUTING.md +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/LICENSE +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/assets/demo.svg +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/assets/extra.css +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/assets/logo.svg +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/assets/social-preview.png +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/changelog.md +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/docs/contributing.md +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/mkdocs.yml +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/overrides/main.html +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/pyproject.toml +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/scripts/record_demo.py +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/scripts/social-preview.html +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/__main__.py +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/catalog.py +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/hardware.py +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/ollama.py +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/src/lcode/render.py +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/tests/test_config.py +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/tests/test_permissions.py +0 -0
- {lcode_cli-0.1.1 → lcode_cli-0.2.0}/uv.lock +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to lcode are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.2.0] - 2026-09-29
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Web access for the model: `web_search` finds current information (latest releases, docs, error
|
|
14
|
+
messages) through Ollama web search, Brave Search, Tavily or a self-hosted SearXNG, and `web_fetch`
|
|
15
|
+
reads pages as clean text. On by default; `lcode config set web ask|off` or `lcode --no-web` limits
|
|
16
|
+
it. Search API keys are read from environment variables only. Closes #7.
|
|
17
|
+
|
|
18
|
+
## [0.1.2] - 2026-09-29
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- All eight catalog models are now tested end to end (`qwen3.8-27b`, `qwen3.6-27b`, `laguna-xs-2.1`,
|
|
23
|
+
`nemotron-3.5-lightning` and `gpt-oss-20b` joined the three tested before), with a results table
|
|
24
|
+
in the models guide. `laguna-xs-2.1`'s cache size is now measured rather than estimated.
|
|
25
|
+
- When a model fails to load because its context doesn't fit in GPU memory, lcode retries with half the
|
|
26
|
+
context and remembers the size that worked for that model (`~/.local/state/lcode/limits.json`, shown
|
|
27
|
+
by `lcode doctor`), so later sessions don't fail first. Found with `nemotron-3.5-lightning`, whose 1M
|
|
28
|
+
context doesn't fit on a 12 GB GPU.
|
|
29
|
+
- Named sessions and a session picker: `/rename <name>` names the current session, `/resume` lists
|
|
30
|
+
saved sessions and resumes the one you pick (by number, name, id or title), `/resume all` shows
|
|
31
|
+
every folder, and `lcode --resume [SESSION]` does the same from the shell. Resuming shows a short
|
|
32
|
+
recap of where you left off.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- `lcode setup` recommends `gpt-oss-20b` at 64K (instead of `qwen3.5-4b`) for 8 GB GPUs with 16 GB of
|
|
37
|
+
RAM, and prefers `qwen3.5-9b` over `gpt-oss-20b` where both fit.
|
|
38
|
+
- lcode is on PyPI as `lcode-cli`; the installer now installs the latest release from PyPI instead of
|
|
39
|
+
the `main` branch.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- `qwen3.6-35b` could crash Ollama with "CUDA error: an illegal memory access" on 12 GB GPUs: its
|
|
44
|
+
prompt batch of 1024 left too little VRAM for the model's speculative-decoding context. The default
|
|
45
|
+
is now Ollama's 512 (1024 remains available with `lcode config set num_batch 1024`), and when the GPU
|
|
46
|
+
runs out of memory before answering, lcode retries automatically with a batch of 512.
|
|
47
|
+
- A tool call with invalid JSON arguments no longer aborts the request: lcode tells the model what
|
|
48
|
+
was wrong and lets it try again. Unknown or missing tool arguments are reported with the list of
|
|
49
|
+
valid arguments.
|
|
50
|
+
- `lcode -c` continues the most recently *used* session in the folder, not the most recently created
|
|
51
|
+
one. Empty sessions are no longer saved.
|
|
52
|
+
- `/rename` saves the session right away, so a session named before its first request shows up in
|
|
53
|
+
`/resume`.
|
|
54
|
+
- Typing `exit` or `quit` (without a slash) quits instead of being sent to the model as a request.
|
|
55
|
+
- Compacted sessions keep their original title instead of showing the summary header.
|
|
56
|
+
|
|
57
|
+
## [0.1.1] - 2026-09-28
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
|
|
61
|
+
- `qwen3.5-9b` and `qwen3.5-4b` are now tested end to end, with measured speed and memory on a 12 GB
|
|
62
|
+
GPU in the docs. `lcode setup` now recommends only tested models on common machines.
|
|
63
|
+
- Social preview image for the repository and link previews for the docs site.
|
|
64
|
+
- Release workflow that publishes to PyPI with Trusted Publishing.
|
|
65
|
+
|
|
66
|
+
### Changed
|
|
67
|
+
|
|
68
|
+
- Memory estimates use ~1 GB of runtime overhead instead of 1.5 GB, matching measurements, so small
|
|
69
|
+
models get larger context windows (e.g. `qwen3.5-9b` at 128K on a 12 GB GPU).
|
|
70
|
+
|
|
71
|
+
### Fixed
|
|
72
|
+
|
|
73
|
+
- `lcode --model X` no longer reuses the context window saved for the default model; it picks the
|
|
74
|
+
largest window that fits X. `/model` does the same inside a session.
|
|
75
|
+
- `lcode models` fits in 80-column terminals.
|
|
76
|
+
|
|
77
|
+
## [0.1.0] - 2026-09-28
|
|
78
|
+
|
|
79
|
+
First public release.
|
|
80
|
+
|
|
81
|
+
### Added
|
|
82
|
+
|
|
83
|
+
- Interactive terminal agent with streaming markdown output, reasoning display, `@file` attachments,
|
|
84
|
+
slash commands, a status bar and resumable sessions (`lcode -c`).
|
|
85
|
+
- One-shot mode for scripts: `lcode -p "..."`.
|
|
86
|
+
- Tools for the model: `read_file`, `write_file`, `edit_file` (with diff previews and a
|
|
87
|
+
whitespace-tolerant fallback), `list_dir`, `glob`, `grep` (ripgrep with a pure-Python fallback),
|
|
88
|
+
`bash` (live output, timeouts, persistent working directory) and `todo_write`.
|
|
89
|
+
- Permission modes `ask`, `auto-edit` and `yolo` (Shift+Tab cycles), with a read-only command
|
|
90
|
+
allowlist and "always allow" per command.
|
|
91
|
+
- Model catalog with eight open-weight models, hardware detection for Linux + NVIDIA and Apple
|
|
92
|
+
Silicon Macs, and memory-fit estimates that pick the largest context window that fits.
|
|
93
|
+
- `lcode setup` (recommend, download and configure a model), `lcode models`, `lcode doctor` and
|
|
94
|
+
`lcode config`.
|
|
95
|
+
- Choice of context window per run (`--context 128k`), per session (`/ctx`) or in the config file.
|
|
96
|
+
- Text-only model variants that drop unused vision projectors to free GPU memory.
|
|
97
|
+
- Automatic conversation compaction when the context window is 85% full, plus `/compact`.
|
|
98
|
+
- `AGENTS.md` project instructions and `/init` to generate them.
|
|
99
|
+
- One-line installer for Linux and macOS.
|
|
100
|
+
|
|
101
|
+
[Unreleased]: https://github.com/nasser1941/lcode/compare/v0.2.0...HEAD
|
|
102
|
+
[0.2.0]: https://github.com/nasser1941/lcode/compare/v0.1.2...v0.2.0
|
|
103
|
+
[0.1.2]: https://github.com/nasser1941/lcode/compare/v0.1.1...v0.1.2
|
|
104
|
+
[0.1.1]: https://github.com/nasser1941/lcode/compare/v0.1.0...v0.1.1
|
|
105
|
+
[0.1.0]: https://github.com/nasser1941/lcode/releases/tag/v0.1.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: lcode-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: A local-first terminal coding agent powered by open-weight models on your own GPU or Mac, via Ollama.
|
|
5
5
|
Project-URL: Homepage, https://nasser1941.github.io/lcode/
|
|
6
6
|
Project-URL: Documentation, https://nasser1941.github.io/lcode/
|
|
@@ -39,12 +39,13 @@ Description-Content-Type: text/markdown
|
|
|
39
39
|
|
|
40
40
|
<p align="center">
|
|
41
41
|
<b>A coding agent that runs entirely on your own machine.</b><br>
|
|
42
|
-
Open-weight models · up to 256K tokens of context · your NVIDIA GPU or Apple Silicon Mac ·
|
|
42
|
+
Open-weight models · up to 256K tokens of context · your NVIDIA GPU or Apple Silicon Mac · your code stays local
|
|
43
43
|
</p>
|
|
44
44
|
|
|
45
45
|
<p align="center">
|
|
46
46
|
<a href="https://github.com/nasser1941/lcode/actions/workflows/ci.yml"><img src="https://github.com/nasser1941/lcode/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
47
47
|
<a href="https://nasser1941.github.io/lcode/"><img src="https://github.com/nasser1941/lcode/actions/workflows/docs.yml/badge.svg" alt="Docs"></a>
|
|
48
|
+
<a href="https://pypi.org/project/lcode-cli/"><img src="https://img.shields.io/pypi/v/lcode-cli.svg" alt="PyPI"></a>
|
|
48
49
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License"></a>
|
|
49
50
|
<img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="Python 3.10+">
|
|
50
51
|
<img src="https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20(Apple%20Silicon)-lightgrey.svg" alt="Linux and macOS">
|
|
@@ -64,7 +65,7 @@ Description-Content-Type: text/markdown
|
|
|
64
65
|
Point lcode at a repository and talk to it in your terminal. It explores the code, answers
|
|
65
66
|
questions with `file:line` references, writes and edits files, runs your scripts and tests, and
|
|
66
67
|
keeps going until the task is done, asking before it changes anything. The model runs locally
|
|
67
|
-
through [Ollama](https://ollama.com),
|
|
68
|
+
through [Ollama](https://ollama.com), and when it needs current information it can search the web.
|
|
68
69
|
|
|
69
70
|
## Features
|
|
70
71
|
|
|
@@ -75,8 +76,12 @@ through [Ollama](https://ollama.com), so your code never leaves your machine.
|
|
|
75
76
|
largest context that fits: `lcode setup` does it in one step.
|
|
76
77
|
- **Safe by default.** Every edit is shown as a diff and every command that isn't read-only needs
|
|
77
78
|
your approval. `auto-edit` and `yolo` modes when you want speed.
|
|
78
|
-
- **Bring your own model.** Eight curated open-weight models, or any Ollama model
|
|
79
|
-
|
|
79
|
+
- **Bring your own model.** Eight curated open-weight models, all tested end to end, or any Ollama model
|
|
80
|
+
with tool calling.
|
|
81
|
+
- **Web search when needed.** Looks up the latest versions, docs and error messages with Ollama web
|
|
82
|
+
search, Brave, Tavily or your own SearXNG, and reads pages as clean text.
|
|
83
|
+
- **Private.** The model runs on your machine, lcode never uploads your files and has no telemetry.
|
|
84
|
+
Web access is on by default and can be set to `ask` or `off`.
|
|
80
85
|
|
|
81
86
|
## Install
|
|
82
87
|
|
|
@@ -88,14 +93,16 @@ curl -fsSL https://nasser1941.github.io/lcode/install.sh | bash
|
|
|
88
93
|
|
|
89
94
|
The installer sets up lcode with its own Python via [uv](https://docs.astral.sh/uv/), checks for
|
|
90
95
|
[Ollama](https://ollama.com) (0.30+) and runs `lcode setup`, which picks a model for your hardware
|
|
91
|
-
and downloads it. Prefer manual steps?
|
|
92
|
-
|
|
96
|
+
and downloads it. Prefer manual steps? lcode is on [PyPI](https://pypi.org/project/lcode-cli/) as
|
|
97
|
+
`lcode-cli`:
|
|
93
98
|
|
|
94
99
|
```bash
|
|
95
|
-
uv tool install
|
|
100
|
+
uv tool install lcode-cli # or: pipx install lcode-cli
|
|
96
101
|
lcode setup
|
|
97
102
|
```
|
|
98
103
|
|
|
104
|
+
See the [installation guide](https://nasser1941.github.io/lcode/installation/) for details.
|
|
105
|
+
|
|
99
106
|
## Quickstart
|
|
100
107
|
|
|
101
108
|
```bash
|
|
@@ -113,9 +120,10 @@ lcode
|
|
|
113
120
|
| | |
|
|
114
121
|
|---|---|
|
|
115
122
|
| `lcode -p "…"` | one request, no interaction (scripts, hooks) |
|
|
116
|
-
| `lcode -c` | continue the last session
|
|
123
|
+
| `lcode -c` / `lcode --resume` | continue the last session here / pick a saved session from a list |
|
|
117
124
|
| `lcode --model qwen3.5-9b --context 128k` | pick a model and context window for this session |
|
|
118
125
|
| `lcode models` / `lcode doctor` | what fits this machine / check the installation |
|
|
126
|
+
| `/rename`, `/resume` | name the current session, resume a saved one |
|
|
119
127
|
| `/model`, `/ctx 128k`, `/compact`, `/help` | switch model, resize context, summarize, list commands |
|
|
120
128
|
|
|
121
129
|
## Models
|
|
@@ -123,12 +131,12 @@ lcode
|
|
|
123
131
|
| Key | Model | Download | Max context | |
|
|
124
132
|
|---|---|---|---|---|
|
|
125
133
|
| `qwen3.6-35b` | Qwen3.6 35B-A3B Coding (MoE, 3B active) | 22.6 GB | 256K | **default**, tested |
|
|
126
|
-
| `qwen3.8-27b` | Qwen3.8 27B (dense) | 17.7 GB | 256K | |
|
|
127
|
-
| `qwen3.6-27b` | Qwen3.6 27B Coding (dense) | 17.8 GB | 256K | |
|
|
128
|
-
| `laguna-xs-2.1` | Poolside Laguna XS 2.1 (MoE, 3B active) | 20.3 GB | 256K | |
|
|
129
|
-
| `nemotron-3.5-lightning` | NVIDIA Nemotron 3.5 Lightning (hybrid MoE) | 25.4 GB | 1M | |
|
|
130
|
-
| `gpt-oss-20b` | OpenAI gpt-oss 20B (MoE) | 13.8 GB | 128K | |
|
|
134
|
+
| `qwen3.8-27b` | Qwen3.8 27B (dense) | 17.7 GB | 256K | tested |
|
|
135
|
+
| `qwen3.6-27b` | Qwen3.6 27B Coding (dense) | 17.8 GB | 256K | tested |
|
|
136
|
+
| `laguna-xs-2.1` | Poolside Laguna XS 2.1 (MoE, 3B active) | 20.3 GB | 256K | tested |
|
|
137
|
+
| `nemotron-3.5-lightning` | NVIDIA Nemotron 3.5 Lightning (hybrid MoE) | 25.4 GB | 1M | tested |
|
|
131
138
|
| `qwen3.5-9b` | Qwen3.5 9B (dense) | 6.6 GB | 256K | tested |
|
|
139
|
+
| `gpt-oss-20b` | OpenAI gpt-oss 20B (MoE) | 13.8 GB | 128K | tested |
|
|
132
140
|
| `qwen3.5-4b` | Qwen3.5 4B (dense) | 3.4 GB | 256K | tested |
|
|
133
141
|
|
|
134
142
|
What `lcode setup` picks for common machines:
|
|
@@ -140,7 +148,7 @@ What `lcode setup` picks for common machines:
|
|
|
140
148
|
| Mac with M4 Pro / M4 Max, 36 GB | qwen3.6-35b | 64K |
|
|
141
149
|
| Mac with M4 Pro, 48 GB · M4 Max, 64 GB+ | qwen3.6-35b | 256K |
|
|
142
150
|
| NVIDIA 8–24 GB + 32 GB RAM | qwen3.6-35b | 256K |
|
|
143
|
-
| NVIDIA 8 GB + 16 GB RAM |
|
|
151
|
+
| NVIDIA 8 GB + 16 GB RAM | gpt-oss-20b | 64K |
|
|
144
152
|
|
|
145
153
|
On an RTX 4080 Laptop GPU (12 GB) the default model generates 50–60 tokens/s at 256K context, and
|
|
146
154
|
qwen3.5-9b 64 tokens/s at 128K. See
|
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<b>A coding agent that runs entirely on your own machine.</b><br>
|
|
9
|
-
Open-weight models · up to 256K tokens of context · your NVIDIA GPU or Apple Silicon Mac ·
|
|
9
|
+
Open-weight models · up to 256K tokens of context · your NVIDIA GPU or Apple Silicon Mac · your code stays local
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
13
|
<a href="https://github.com/nasser1941/lcode/actions/workflows/ci.yml"><img src="https://github.com/nasser1941/lcode/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
14
14
|
<a href="https://nasser1941.github.io/lcode/"><img src="https://github.com/nasser1941/lcode/actions/workflows/docs.yml/badge.svg" alt="Docs"></a>
|
|
15
|
+
<a href="https://pypi.org/project/lcode-cli/"><img src="https://img.shields.io/pypi/v/lcode-cli.svg" alt="PyPI"></a>
|
|
15
16
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License"></a>
|
|
16
17
|
<img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="Python 3.10+">
|
|
17
18
|
<img src="https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20(Apple%20Silicon)-lightgrey.svg" alt="Linux and macOS">
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
Point lcode at a repository and talk to it in your terminal. It explores the code, answers
|
|
32
33
|
questions with `file:line` references, writes and edits files, runs your scripts and tests, and
|
|
33
34
|
keeps going until the task is done, asking before it changes anything. The model runs locally
|
|
34
|
-
through [Ollama](https://ollama.com),
|
|
35
|
+
through [Ollama](https://ollama.com), and when it needs current information it can search the web.
|
|
35
36
|
|
|
36
37
|
## Features
|
|
37
38
|
|
|
@@ -42,8 +43,12 @@ through [Ollama](https://ollama.com), so your code never leaves your machine.
|
|
|
42
43
|
largest context that fits: `lcode setup` does it in one step.
|
|
43
44
|
- **Safe by default.** Every edit is shown as a diff and every command that isn't read-only needs
|
|
44
45
|
your approval. `auto-edit` and `yolo` modes when you want speed.
|
|
45
|
-
- **Bring your own model.** Eight curated open-weight models, or any Ollama model
|
|
46
|
-
|
|
46
|
+
- **Bring your own model.** Eight curated open-weight models, all tested end to end, or any Ollama model
|
|
47
|
+
with tool calling.
|
|
48
|
+
- **Web search when needed.** Looks up the latest versions, docs and error messages with Ollama web
|
|
49
|
+
search, Brave, Tavily or your own SearXNG, and reads pages as clean text.
|
|
50
|
+
- **Private.** The model runs on your machine, lcode never uploads your files and has no telemetry.
|
|
51
|
+
Web access is on by default and can be set to `ask` or `off`.
|
|
47
52
|
|
|
48
53
|
## Install
|
|
49
54
|
|
|
@@ -55,14 +60,16 @@ curl -fsSL https://nasser1941.github.io/lcode/install.sh | bash
|
|
|
55
60
|
|
|
56
61
|
The installer sets up lcode with its own Python via [uv](https://docs.astral.sh/uv/), checks for
|
|
57
62
|
[Ollama](https://ollama.com) (0.30+) and runs `lcode setup`, which picks a model for your hardware
|
|
58
|
-
and downloads it. Prefer manual steps?
|
|
59
|
-
|
|
63
|
+
and downloads it. Prefer manual steps? lcode is on [PyPI](https://pypi.org/project/lcode-cli/) as
|
|
64
|
+
`lcode-cli`:
|
|
60
65
|
|
|
61
66
|
```bash
|
|
62
|
-
uv tool install
|
|
67
|
+
uv tool install lcode-cli # or: pipx install lcode-cli
|
|
63
68
|
lcode setup
|
|
64
69
|
```
|
|
65
70
|
|
|
71
|
+
See the [installation guide](https://nasser1941.github.io/lcode/installation/) for details.
|
|
72
|
+
|
|
66
73
|
## Quickstart
|
|
67
74
|
|
|
68
75
|
```bash
|
|
@@ -80,9 +87,10 @@ lcode
|
|
|
80
87
|
| | |
|
|
81
88
|
|---|---|
|
|
82
89
|
| `lcode -p "…"` | one request, no interaction (scripts, hooks) |
|
|
83
|
-
| `lcode -c` | continue the last session
|
|
90
|
+
| `lcode -c` / `lcode --resume` | continue the last session here / pick a saved session from a list |
|
|
84
91
|
| `lcode --model qwen3.5-9b --context 128k` | pick a model and context window for this session |
|
|
85
92
|
| `lcode models` / `lcode doctor` | what fits this machine / check the installation |
|
|
93
|
+
| `/rename`, `/resume` | name the current session, resume a saved one |
|
|
86
94
|
| `/model`, `/ctx 128k`, `/compact`, `/help` | switch model, resize context, summarize, list commands |
|
|
87
95
|
|
|
88
96
|
## Models
|
|
@@ -90,12 +98,12 @@ lcode
|
|
|
90
98
|
| Key | Model | Download | Max context | |
|
|
91
99
|
|---|---|---|---|---|
|
|
92
100
|
| `qwen3.6-35b` | Qwen3.6 35B-A3B Coding (MoE, 3B active) | 22.6 GB | 256K | **default**, tested |
|
|
93
|
-
| `qwen3.8-27b` | Qwen3.8 27B (dense) | 17.7 GB | 256K | |
|
|
94
|
-
| `qwen3.6-27b` | Qwen3.6 27B Coding (dense) | 17.8 GB | 256K | |
|
|
95
|
-
| `laguna-xs-2.1` | Poolside Laguna XS 2.1 (MoE, 3B active) | 20.3 GB | 256K | |
|
|
96
|
-
| `nemotron-3.5-lightning` | NVIDIA Nemotron 3.5 Lightning (hybrid MoE) | 25.4 GB | 1M | |
|
|
97
|
-
| `gpt-oss-20b` | OpenAI gpt-oss 20B (MoE) | 13.8 GB | 128K | |
|
|
101
|
+
| `qwen3.8-27b` | Qwen3.8 27B (dense) | 17.7 GB | 256K | tested |
|
|
102
|
+
| `qwen3.6-27b` | Qwen3.6 27B Coding (dense) | 17.8 GB | 256K | tested |
|
|
103
|
+
| `laguna-xs-2.1` | Poolside Laguna XS 2.1 (MoE, 3B active) | 20.3 GB | 256K | tested |
|
|
104
|
+
| `nemotron-3.5-lightning` | NVIDIA Nemotron 3.5 Lightning (hybrid MoE) | 25.4 GB | 1M | tested |
|
|
98
105
|
| `qwen3.5-9b` | Qwen3.5 9B (dense) | 6.6 GB | 256K | tested |
|
|
106
|
+
| `gpt-oss-20b` | OpenAI gpt-oss 20B (MoE) | 13.8 GB | 128K | tested |
|
|
99
107
|
| `qwen3.5-4b` | Qwen3.5 4B (dense) | 3.4 GB | 256K | tested |
|
|
100
108
|
|
|
101
109
|
What `lcode setup` picks for common machines:
|
|
@@ -107,7 +115,7 @@ What `lcode setup` picks for common machines:
|
|
|
107
115
|
| Mac with M4 Pro / M4 Max, 36 GB | qwen3.6-35b | 64K |
|
|
108
116
|
| Mac with M4 Pro, 48 GB · M4 Max, 64 GB+ | qwen3.6-35b | 256K |
|
|
109
117
|
| NVIDIA 8–24 GB + 32 GB RAM | qwen3.6-35b | 256K |
|
|
110
|
-
| NVIDIA 8 GB + 16 GB RAM |
|
|
118
|
+
| NVIDIA 8 GB + 16 GB RAM | gpt-oss-20b | 64K |
|
|
111
119
|
|
|
112
120
|
On an RTX 4080 Laptop GPU (12 GB) the default model generates 50–60 tokens/s at 256K context, and
|
|
113
121
|
qwen3.5-9b 64 tokens/s at 128K. See
|
|
@@ -27,10 +27,15 @@ user, in your working directory**. It is not a sandbox. Keep in mind:
|
|
|
27
27
|
allowlist (`ls`, `cat`, `grep`, `git status`, …) is shown to you and needs your approval.
|
|
28
28
|
`auto-edit` skips approval for edits; `yolo` skips all approval — use it only in disposable
|
|
29
29
|
environments (a container, a VM, a throwaway clone).
|
|
30
|
-
- Content the model reads (files, command output,
|
|
31
|
-
injections that try to make it run harmful commands.
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
- Content the model reads (files, command output, search results and web pages) can contain prompt
|
|
31
|
+
injections that try to make it run harmful commands. lcode marks web content as untrusted, but
|
|
32
|
+
review commands before approving them.
|
|
33
|
+
- The model runs on the Ollama server you configure (default `http://localhost:11434`); if you point
|
|
34
|
+
`ollama_host` at a remote server, your prompts and code go to that server. lcode sends no telemetry.
|
|
35
|
+
- With web access on (the default), search queries go to the configured search provider and fetched
|
|
36
|
+
pages are downloaded from their websites. The model writes the queries, so they can contain names or
|
|
37
|
+
snippets from your code. Use `web = ask` to approve each search, or `web = off` / `--no-web` to
|
|
38
|
+
keep everything local.
|
|
34
39
|
- Sessions (including file contents the model read) are stored in `~/.local/state/lcode/sessions`.
|
|
35
40
|
|
|
36
41
|
Reports about bypassing the permission prompts, the read-only allowlist, or data leaving the
|
|
@@ -17,11 +17,14 @@ lcode config path # print the file location
|
|
|
17
17
|
|---|---|---|
|
|
18
18
|
| `model` | `qwen3.6-35b` | Catalog key (see `lcode models`) or any installed Ollama model tag |
|
|
19
19
|
| `context` | largest that fits | Context window in tokens; accepts `128k`, `1m` |
|
|
20
|
-
| `num_batch` |
|
|
20
|
+
| `num_batch` | 512 | Prompt batch size. Larger reads prompts faster but needs more GPU memory |
|
|
21
21
|
| `keep_alive` | `30m` | How long Ollama keeps the model in memory after the last request |
|
|
22
22
|
| `ollama_host` | `http://localhost:11434` | Ollama server URL |
|
|
23
23
|
| `permission_mode` | `ask` | `ask`, `auto-edit` or `yolo` |
|
|
24
24
|
| `think` | `true` | Let the model reason before answering |
|
|
25
|
+
| `web` | `on` | Web search and page fetching: `on`, `ask` (before each search/website) or `off` |
|
|
26
|
+
| `search_backend` | `auto` | `auto`, `ollama`, `brave`, `tavily` or `searxng`; `auto` uses the first one configured |
|
|
27
|
+
| `searxng_url` | | Your SearXNG instance, e.g. `http://localhost:8888` |
|
|
25
28
|
|
|
26
29
|
Example file:
|
|
27
30
|
|
|
@@ -44,6 +47,8 @@ Environment variables override the file, which is useful for one-off runs and CI
|
|
|
44
47
|
| `LCODE_NUM_BATCH` | `num_batch` |
|
|
45
48
|
| `LCODE_KEEP_ALIVE` | `keep_alive` |
|
|
46
49
|
| `OLLAMA_HOST` | `ollama_host` (same variable the Ollama CLI uses) |
|
|
50
|
+
| `LCODE_WEB` | `web` |
|
|
51
|
+
| `OLLAMA_API_KEY`, `BRAVE_API_KEY`, `TAVILY_API_KEY` | API key for that [search provider](usage.md#web-search) (never stored in the config file) |
|
|
47
52
|
| `LCODE_HOME` | where sessions and prompt history are stored |
|
|
48
53
|
|
|
49
54
|
## Files lcode creates
|
|
@@ -53,14 +58,17 @@ Environment variables override the file, which is useful for one-off runs and CI
|
|
|
53
58
|
| `~/.config/lcode/config.toml` | Settings |
|
|
54
59
|
| `~/.local/state/lcode/sessions/` | Saved conversations (for `lcode -c`) |
|
|
55
60
|
| `~/.local/state/lcode/history` | Prompt history (++up++ in the prompt) |
|
|
61
|
+
| `~/.local/state/lcode/limits.json` | Context sizes that ran out of GPU memory on this machine (safe to delete) |
|
|
56
62
|
|
|
57
63
|
Sessions contain everything the model read, including file contents. Delete the folder to clear them.
|
|
58
64
|
|
|
59
65
|
## Tuning for speed and memory
|
|
60
66
|
|
|
61
|
-
- **Out-of-memory errors:** lower the context (`/ctx 128k`)
|
|
62
|
-
|
|
63
|
-
- **Slow first answers on big files:** a larger
|
|
64
|
-
|
|
67
|
+
- **Out-of-memory errors:** lower the context (`/ctx 128k`), close other programs using the GPU, or
|
|
68
|
+
pick a smaller model (`/models`).
|
|
69
|
+
- **Slow first answers on big files:** a larger prompt batch reads prompts faster if your GPU has
|
|
70
|
+
room: `lcode config set num_batch 1024` makes `qwen3.6-35b` read prompts ~1.8x faster (~500 instead
|
|
71
|
+
of ~280 tokens/s on a 12 GB GPU). On a 12 GB GPU at 256K context it only fits when little else uses
|
|
72
|
+
VRAM; if the GPU runs out of memory before answering, lcode retries automatically with 512.
|
|
65
73
|
- **Faster answers, less accuracy:** `--no-think` or `/think off`.
|
|
66
74
|
- **Keep the model warm:** `keep_alive = "2h"` avoids reload delays between sessions but holds the memory.
|
|
@@ -52,15 +52,19 @@ Two lessons from tuning the default model on a 12 GB GPU shaped the defaults:
|
|
|
52
52
|
out-of-memory crashes at large batch sizes. lcode creates text-only variants (`lcode-<key>`) that
|
|
53
53
|
reuse the downloaded weights.
|
|
54
54
|
- **Prompt batch size dominates prompt-reading speed** when experts sit in system RAM: 512 → 280
|
|
55
|
-
tokens/s, 1024 → 500 tokens/s.
|
|
55
|
+
tokens/s, 1024 → 500 tokens/s. But the model's speculative-decoding context grows with the batch
|
|
56
|
+
(0.8 GB at 512, 1.1 GB at 1024), and at 1024 it only fits next to a 256K cache on 12 GB when little
|
|
57
|
+
else uses VRAM; otherwise CUDA fails with "illegal memory access". lcode therefore uses Ollama's
|
|
58
|
+
default of 512 and, if a larger configured batch runs out of memory, retries with 512.
|
|
56
59
|
|
|
57
60
|
## Security model
|
|
58
61
|
|
|
59
62
|
lcode runs with your user's permissions and is not a sandbox. The permission prompts, the read-only
|
|
60
63
|
allowlist and the "read before edit" rule are guardrails against mistakes, not against a determined
|
|
61
64
|
attacker. Files and command output can contain prompt injections, so review commands before
|
|
62
|
-
approving them, and keep `yolo` mode for disposable environments. lcode sends no telemetry
|
|
63
|
-
|
|
65
|
+
approving them, and keep `yolo` mode for disposable environments. lcode sends no telemetry; besides
|
|
66
|
+
the Ollama server you configure, it only contacts the web when the model searches or fetches a page
|
|
67
|
+
(see [Web search](usage.md#web-search)). See the [security policy](https://github.com/nasser1941/lcode/blob/main/SECURITY.md).
|
|
64
68
|
|
|
65
69
|
## Code map
|
|
66
70
|
|
|
@@ -12,7 +12,7 @@ hide:
|
|
|
12
12
|
# lcode
|
|
13
13
|
|
|
14
14
|
**A coding agent that runs entirely on your own machine.**
|
|
15
|
-
Open-weight models · up to 256K tokens of context · your NVIDIA GPU or Apple Silicon Mac ·
|
|
15
|
+
Open-weight models · up to 256K tokens of context · your NVIDIA GPU or Apple Silicon Mac · your code stays local.
|
|
16
16
|
|
|
17
17
|
[Get started](installation.md){ .md-button .md-button--primary }
|
|
18
18
|
[View on GitHub](https://github.com/nasser1941/lcode){ .md-button }
|
|
@@ -37,8 +37,9 @@ until the task is done, asking before it changes anything.
|
|
|
37
37
|
|
|
38
38
|
---
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
The model runs locally through [Ollama](https://ollama.com), lcode never uploads your files and
|
|
41
|
+
sends no telemetry. Web search is there when the model needs current information, and can be
|
|
42
|
+
turned off.
|
|
42
43
|
|
|
43
44
|
- :material-robot-outline:{ .lg .middle } **A real agent, not autocomplete**
|
|
44
45
|
|
|
@@ -52,21 +52,29 @@ curl -fsSL https://nasser1941.github.io/lcode/install.sh | bash
|
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
The [installer](https://github.com/nasser1941/lcode/blob/main/install.sh) installs
|
|
55
|
-
[uv](https://docs.astral.sh/uv/) if needed, installs
|
|
56
|
-
|
|
55
|
+
[uv](https://docs.astral.sh/uv/) if needed, installs the latest release of lcode from
|
|
56
|
+
[PyPI](https://pypi.org/project/lcode-cli/) with its own Python into `~/.local/bin`, checks that
|
|
57
|
+
Ollama is running, and starts `lcode setup`.
|
|
57
58
|
|
|
58
59
|
??? note "Prefer to do it by hand?"
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
lcode is published on PyPI as `lcode-cli` (the command is `lcode`). With
|
|
62
|
+
[uv](https://docs.astral.sh/uv/getting-started/installation/):
|
|
61
63
|
|
|
62
64
|
```bash
|
|
63
|
-
uv tool install
|
|
65
|
+
uv tool install lcode-cli
|
|
64
66
|
```
|
|
65
67
|
|
|
66
68
|
Or with [pipx](https://pipx.pypa.io):
|
|
67
69
|
|
|
68
70
|
```bash
|
|
69
|
-
pipx install
|
|
71
|
+
pipx install lcode-cli
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
To try the latest unreleased changes from `main`:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
uv tool install git+https://github.com/nasser1941/lcode
|
|
70
78
|
```
|
|
71
79
|
|
|
72
80
|
lcode needs Python 3.10 or newer. The macOS system Python is too old, which is why uv (it
|
|
@@ -138,7 +146,7 @@ steps. NVIDIA GPUs work inside WSL2 with the regular Windows driver.
|
|
|
138
146
|
## Upgrade and uninstall
|
|
139
147
|
|
|
140
148
|
```bash
|
|
141
|
-
uv tool upgrade lcode-cli # upgrade
|
|
149
|
+
uv tool upgrade lcode-cli # upgrade (pipx: pipx upgrade lcode-cli)
|
|
142
150
|
uv tool uninstall lcode-cli # remove lcode
|
|
143
151
|
rm -rf ~/.config/lcode ~/.local/state/lcode # remove settings and saved sessions
|
|
144
152
|
ollama rm lcode-qwen3.6-35b qwen3.6:35b-a3b-coding # remove downloaded models
|
|
@@ -8,17 +8,17 @@ size, and it works with any other Ollama model that supports tool calling.
|
|
|
8
8
|
| Key | Model | Type | Download | Max context | Status |
|
|
9
9
|
|---|---|---|---|---|---|
|
|
10
10
|
| `qwen3.6-35b` | Qwen3.6 35B-A3B Coding | MoE, 3B active | 22.6 GB | 256K | **default**, tested |
|
|
11
|
-
| `qwen3.8-27b` | Qwen3.8 27B | dense | 17.7 GB | 256K |
|
|
12
|
-
| `qwen3.6-27b` | Qwen3.6 27B Coding | dense | 17.8 GB | 256K |
|
|
13
|
-
| `laguna-xs-2.1` | Poolside Laguna XS 2.1 | MoE, 3B active | 20.3 GB | 256K |
|
|
14
|
-
| `nemotron-3.5-lightning` | NVIDIA Nemotron 3.5 Lightning | hybrid MoE, 3B active | 25.4 GB | 1M |
|
|
15
|
-
| `gpt-oss-20b` | OpenAI gpt-oss 20B | MoE, 3.6B active | 13.8 GB | 128K | untested |
|
|
11
|
+
| `qwen3.8-27b` | Qwen3.8 27B | dense | 17.7 GB | 256K | tested |
|
|
12
|
+
| `qwen3.6-27b` | Qwen3.6 27B Coding | dense | 17.8 GB | 256K | tested |
|
|
13
|
+
| `laguna-xs-2.1` | Poolside Laguna XS 2.1 | MoE, 3B active | 20.3 GB | 256K | tested |
|
|
14
|
+
| `nemotron-3.5-lightning` | NVIDIA Nemotron 3.5 Lightning | hybrid MoE, 3B active | 25.4 GB | 1M | tested |
|
|
16
15
|
| `qwen3.5-9b` | Qwen3.5 9B | dense | 6.6 GB | 256K | tested |
|
|
16
|
+
| `gpt-oss-20b` | OpenAI gpt-oss 20B | MoE, 3.6B active | 13.8 GB | 128K | tested |
|
|
17
17
|
| `qwen3.5-4b` | Qwen3.5 4B | dense | 3.4 GB | 256K | tested |
|
|
18
18
|
|
|
19
|
-
*Tested* means the
|
|
20
|
-
|
|
21
|
-
[report how
|
|
19
|
+
*Tested* means the model passed lcode's two acceptance tasks end to end (see
|
|
20
|
+
[test results](#test-results)). Results on other hardware are very welcome: please
|
|
21
|
+
[report how a model does](https://github.com/nasser1941/lcode/issues/new?template=model_request.yml).
|
|
22
22
|
|
|
23
23
|
Run `lcode models` to see the same list with what fits on **your** machine:
|
|
24
24
|
|
|
@@ -112,10 +112,10 @@ makes long windows affordable:
|
|
|
112
112
|
| Model | KV cache per token | 32K | 128K | 256K |
|
|
113
113
|
|---|---|---|---|---|
|
|
114
114
|
| qwen3.6-35b | 22 KiB | 23 GB | 25 GB | 28 GB (measured: 26 GB) |
|
|
115
|
-
| qwen3.8-27b / qwen3.6-27b | 68 KiB | 20 GB | 26 GB | 35 GB |
|
|
116
|
-
| laguna-xs-2.1 |
|
|
117
|
-
| nemotron-3.5-lightning | 7 KiB | 25 GB | 26 GB | 26 GB (1M: 32 GB) |
|
|
118
|
-
| gpt-oss-20b | 24 KiB | 15 GB | 17 GB | — |
|
|
115
|
+
| qwen3.8-27b / qwen3.6-27b | 68 KiB | 20 GB | 26 GB (measured: 24 GB) | 35 GB |
|
|
116
|
+
| laguna-xs-2.1 | 40 KiB | 21 GB | 25 GB | 30 GB (measured: 23 GB) |
|
|
117
|
+
| nemotron-3.5-lightning | 7 KiB | 25 GB | 26 GB | 26 GB (measured: 26 GB; 1M: 32 GB) |
|
|
118
|
+
| gpt-oss-20b | 24 KiB | 15 GB | 17 GB (measured: 14 GB) | — |
|
|
119
119
|
| qwen3.5-9b | 32 KiB | 8 GB | 11 GB (measured: 9.8 GB) | 15 GB (measured: 16 GB) |
|
|
120
120
|
| qwen3.5-4b | 32 KiB | 5 GB | 8 GB (measured: 8.0 GB) | 12 GB |
|
|
121
121
|
|
|
@@ -140,11 +140,44 @@ results on your machine are welcome in the
|
|
|
140
140
|
| Mac with M4 Pro / M4 Max, 36 GB | ~24 GB | qwen3.6-35b | 64K | fast |
|
|
141
141
|
| Mac with M4 Pro, 48 GB | ~36 GB | qwen3.6-35b | 256K | fast |
|
|
142
142
|
| Mac with M4 Max, 64–128 GB | 48–96 GB | qwen3.6-35b | 256K | fast |
|
|
143
|
-
| NVIDIA 8 GB + 16 GB RAM | ~16 GB |
|
|
143
|
+
| NVIDIA 8 GB + 16 GB RAM | ~16 GB | gpt-oss-20b | 64K | good (experts in RAM) |
|
|
144
144
|
| NVIDIA 8–16 GB + 32 GB RAM | 32–40 GB | qwen3.6-35b | 256K | good (experts in RAM) |
|
|
145
145
|
| NVIDIA 24 GB + 64 GB RAM | ~80 GB | qwen3.6-35b | 256K | good (experts in RAM) |
|
|
146
146
|
| CPU only, 32 GB RAM | ~24 GB | qwen3.5-4b | 256K | slow |
|
|
147
147
|
|
|
148
|
+
### Test results
|
|
149
|
+
|
|
150
|
+
Every catalog model runs the same two tasks through lcode with its default settings for the machine
|
|
151
|
+
(the context lcode picks, `yolo` mode, reasoning on):
|
|
152
|
+
|
|
153
|
+
1. **Bug fix:** tests fail in a small project; the model must find the bug, fix it and re-run the tests.
|
|
154
|
+
2. **Repo question + script:** in the `requests` source, say where the `Authorization` header is
|
|
155
|
+
stripped on redirects with `file:line` citations, then write and run an `ast`-based script.
|
|
156
|
+
|
|
157
|
+
On an RTX 4080 Laptop GPU (12 GB), i9-13980HX, 32 GB RAM:
|
|
158
|
+
|
|
159
|
+
| Model | Context | Memory | On GPU | Bug fix | Repo question + script | Speed |
|
|
160
|
+
|---|---|---|---|---|---|---|
|
|
161
|
+
| qwen3.6-35b | 256K | 23.0 GB | 25% | ✓ 30 s | ✓ 45 s | 50–55 tok/s |
|
|
162
|
+
| qwen3.8-27b | 128K | 24.4 GB | 29% | ✓ 86 s | ✓ 284 s | 7–8 tok/s |
|
|
163
|
+
| qwen3.6-27b | 128K | 24.3 GB | 29% | ✓ 78 s | ✓ 267 s | 7 tok/s |
|
|
164
|
+
| laguna-xs-2.1 | 256K | 22.6 GB | 15% | ✓ 67 s | ✓ 195 s | 15–38 tok/s |
|
|
165
|
+
| nemotron-3.5-lightning | 512K² | 27.2 GB | 25% | ✓ 62 s | ✓ 127 s | 44 tok/s |
|
|
166
|
+
| qwen3.5-9b | 128K | 9.8 GB | 100% | ✓ 21 s | ✓ 37 s (2 of 3 runs)¹ | 61–64 tok/s |
|
|
167
|
+
| gpt-oss-20b | 128K | 14.3 GB | 54% | ✓ 16 s | ✓ 36 s | 43 tok/s |
|
|
168
|
+
| qwen3.5-4b | 128K | 8.0 GB | 100% | ✓ 21 s | ✓ 24 s | 93–97 tok/s |
|
|
169
|
+
|
|
170
|
+
¹ In one run the 9B saved the script in the wrong folder. `gpt-oss-20b` and `nemotron-3.5-lightning`
|
|
171
|
+
sometimes call tools with arguments that don't exist; they correct themselves from lcode's error
|
|
172
|
+
messages.
|
|
173
|
+
² At its full 1M context Nemotron's cache (7 GB) has to sit in VRAM next to the model and doesn't fit
|
|
174
|
+
on a 12 GB GPU; 512K (3.5 GB) loads fine. lcode handles this by itself: when a model doesn't fit, it
|
|
175
|
+
retries with half the context and remembers the size that worked (see
|
|
176
|
+
[Troubleshooting](troubleshooting.md#out-of-memory-or-cuda-error-an-illegal-memory-access)).
|
|
177
|
+
|
|
178
|
+
The dense 27B models are accurate but slow here because only ~30% of them fits in 12 GB of VRAM;
|
|
179
|
+
on a 24 GB GPU or a Mac with enough unified memory they run fully accelerated.
|
|
180
|
+
|
|
148
181
|
### Measured performance
|
|
149
182
|
|
|
150
183
|
On an RTX 4080 Laptop GPU (12 GB) with an i9-13980HX and 32 GB RAM, `qwen3.6-35b` at 256K context:
|
|
@@ -152,7 +185,7 @@ On an RTX 4080 Laptop GPU (12 GB) with an i9-13980HX and 32 GB RAM, `qwen3.6-35b
|
|
|
152
185
|
| | |
|
|
153
186
|
|---|---|
|
|
154
187
|
| Generation | 50–60 tokens/s on code (speculative decoding with the model's multi-token prediction) |
|
|
155
|
-
| Prompt reading | ~
|
|
188
|
+
| Prompt reading | ~280 tokens/s (~500 with `num_batch 1024`): a 60K-token chunk of code takes 2–4 minutes the first time |
|
|
156
189
|
| Follow-up turns | start in 1–2 s: Ollama reuses the cached prompt |
|
|
157
190
|
| A real task | "explain X with file:line citations, then write and run a script" in about 2 minutes |
|
|
158
191
|
|
|
@@ -180,5 +213,5 @@ Apple Silicon numbers are not measured yet; please share yours.
|
|
|
180
213
|
|
|
181
214
|
Some models (the Qwen3.6 family, for example) ship with a vision encoder that a coding agent doesn't
|
|
182
215
|
use. `lcode setup` creates a text-only variant named `lcode-<key>` that reuses the downloaded
|
|
183
|
-
weights, so it takes no extra disk space, and frees about 1 GB of GPU memory
|
|
184
|
-
|
|
216
|
+
weights, so it takes no extra disk space, and frees about 1 GB of GPU memory for the context cache
|
|
217
|
+
(and for a larger prompt batch, where it fits; see [tuning](configuration.md#tuning-for-speed-and-memory)).
|
|
@@ -12,7 +12,7 @@ lcode
|
|
|
12
12
|
|
|
13
13
|
```text
|
|
14
14
|
╭──────────────────────────────────────────────╮
|
|
15
|
-
│ lcode v0.
|
|
15
|
+
│ lcode v0.2.0 — local coding agent │
|
|
16
16
|
│ │
|
|
17
17
|
│ model lcode-qwen3.6-35b │
|
|
18
18
|
│ context 256K tokens │
|
|
@@ -86,7 +86,8 @@ Read-only commands such as `ls`, `cat`, `grep` and `git status` run without aski
|
|
|
86
86
|
|
|
87
87
|
- ++ctrl+c++ interrupts the model or a running command; you keep the conversation.
|
|
88
88
|
- `/compact` summarizes a long conversation to free context (this also happens automatically at 85%).
|
|
89
|
-
- `lcode -c`
|
|
89
|
+
- `lcode -c` continues the last session in this folder; `/rename` names a session and `/resume`
|
|
90
|
+
picks one from a list.
|
|
90
91
|
- `/help` lists everything else.
|
|
91
92
|
|
|
92
93
|
Next: [everything lcode can do](usage.md), or [choosing models and context windows](models.md).
|