lcode-cli 0.1.1__py3-none-any.whl

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.
@@ -0,0 +1,181 @@
1
+ Metadata-Version: 2.5
2
+ Name: lcode-cli
3
+ Version: 0.1.1
4
+ Summary: A local-first terminal coding agent powered by open-weight models on your own GPU or Mac, via Ollama.
5
+ Project-URL: Homepage, https://nasser1941.github.io/lcode/
6
+ Project-URL: Documentation, https://nasser1941.github.io/lcode/
7
+ Project-URL: Repository, https://github.com/nasser1941/lcode
8
+ Project-URL: Issues, https://github.com/nasser1941/lcode/issues
9
+ Project-URL: Changelog, https://github.com/nasser1941/lcode/blob/main/CHANGELOG.md
10
+ Author: Naser Derakhshan
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Keywords: agent,ai,cli,coding-agent,developer-tools,llm,local-llm,ollama,qwen
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Operating System :: MacOS
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
26
+ Classifier: Topic :: Software Development
27
+ Requires-Python: >=3.10
28
+ Requires-Dist: prompt-toolkit>=3.0.43
29
+ Requires-Dist: requests>=2.31
30
+ Requires-Dist: rich>=13.7
31
+ Requires-Dist: tomli>=2.0; python_version < '3.11'
32
+ Description-Content-Type: text/markdown
33
+
34
+ <p align="center">
35
+ <img src="docs/assets/logo.svg" width="96" alt="lcode logo">
36
+ </p>
37
+
38
+ <h1 align="center">lcode</h1>
39
+
40
+ <p align="center">
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 · no API keys, no cloud
43
+ </p>
44
+
45
+ <p align="center">
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
+ <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="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License"></a>
49
+ <img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="Python 3.10+">
50
+ <img src="https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20(Apple%20Silicon)-lightgrey.svg" alt="Linux and macOS">
51
+ </p>
52
+
53
+ <p align="center">
54
+ <a href="https://nasser1941.github.io/lcode/"><b>Documentation</b></a> ·
55
+ <a href="https://nasser1941.github.io/lcode/installation/">Install</a> ·
56
+ <a href="https://nasser1941.github.io/lcode/models/">Models</a> ·
57
+ <a href="CONTRIBUTING.md">Contributing</a>
58
+ </p>
59
+
60
+ <p align="center">
61
+ <img src="docs/assets/demo.svg" alt="lcode finding and fixing a bug, then running the tests" width="820">
62
+ </p>
63
+
64
+ Point lcode at a repository and talk to it in your terminal. It explores the code, answers
65
+ questions with `file:line` references, writes and edits files, runs your scripts and tests, and
66
+ keeps going until the task is done, asking before it changes anything. The model runs locally
67
+ through [Ollama](https://ollama.com), so your code never leaves your machine.
68
+
69
+ ## Features
70
+
71
+ - **A real agent.** Reads, searches, edits and runs commands in a loop, checks its own work, and
72
+ plans multi-step tasks with a visible todo list.
73
+ - **Long context.** 256K tokens with the default model (1M with Nemotron). You choose the window.
74
+ - **Hardware-aware.** Detects your NVIDIA GPU or Apple Silicon Mac and picks the best model and the
75
+ largest context that fits: `lcode setup` does it in one step.
76
+ - **Safe by default.** Every edit is shown as a diff and every command that isn't read-only needs
77
+ 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 with tool calling.
79
+ - **Private.** No telemetry, no accounts, no API keys.
80
+
81
+ ## Install
82
+
83
+ **Ubuntu / Linux** (NVIDIA GPU recommended) and **macOS** on Apple Silicon (M1–M4):
84
+
85
+ ```bash
86
+ curl -fsSL https://nasser1941.github.io/lcode/install.sh | bash
87
+ ```
88
+
89
+ The installer sets up lcode with its own Python via [uv](https://docs.astral.sh/uv/), checks for
90
+ [Ollama](https://ollama.com) (0.30+) and runs `lcode setup`, which picks a model for your hardware
91
+ and downloads it. Prefer manual steps? See the
92
+ [installation guide](https://nasser1941.github.io/lcode/installation/), or:
93
+
94
+ ```bash
95
+ uv tool install git+https://github.com/nasser1941/lcode
96
+ lcode setup
97
+ ```
98
+
99
+ ## Quickstart
100
+
101
+ ```bash
102
+ cd ~/code/your-project
103
+ lcode
104
+ ```
105
+
106
+ ```text
107
+ ❯ /init # study the repo and write AGENTS.md for future sessions
108
+ ❯ How does authentication work here? Cite files.
109
+ ❯ Write scripts/dedupe.py that removes duplicate rows from @data/users.csv by email, and run it
110
+ ❯ The tests in tests/test_parser.py fail. Find out why and fix it.
111
+ ```
112
+
113
+ | | |
114
+ |---|---|
115
+ | `lcode -p "…"` | one request, no interaction (scripts, hooks) |
116
+ | `lcode -c` | continue the last session in this directory |
117
+ | `lcode --model qwen3.5-9b --context 128k` | pick a model and context window for this session |
118
+ | `lcode models` / `lcode doctor` | what fits this machine / check the installation |
119
+ | `/model`, `/ctx 128k`, `/compact`, `/help` | switch model, resize context, summarize, list commands |
120
+
121
+ ## Models
122
+
123
+ | Key | Model | Download | Max context | |
124
+ |---|---|---|---|---|
125
+ | `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 | |
131
+ | `qwen3.5-9b` | Qwen3.5 9B (dense) | 6.6 GB | 256K | tested |
132
+ | `qwen3.5-4b` | Qwen3.5 4B (dense) | 3.4 GB | 256K | tested |
133
+
134
+ What `lcode setup` picks for common machines:
135
+
136
+ | Machine | Model | Context |
137
+ |---|---|---|
138
+ | Mac with M4, 16 GB | qwen3.5-9b | 64K |
139
+ | Mac with M4 / M4 Pro, 24 GB | qwen3.5-9b | 256K |
140
+ | Mac with M4 Pro / M4 Max, 36 GB | qwen3.6-35b | 64K |
141
+ | Mac with M4 Pro, 48 GB · M4 Max, 64 GB+ | qwen3.6-35b | 256K |
142
+ | NVIDIA 8–24 GB + 32 GB RAM | qwen3.6-35b | 256K |
143
+ | NVIDIA 8 GB + 16 GB RAM | qwen3.5-4b | 64K |
144
+
145
+ On an RTX 4080 Laptop GPU (12 GB) the default model generates 50–60 tokens/s at 256K context, and
146
+ qwen3.5-9b 64 tokens/s at 128K. See
147
+ [Models & context windows](https://nasser1941.github.io/lcode/models/) for memory estimates and
148
+ tuning.
149
+
150
+ ## How it works
151
+
152
+ lcode sends your request, the repository layout and a set of tool definitions to the model; runs the
153
+ tools the model calls (read, edit, grep, glob, bash, todo); feeds the results back; and repeats until
154
+ the model answers. It sizes models to your memory from each model's KV-cache footprint, uses
155
+ text-only model variants to free GPU memory, and summarizes the conversation when the context window
156
+ fills up. Details: [How it works](https://nasser1941.github.io/lcode/how-it-works/).
157
+
158
+ ## Roadmap
159
+
160
+ - More models in the catalog, with community test reports ([request one](https://github.com/nasser1941/lcode/issues/new?template=model_request.yml))
161
+ - Measured Apple Silicon performance numbers
162
+ - MCP (Model Context Protocol) tool servers
163
+ - Web fetch and search tools
164
+ - Packaging on PyPI and Homebrew
165
+
166
+ ## Contributing
167
+
168
+ Contributions are welcome: bug reports, model test results, docs and code. See
169
+ [CONTRIBUTING.md](CONTRIBUTING.md). Please follow the [code of conduct](CODE_OF_CONDUCT.md), and
170
+ report security issues privately as described in [SECURITY.md](SECURITY.md).
171
+
172
+ ## Acknowledgements
173
+
174
+ lcode stands on [Ollama](https://ollama.com) and [llama.cpp](https://github.com/ggml-org/llama.cpp),
175
+ the open-weight models from Qwen, Poolside, NVIDIA and OpenAI,
176
+ [Rich](https://github.com/Textualize/rich) and
177
+ [prompt_toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit).
178
+
179
+ ## License
180
+
181
+ [MIT](LICENSE) © 2026 Naser Derakhshan
@@ -0,0 +1,18 @@
1
+ lcode/__init__.py,sha256=czDagA2Y7vJ-F5wm2C4CrWmBci7DnShS1yCOE3nEjbQ,117
2
+ lcode/__main__.py,sha256=s5N5pryX2FAu93GGZ3FxUrIXHWGzxz66lKUoaV_h8Ws,35
3
+ lcode/agent.py,sha256=Tc9HYFzASMpVGYWxX_U7RWqNTZK2czaPjGBjlHs-P1I,17427
4
+ lcode/catalog.py,sha256=pZ1azX9OH2r4JE2c6E5OfwywpgS39-W2oXzoCHJhmtM,4141
5
+ lcode/cli.py,sha256=7Pfq_mnZ-tIhFfe_YpVohRwt236I1an2-4TN0sWqvfg,18789
6
+ lcode/config.py,sha256=NvsiWFyGyDpEKHwWDrW643yYLRG4Omp8Qnp_68K2a_Y,5038
7
+ lcode/hardware.py,sha256=2VbknZCxTZJwJUD8YWdQ7ryEQo_LcjtoOBOHOU9Y0fw,3085
8
+ lcode/models.toml,sha256=23KFX9z6WPQPXZEhD1SV9OxQowHY9TEp0IDwxIPbYb4,3949
9
+ lcode/ollama.py,sha256=fELwqw7xqLH9TM7XvdI1pxqYZFeIRJBv-VSz9REdvwA,6516
10
+ lcode/permissions.py,sha256=6nPOlr0ARoI_ZXfugIq4r8TUZj2wE8SSvpjp9zdC578,3890
11
+ lcode/render.py,sha256=gMvf4W3qkLUJ4Vot3az_hP_zRDAItJC9pP-68dHFkfA,1375
12
+ lcode/repl.py,sha256=BL8bQcJ6tw4uadF2bELsFwshPe5SOKZOZQob5ybUpzM,10816
13
+ lcode/tools.py,sha256=99XvUhNs1YjjqXORmiu3NI9jC0FX11eJkI1sENWtq5s,22206
14
+ lcode_cli-0.1.1.dist-info/METADATA,sha256=3X8oSBoTEydGadmN0JHrpI9-EMGzLC9Df4n52Gq94Dc,8158
15
+ lcode_cli-0.1.1.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
16
+ lcode_cli-0.1.1.dist-info/entry_points.txt,sha256=pZ_uDQ98UzVAHUQeXn5HeyQWKGSH3r3T5aPHuSB89eI,41
17
+ lcode_cli-0.1.1.dist-info/licenses/LICENSE,sha256=JWjmoL7nNIC1XUa-dZm2hwLUgjUQMFo6k8APb0idNzs,1074
18
+ lcode_cli-0.1.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.4
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ lcode = lcode.cli:main
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Naser Derakhshan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+