ucode-agent 1.67.0 → 1.67.1
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.
- package/README.md +19 -657
- package/package.json +18 -5
package/README.md
CHANGED
|
@@ -1,666 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
A coding agent that lives in your terminal. It reads your code, edits it, runs
|
|
4
|
-
your commands, and keeps every conversation on disk. It runs on Google's
|
|
5
|
-
Gemini models, free with a key.
|
|
6
|
-
|
|
7
|
-
## At a glance
|
|
8
|
-
|
|
9
|
-
| | |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| **Builds** | a whole app in about a minute, from a starter that already works, opened for you when it does |
|
|
12
|
-
| **Thinks** | a thinking level per step — cheap on easy steps, more on the plan, most when a fix has failed |
|
|
13
|
-
| **Designs** | its own tone, typefaces and accent for every app, and a check that sends the generated look back |
|
|
14
|
-
| **Checks** | types, syntax, related tests, the running server's errors, and the page itself — opened and clicked |
|
|
15
|
-
| **Fixes** | sends problems back to the model, tries a different approach when a fix fails, learns the common ones |
|
|
16
|
-
| **Edits real code** | finds the code first, smallest change in the code's own style; renames by code shape |
|
|
17
|
-
| **Undoes** | `/undo [n]` puts the whole project back, including what commands changed |
|
|
18
|
-
| **Git** | `/diff`, `/commit` with a written message, `/review` for bugs |
|
|
19
|
-
| **Extends** | MCP servers, hooks, skills, your own slash commands |
|
|
20
|
-
| **Pops up** | type `/` for a live list of commands; questions, pickers, `/help`, `/stats`, `/mcp` and the rest open over the input box, not in the chat |
|
|
21
|
-
| **Restyles** | itself and your terminal, when you ask: "make ucode orange and my terminal navy" |
|
|
22
|
-
| **Automates** | `ucode -p "task" --json` for scripts and CI; `npm run eval` runs ten real jobs |
|
|
23
|
-
| **Stays free** | Gemini's free tier, paced to its per-minute limit — or Ollama, offline |
|
|
24
|
-
|
|
25
|
-
It opens on a quiet screen — the name, the place to type, and the version in the
|
|
26
|
-
corner:
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
██╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗
|
|
30
|
-
██║ ██║██╔════╝██╔═══██╗██╔══██╗██╔════╝
|
|
31
|
-
██║ ██║██║ ██║ ██║██║ ██║█████╗
|
|
32
|
-
██║ ██║██║ ██║ ██║██║ ██║██╔══╝
|
|
33
|
-
╚██████╔╝╚██████╗╚██████╔╝██████╔╝███████╗
|
|
34
|
-
╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
38
|
-
│ Ask anything… │
|
|
39
|
-
│ │
|
|
40
|
-
│ BUILD Gemini 3.5 Flash-Lite 0% │
|
|
41
|
-
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
42
|
-
|
|
43
|
-
try build me a landing page for a coffee shop
|
|
44
|
-
explain what this project does and how it fits together
|
|
45
|
-
add a dark mode toggle that remembers the choice
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
made and tested by om dixit · v1.67.0
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
A light crosses the wordmark once as it opens, and the three lines under the box
|
|
52
|
-
are there so an empty screen has something to say. Once you are talking, each
|
|
53
|
-
message you send is marked down its left edge in the same blue as the input, so
|
|
54
|
-
your own words are easy to find in a long session — and each step the agent
|
|
55
|
-
takes carries the shape of the work: a hollow diamond to look, a filled one to
|
|
56
|
-
change, an arrow to run.
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
▌ build a notes dashboard
|
|
60
|
-
|
|
61
|
-
◇ Read 3 files
|
|
62
|
-
◆ Writing index.html +148 -0
|
|
63
|
-
▸ Running npm run dev
|
|
64
|
-
|
|
65
|
-
The dashboard is at http://localhost:3000, and `npm run dev` brings it back up.
|
|
66
|
-
|
|
67
|
-
╭──────────────────────────────────────────────────────────────────────────────────╮
|
|
68
|
-
│ now add a dark mode toggle │
|
|
69
|
-
│ │
|
|
70
|
-
│ BUILD Gemini 3.5 Flash-Lite 4% │
|
|
71
|
-
╰──────────────────────────────────────────────────────────────────────────────────╯
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
The status sits inside the input box because it describes the thing you are
|
|
75
|
-
typing into. Three facts, no more: the live mode, the answering model, and how
|
|
76
|
-
full the context window is. The percentage turns amber at 75%, which is where
|
|
77
|
-
older turns start being folded into a summary. While a turn is running the
|
|
78
|
-
middle of that row carries the spinner and the way out of it, and hands the
|
|
79
|
-
space straight back when it finishes.
|
|
80
|
-
|
|
81
|
-
## Install
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
npm i -g ucode-agent
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Then save your Google key (free at [aistudio.google.com/apikey](https://aistudio.google.com/apikey)):
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
ucode login YOUR_KEY
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
It is written to `~/.ucode/.env` as `GEMINI_API_KEY`. A `.env` in
|
|
94
|
-
the project you are working on wins over that one, and a real environment
|
|
95
|
-
variable wins over both.
|
|
96
|
-
|
|
97
|
-
Then, in any project:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
ucode
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Needs Node 22 or newer.
|
|
104
|
-
|
|
105
|
-
## The models
|
|
106
|
-
|
|
107
|
-
Served by Google (aistudio.google.com), free with a key.
|
|
108
|
-
|
|
109
|
-
| Model | For |
|
|
110
|
-
| --- | --- |
|
|
111
|
-
| **Gemini 3.5 Flash-Lite** ★ | the default — fast, reliable with tools, 500 free requests a day |
|
|
112
|
-
| Gemini 3.5 Flash | smarter, but only about 20 free requests a day |
|
|
113
|
-
| Gemini 3.1 Flash-Lite | older and lighter, 500 free requests a day |
|
|
114
|
-
|
|
115
|
-
`/model` shows them and switches. `ucode -m gemini-3.5-flash` starts on one.
|
|
116
|
-
|
|
117
|
-
When Google is overloaded and Flash-Lite stops answering, ucode carries on with
|
|
118
|
-
3.5 Flash by itself and goes back to Flash-Lite a few minutes later.
|
|
119
|
-
|
|
120
|
-
## What it does
|
|
121
|
-
|
|
122
|
-
**Twenty-one tools, and any MCP server you add.** `create_app`, `read_file`, `read_files`, `write_file`,
|
|
123
|
-
`batch_write`, `edit_file`, `multi_edit`, `edit_files`, `rename_symbol`,
|
|
124
|
-
`find_symbol`, `outline`, `type_of`, `add_block`, `list_dir`, `glob`, `grep`,
|
|
125
|
-
`run_command`, `run_commands`, `look_at_app`, `web_search`, `deploy`. Read-only
|
|
126
|
-
calls run in parallel, and start the moment the model finishes writing them —
|
|
127
|
-
while the rest of its reply is still arriving. Anything that writes runs on its
|
|
128
|
-
own, in order.
|
|
129
|
-
|
|
130
|
-
**It asks rather than guesses.** `type_of` opens a language service on the
|
|
131
|
-
TypeScript the project itself has installed and gives back the exact signature,
|
|
132
|
-
the JSDoc, and where a thing is defined — inferred types included. `find_symbol`
|
|
133
|
-
answers "where is this declared", which is the question `grep` is usually being
|
|
134
|
-
asked badly. `rename_symbol` renames by code shape, knowing where strings and
|
|
135
|
-
comments begin, because a find-and-replace that matched too much is the most
|
|
136
|
-
common broken edit.
|
|
137
|
-
|
|
138
|
-
**It checks itself as it goes.** After a change: an incremental type check that
|
|
139
|
-
answers in about a second rather than a cold minute, then the tests that reach
|
|
140
|
-
the files just changed, then anything the running dev server has complained
|
|
141
|
-
about since the last look. All three come back the way an error does, so the
|
|
142
|
-
model fixes them without being told.
|
|
143
|
-
|
|
144
|
-
**New apps are ready in seconds.** A starter installed once is kept and
|
|
145
|
-
hard-linked into the next app — the same files under another name, so it costs
|
|
146
|
-
no extra disk and skips the wait entirely.
|
|
147
|
-
|
|
148
|
-
**Apps start from a ready-made starter — and finish in the same call.**
|
|
149
|
-
`create_app` copies a starter that is already known to build, and takes the
|
|
150
|
-
app's files with it, so a one-page app is a single round trip: the starter
|
|
151
|
-
lands, the model's files are written over it, and the starter's own files come
|
|
152
|
-
back inside the result so there is nothing to read afterwards.
|
|
153
|
-
|
|
154
|
-
The default starter is `plain-html`: one page, one stylesheet, one module,
|
|
155
|
-
nothing to install and nothing to build. A tasks app, a game, a calculator or a
|
|
156
|
-
visualisation is finished before a framework would have finished installing.
|
|
157
|
-
`next-shadcn` is there for routes, a database or many screens — Next.js 16,
|
|
158
|
-
TypeScript, Tailwind 4, shadcn/ui with 25 components, light/dark, toasts and a
|
|
159
|
-
considered theme. Setting that up by hand is about four minutes
|
|
160
|
-
(`create-next-app` and the shadcn CLI measured at 116s and 130s) plus a dozen
|
|
161
|
-
round trips; the copy takes under a second, and its install runs in the
|
|
162
|
-
background while the model writes the first components.
|
|
163
|
-
|
|
164
|
-
**Built to be fast, and measured.** A traced build of a small Next.js app went
|
|
165
|
-
from 17 minutes and 116 model steps to about 6 minutes and 25 steps, by fixing
|
|
166
|
-
where the time actually went:
|
|
167
|
-
|
|
168
|
-
- Edits return the file as it now stands, so the model does not re-read it.
|
|
169
|
-
- Files written more than a few steps ago stop being re-sent in full; the
|
|
170
|
-
conversation stays small, so every step answers faster.
|
|
171
|
-
- A file-write whose JSON is malformed — a missing comma, an unescaped quote in
|
|
172
|
-
the code, raw line breaks — is repaired instead of thrown away with all its
|
|
173
|
-
output.
|
|
174
|
-
- An edit whose `old_string` is slightly off — a middle line remembered wrong,
|
|
175
|
-
escapes written out, a blank line at either end, a different indent — still
|
|
176
|
-
lands, through the fallback matchers from opencode's edit tool. Found in two
|
|
177
|
-
places is still refused, and so is a match far bigger than what was asked
|
|
178
|
-
for. `replace_all` does a rename in one call.
|
|
179
|
-
- A missing file comes back with the lookalikes beside it ("did you mean
|
|
180
|
-
App.jsx?"), and a tool named with the wrong case runs as the tool it means,
|
|
181
|
-
instead of each costing a round trip to learn a spelling.
|
|
182
|
-
- Every write is parsed on the spot, so a syntax error comes back in the same
|
|
183
|
-
step rather than a minute later from a failed build.
|
|
184
|
-
- A failed build that is missing a component or package says exactly which
|
|
185
|
-
command fixes it.
|
|
186
|
-
- The starter is the shadcn models already know (Radix), so the code they write
|
|
187
|
-
compiles the first time.
|
|
188
|
-
- A new app goes out without the tools it has nothing to point at — no symbol
|
|
189
|
-
lookup, no rename, no type query in an empty folder — and an instruction pack
|
|
190
|
-
that loads itself sends its short form, with the full one a `load_skill`
|
|
191
|
-
away. Both are re-read by the provider on every step, so what is not in the
|
|
192
|
-
request is time off every one of them.
|
|
193
|
-
- Ready-made blocks for a page with no build step as well as for React: a list you
|
|
194
|
-
can add to, tick off, rename and remove, a filter row, a localStorage store, a
|
|
195
|
-
dialog, toasts, a theme toggle. Typing is the slowest part of a build, and each
|
|
196
|
-
block is a hundred lines nobody has to type.
|
|
197
|
-
- A nested argument written the wrong way — a JSON string, a { path: contents } map
|
|
198
|
-
— is read rather than refused. Each refusal was a round trip spent being told
|
|
199
|
-
something that could simply be parsed.
|
|
200
|
-
- A tool that was not offered is refused rather than quietly run, so withholding one
|
|
201
|
-
from a new project, or from plan mode, means what it says.
|
|
202
|
-
- The closing message is cut to eight lines. A build that ends with the request
|
|
203
|
-
read back and every feature ticked off is a status report nobody asked for,
|
|
204
|
-
and it is the last thing left on screen.
|
|
205
|
-
|
|
206
|
-
`UCODE_TRACE=1` writes every model call and tool, with its duration, to
|
|
207
|
-
`~/.ucode/trace.jsonl`.
|
|
208
|
-
|
|
209
|
-
Measured on "build me a simple todo app" — same prompt, same model, two traced
|
|
210
|
-
runs: **27 model calls, 8 failed tool calls, no finished app** before this round of
|
|
211
|
-
work; **14 model calls, no failures, a working app in under two minutes** after it.
|
|
212
|
-
|
|
213
|
-
**Deploy in one line.** Say "deploy it", or type `/deploy [folder]`, and the app
|
|
214
|
-
goes live on Vercel. ucode picks a short project name that fits the app and is
|
|
215
|
-
free (`food-iq`, else `food-iq-app`…), copies the app's `.env` keys to Vercel as
|
|
216
|
-
encrypted variables, refuses code with a secret written into it (and says how to
|
|
217
|
-
move it to a server route), and gives you the link. Deploying again updates the
|
|
218
|
-
same link. Needs a token from vercel.com/account/tokens in `~/.ucode/.env` as
|
|
219
|
-
`VERCEL_TOKEN=...`.
|
|
220
|
-
|
|
221
|
-
**A look for every app.** `create_app` takes a design preset — ocean, grove,
|
|
222
|
-
sunset, graphite, violet or citrus — each a full light and dark palette with its
|
|
223
|
-
own font, so apps stop looking like the same default blue.
|
|
224
|
-
|
|
225
|
-
**Every turn can be taken back.** `/undo` puts back every file the last turn
|
|
226
|
-
changed — a rewritten file returns byte for byte, a file that did not exist
|
|
227
|
-
before is removed again. Each write keeps the original the first time that turn
|
|
228
|
-
touches it, so what comes back is the state before the turn rather than before
|
|
229
|
-
the last of six edits to the same file. An agent that writes to your disk on
|
|
230
|
-
its own should be able to take it back, whether or not the project has git.
|
|
231
|
-
|
|
232
|
-
**It notices when it is going round in circles.** The same failing edit, an edit
|
|
233
|
-
that changes nothing, or a build failing on the same errors three times gets a
|
|
234
|
-
firm, specific note; if that does not work, the turn moves to another model.
|
|
235
|
-
|
|
236
|
-
**It never dies at the daily limit.** When the free daily limit runs out mid-build,
|
|
237
|
-
ucode counts down to the reset and carries on by itself.
|
|
238
|
-
|
|
239
|
-
**You can see it working.** The status row shows the current step with a light
|
|
240
|
-
sweeping across it, the step count and the time, and each answer ends with
|
|
241
|
-
`✓ Done in 6m 12s · 25 steps`. When a dev server comes up, the app opens in your
|
|
242
|
-
browser (`UCODE_OPEN=0` turns that off).
|
|
243
|
-
|
|
244
|
-
**`/stats` and `ucode doctor`.** `/stats` shows the session's time, steps, tokens,
|
|
245
|
-
files and builds. `ucode doctor` (or `/doctor`) checks Node, npm, git, the API
|
|
246
|
-
key and today's free requests left, the browser, the Vercel token and the
|
|
247
|
-
version, with the fix for anything wrong.
|
|
248
|
-
|
|
249
|
-
**Parallel workers.** When a build splits into parts that touch different files
|
|
250
|
-
— the API route, the upload component, the results view — the model hands them
|
|
251
|
-
to up to three workers that build at the same time, each line in the transcript
|
|
252
|
-
tagged with the worker's name. File writes take turns so two never collide.
|
|
253
|
-
|
|
254
|
-
**Installs that start early.** The moment a `package.json` with dependencies is
|
|
255
|
-
written, its install starts in the background while the rest of the app is
|
|
256
|
-
still being written. An install the model asks for later waits for that one
|
|
257
|
-
instead of running twice, and anything run in that folder waits for it too.
|
|
258
|
-
|
|
259
|
-
**It opens what it built and uses it.** Every app build ends with a look — not
|
|
260
|
-
when the model remembers to ask for one, but as part of the same pass that
|
|
261
|
-
type-checks. It opens the app in a real browser (the Edge or Chrome already on
|
|
262
|
-
your machine, so there is nothing extra to download) at 375px and 1440px, and
|
|
263
|
-
serves the folder itself when there is no dev server to point at, which is how
|
|
264
|
-
a three-file app gets checked at all.
|
|
265
|
-
|
|
266
|
-
Then it uses the app. It types into the first field, presses Enter, and clicks
|
|
267
|
-
the button that submits — and if the page gains no elements, changes no text
|
|
268
|
-
and stores nothing, that is reported as the thing to fix before anything else.
|
|
269
|
-
A page that renders and has no working behaviour passes a type check, a syntax
|
|
270
|
-
check and a screenshot; the only way to find out is to press something.
|
|
271
|
-
|
|
272
|
-
It also reports console errors, failed requests, content that spills off a
|
|
273
|
-
phone screen, broken images and unlabeled controls, saves screenshots to
|
|
274
|
-
`.ucode/screenshots`, and has Gemini review them the way a designer
|
|
275
|
-
would. The model fixes what it finds before calling the app done. Both widths load at once, and the designer review — the slow part — runs
|
|
276
|
-
on the first look at an app in each request and is skipped, not waited on, when
|
|
277
|
-
the vision model is busy. The look after the fixes re-runs only the fast checks:
|
|
278
|
-
a few seconds.
|
|
279
|
-
|
|
280
|
-
**Errors fixed before you see them.** When the model says it is done, ucode
|
|
281
|
-
type-checks every file it changed — `tsc --noEmit` for TypeScript projects,
|
|
282
|
-
a syntax check for JavaScript and Python — and hands any errors back to fix,
|
|
283
|
-
up to three rounds.
|
|
284
|
-
|
|
285
|
-
**A plan you can see.** For longer jobs the model keeps a short checklist, with
|
|
286
|
-
a bar across the top for how far along it is and one row per step, so the one in
|
|
287
|
-
progress is findable without reading the rest:
|
|
288
|
-
|
|
289
|
-
```
|
|
290
|
-
━━━━────── 2/5
|
|
291
|
-
✓ Scaffold
|
|
292
|
-
✓ Upload
|
|
293
|
-
▸ Score dial
|
|
294
|
-
○ Findings
|
|
295
|
-
○ Polish
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
**It knows the project before it asks.** Each turn starts with a map of every
|
|
299
|
-
file and the names each code file exports, so the model goes straight to the
|
|
300
|
-
right file instead of searching for it.
|
|
301
|
-
|
|
302
|
-
**Project memory.** `UCODE.md` in a project — and `~/.ucode/UCODE.md` for how you
|
|
303
|
-
like to work everywhere — is read at the start of every turn. `/remember <note>`
|
|
304
|
-
adds a line to it.
|
|
305
|
-
|
|
306
|
-
**Edits that never guess.** `edit_file` matches exactly once or it fails, and
|
|
307
|
-
when it fails it says *why*. It tolerates what does not matter — tabs against
|
|
308
|
-
spaces, a different indent depth, Windows line endings — and re-indents the
|
|
309
|
-
replacement to fit the file, but a match found twice is still refused.
|
|
310
|
-
`edit_files` changes several files in one call, and writes none of them if any
|
|
311
|
-
edit fails.
|
|
312
|
-
|
|
313
|
-
**Diffs with real line numbers.** Removed lines are numbered where they were,
|
|
314
|
-
added lines where they now are. Numbers you can jump to, not decoration.
|
|
315
|
-
|
|
316
|
-
**Live commentary.** `● Listing src`, `● Running npm test` — what it is doing,
|
|
317
|
-
as it does it, named after the file or command rather than the tool.
|
|
318
|
-
|
|
319
|
-
**Two modes.** Build edits and runs. Plan reads and researches with the writing
|
|
320
|
-
tools withheld, which is stronger than asking a model nicely. `ctrl+b` swaps
|
|
321
|
-
them; the chip inside the input box says which is live.
|
|
322
|
-
|
|
323
|
-
**Sessions.** Everything is on disk under `~/.ucode/sessions`, saved after every
|
|
324
|
-
step. `/resume` lists them with what each one was actually about, the ones from
|
|
325
|
-
this folder first. Press `d` twice on one to delete it — the list stays open, so
|
|
326
|
-
clearing out several is quick — or `/session delete 2,5`.
|
|
1
|
+
<div align="center">
|
|
327
2
|
|
|
328
|
-
|
|
329
|
-
a newer version, installs it while you work. The next launch is the new one.
|
|
330
|
-
Set `UCODE_NO_UPDATE=1` to turn that off.
|
|
331
|
-
|
|
332
|
-
**A context window that folds rather than forgets.** Past 75% the oldest turns
|
|
333
|
-
are summarised instead of dropped, never cutting between a tool call and its
|
|
334
|
-
result. The full history stays on disk regardless.
|
|
335
|
-
|
|
336
|
-
**Screenshots.** Mention a `.png` in your message and it gets attached.
|
|
337
|
-
|
|
338
|
-
## Skills
|
|
339
|
-
|
|
340
|
-
A skill is a folder with a `SKILL.md`: frontmatter, then instructions. Only the
|
|
341
|
-
names and one-line descriptions go into the system prompt — a body is pulled in
|
|
342
|
-
when it is wanted, so the prompt stays the same size however many you add.
|
|
343
|
-
|
|
344
|
-
| Skill | For |
|
|
345
|
-
| --- | --- |
|
|
346
|
-
| `ui-ux` | interfaces: direction, tokens, layout, states, motion, accessibility |
|
|
347
|
-
| `build-app` | going from nothing to something running, and proving it runs |
|
|
348
|
-
| `debug` | finding the real cause instead of the first plausible one |
|
|
349
|
-
| `code-review` | reviewing a change the way a careful colleague would |
|
|
350
|
-
| `write-tests` | tests that fail for the right reason |
|
|
351
|
-
| `ai-features` | model-backed features: prompts with rules, validated JSON, images, failure handling |
|
|
352
|
-
| `security` | secrets, auth, ownership checks, injection, XSS, CSRF, SSRF, uploads |
|
|
353
|
-
| `performance` | measure first, find the real bottleneck, prove the win with numbers |
|
|
354
|
-
| `refactor` | change the shape of code without changing what it does |
|
|
355
|
-
|
|
356
|
-
**Every skill loads itself** when the request calls for it — an app pulls in
|
|
357
|
-
`ui-ux` and `build-app`, "it crashes" pulls in `debug`, an AI feature pulls in
|
|
358
|
-
`ai-features`, an API key pulls in `security` — so the whole skill is in
|
|
359
|
-
context before the model takes its first step. Waiting for the model to decide it needs design guidance means
|
|
360
|
-
finding out it did not after the app is built.
|
|
361
|
-
|
|
362
|
-
Add your own in `.ucode/skills/<name>/SKILL.md` inside a project. A project
|
|
363
|
-
skill shadows a built-in of the same name. Give it an `auto:` line and it loads
|
|
364
|
-
itself too:
|
|
365
|
-
|
|
366
|
-
```markdown
|
|
367
|
-
---
|
|
368
|
-
name: house-style
|
|
369
|
-
description: How we write services here.
|
|
370
|
-
auto: endpoint, handler, migration
|
|
371
|
-
---
|
|
372
|
-
|
|
373
|
-
Everything after the frontmatter is the instruction.
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
## Commands
|
|
377
|
-
|
|
378
|
-
| | |
|
|
379
|
-
| --- | --- |
|
|
380
|
-
| `/help` | the list |
|
|
381
|
-
| `/model` | show the models and switch — `/models` does the same |
|
|
382
|
-
| `/resume` | pick up an earlier conversation — `/session`, `/sessions` too |
|
|
383
|
-
| `/session delete 2,5` | delete saved conversations by number (or `d d` in the list) |
|
|
384
|
-
| `/new` | save this one and start fresh |
|
|
385
|
-
| `/remember <note>` | add a standing note to this project's `UCODE.md` |
|
|
386
|
-
| `/undo [n]` | put the project back as it was before the last turn — or `n` turns — including what commands changed |
|
|
387
|
-
| `/diff` | what has changed this session |
|
|
388
|
-
| `/commit [msg]` | commit the changes, with a message written from the diff if you give none |
|
|
389
|
-
| `/review` | read the uncommitted changes for bugs, changing nothing |
|
|
390
|
-
| `/init` | read the project and write its `UCODE.md` |
|
|
391
|
-
| `/mcp` | connected MCP servers and their tools |
|
|
392
|
-
| `/permissions [ask\|auto]` | ask before every command, or run them; what is always allowed |
|
|
393
|
-
| `/theme [what]` | change how ucode or your terminal looks — or just ask in words |
|
|
394
|
-
| `/look [url]` | open the running app and report what is on the page |
|
|
395
|
-
| `/deploy [folder]` | put the app online and get its link |
|
|
396
|
-
| `/mic` | say what you want instead of typing it — same as `ctrl+t` |
|
|
397
|
-
| `/stats` | time, steps and tokens this session |
|
|
398
|
-
| `/doctor` | check that everything ucode needs is working |
|
|
399
|
-
| `/skills` | what it knows how to do, and what is loaded |
|
|
400
|
-
| `/search <query>` | look something up on the web |
|
|
401
|
-
| `/copy` | last reply to the clipboard |
|
|
402
|
-
| `/clear` | clear the screen, keep the conversation |
|
|
403
|
-
| `/exit` | save and quit |
|
|
404
|
-
|
|
405
|
-
`ctrl+b` plan/build · click `+ file` (or `ctrl+o`) to add a picture or file · `esc` stops a running turn · `ctrl+d` quits ·
|
|
406
|
-
`↑ ↓` scroll the conversation, or walk history once you are typing ·
|
|
407
|
-
`tab` completes a command
|
|
408
|
-
|
|
409
|
-
Type `/` and the commands pop up over the input box, narrowing as you type:
|
|
410
|
-
`↑ ↓` to choose, `enter` to run, `tab` to fill it in and add more, `esc` to close.
|
|
411
|
-
The rest opens there too, not in the chat — the model and conversation
|
|
412
|
-
pickers, `/help`, `/stats`, `/doctor`, `/mcp`, `/permissions`, `/skills`,
|
|
413
|
-
`/theme`, `/diff` (`↑ ↓` scrolls, `esc` closes) — and every question before a
|
|
414
|
-
command runs: `y`, `n` or `a` (always) then `enter`, or the arrows then
|
|
415
|
-
`enter`. `enter` on its own is no, and anything else you type is sent as a
|
|
416
|
-
message, so a question that pops up mid-sentence is never answered by it.
|
|
417
|
-
|
|
418
|
-
```
|
|
419
|
-
╭──────────────────────────────────────────────────────────────────────────╮
|
|
420
|
-
│ /stats time, steps and tokens this session │
|
|
421
|
-
│ /skills what ucode knows how to do │
|
|
422
|
-
│ enter runs · tab completes · esc closes │
|
|
423
|
-
╰──────────────────────────────────────────────────────────────────────────╯
|
|
424
|
-
|
|
425
|
-
╭──────────────────────────────────────────────────────────────────────────╮
|
|
426
|
-
│ /s │
|
|
427
|
-
│ │
|
|
428
|
-
│ BUILD Gemini 3.5 Flash-Lite 4% │
|
|
429
|
-
╰──────────────────────────────────────────────────────────────────────────╯
|
|
430
|
-
```
|
|
431
|
-
|
|
432
|
-
### Speak instead of typing
|
|
433
|
-
|
|
434
|
-
Press `ctrl+t` (or click `mic`, or type `/mic`) and say what you want —
|
|
435
|
-
"make me a quiz app about planets". The chip turns red while it listens.
|
|
436
|
-
`enter` stops and sends it; `ctrl+t` stops and puts the words in the box to
|
|
437
|
-
check first; `esc` throws it away. It stops by itself after two minutes.
|
|
438
|
-
|
|
439
|
-
Gemini writes down what you said, so nothing extra is needed beyond your key.
|
|
440
|
-
Recording uses what the computer already has: Windows' built-in recorder, `sox`
|
|
441
|
-
or `ffmpeg` on macOS (`brew install sox`), `arecord` or `sox` on Linux. If a
|
|
442
|
-
quiet mic is taken for silence, set `UCODE_MIC_QUIET` lower than 800.
|
|
443
|
-
|
|
444
|
-
### Change how it looks — and your terminal
|
|
445
|
-
|
|
446
|
-
Just ask: "make ucode orange with the arc spinner", "make my terminal navy
|
|
447
|
-
with a bigger font", "make the terminal a bit see-through". Or use `/theme`:
|
|
448
|
-
|
|
449
|
-
```
|
|
450
|
-
/theme what it looks like now, and the choices
|
|
451
|
-
/theme orange a new colour at once (a name, #ff8c2b, or rgb(...))
|
|
452
|
-
/theme reset ucode's own blue again
|
|
453
|
-
/theme terminal reset the terminal back the way it was
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
ucode's look is saved in `~/.ucode/theme.json` — accent and spinner (`dots`,
|
|
457
|
-
`line`, `arc`, `circle`, `square`, `bounce`, `pulse`, `star`) — so it survives
|
|
458
|
-
restarts and updates. The credit under the logo, "made and tested by om
|
|
459
|
-
dixit", always stays: no look changes it.
|
|
460
|
-
|
|
461
|
-
The terminal is changed the way each one allows, after you say yes:
|
|
462
|
-
|
|
463
|
-
| Terminal | What changes | How long |
|
|
464
|
-
| --- | --- | --- |
|
|
465
|
-
| Windows Terminal | background, text, cursor, font, size, opacity — a background picture comes off so the colour shows | kept, every tab (the old settings are backed up) |
|
|
466
|
-
| Terminal.app (macOS) | background, text, cursor, font, size | this window |
|
|
467
|
-
| iTerm2 (macOS) | background, text, cursor | this session |
|
|
468
|
-
| Linux, VS Code and others | background, text, cursor | this session |
|
|
469
|
-
|
|
470
|
-
### Your own commands
|
|
471
|
-
|
|
472
|
-
A file `.ucode/commands/explain.md` (or `~/.ucode/commands/` for every
|
|
473
|
-
project) becomes `/explain`. Its text is the prompt; `$ARGUMENTS` is replaced
|
|
474
|
-
by whatever you type after the command.
|
|
475
|
-
|
|
476
|
-
### MCP servers
|
|
477
|
-
|
|
478
|
-
Connect tools from any MCP server — library docs, GitHub, a database:
|
|
479
|
-
|
|
480
|
-
```
|
|
481
|
-
ucode mcp add context7 npx -y @upstash/context7-mcp
|
|
482
|
-
ucode mcp add github --url https://api.githubcopilot.com/mcp/ --header "Authorization=Bearer ${GITHUB_TOKEN}"
|
|
483
|
-
ucode mcp list
|
|
484
|
-
ucode mcp remove github
|
|
485
|
-
```
|
|
486
|
-
|
|
487
|
-
They are saved in `~/.ucode/mcp.json` (`--project` puts them in this folder's
|
|
488
|
-
`.ucode/mcp.json`). ucode asks before each MCP tool runs; answer `a` to always
|
|
489
|
-
allow that tool. A project's own servers and hooks only run once you approve them.
|
|
490
|
-
|
|
491
|
-
### Permissions and hooks
|
|
492
|
-
|
|
493
|
-
`.ucode/settings.json` (or `~/.ucode/settings.json`):
|
|
494
|
-
|
|
495
|
-
```json
|
|
496
|
-
{
|
|
497
|
-
"commands": "ask",
|
|
498
|
-
"allow": ["npm test", "git status"],
|
|
499
|
-
"hooks": {
|
|
500
|
-
"afterEdit": ["npx prettier --write {files}"],
|
|
501
|
-
"beforeCommand": ["node guard.js"]
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
```
|
|
505
|
-
|
|
506
|
-
`"commands": "ask"` puts every command to you first (`/permissions ask`);
|
|
507
|
-
answering `a` adds it to `allow`. A `beforeCommand` hook that exits non-zero
|
|
508
|
-
stops the command; it sees it in `UCODE_COMMAND`.
|
|
509
|
-
|
|
510
|
-
### Run it without a keyboard
|
|
511
|
-
|
|
512
|
-
```
|
|
513
|
-
ucode -p "fix the failing test" prints the answer
|
|
514
|
-
ucode -p "make a quiz app" --json --yes one JSON line: ok, answer, files, steps, requests, time
|
|
515
|
-
```
|
|
516
|
-
|
|
517
|
-
Progress goes to stderr. With no `--yes`, anything that would be asked is declined.
|
|
518
|
-
`npm run eval` runs ten real jobs this way and checks each one — use it before
|
|
519
|
-
a release (it spends about 30 free requests, and takes about seven minutes).
|
|
520
|
-
|
|
521
|
-
### Other models
|
|
522
|
-
|
|
523
|
-
Any OpenAI-compatible server works, Ollama on your own computer included —
|
|
524
|
-
free and offline:
|
|
525
|
-
|
|
526
|
-
```
|
|
527
|
-
UCODE_BASE_URL=http://localhost:11434/v1 UCODE_MODEL=qwen2.5-coder ucode
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
## How it thinks
|
|
531
|
-
|
|
532
|
-
- **Thinking levels.** Flash-Lite does not think at all unless asked. ucode
|
|
533
|
-
asks for a little on every step (it costs nothing on a straightforward
|
|
534
|
-
write), more on the first step of a build, and the most when a fix has
|
|
535
|
-
already failed. `UCODE_THINK=0` turns it off.
|
|
536
|
-
- **A design direction for every build** — a tone, two typefaces and an accent —
|
|
537
|
-
so two apps never come out the same, and a check for the generated look
|
|
538
|
-
(the starter's colours, Inter, purple gradients, gradient text, emoji icons)
|
|
539
|
-
that sends it back to be fixed. `UCODE_DESIGN_CHECK=0` turns the check off.
|
|
540
|
-
- **Learns from its mistakes.** Problems ucode keeps catching are counted in
|
|
541
|
-
`~/.ucode/lessons.json`, and the common ones are warned about before the next build.
|
|
542
|
-
- **Tries a different approach** when the same problem survives a fix, and
|
|
543
|
-
offers to hand that fix to Gemini 3.5 Flash — only if you say yes, since it
|
|
544
|
-
has about 20 free requests a day.
|
|
545
|
-
- **Changes to existing code** get their own rules: find the code, read only
|
|
546
|
-
what is involved, make the smallest change in the code's own style.
|
|
547
|
-
- **Stays under the free limit.** Requests are spaced to Google's per-minute
|
|
548
|
-
limit instead of being refused and waited out; `/stats` shows how many were sent.
|
|
549
|
-
|
|
550
|
-
## Options
|
|
551
|
-
|
|
552
|
-
```
|
|
553
|
-
ucode [options]
|
|
554
|
-
|
|
555
|
-
-m, --model <id> which model to use
|
|
556
|
-
-C, --cwd <dir> work in another directory
|
|
557
|
-
--plan start in plan mode
|
|
558
|
-
-p, --print <task> do one task with no keyboard, print the answer, exit
|
|
559
|
-
--json with -p: one JSON object about the run
|
|
560
|
-
-y, --yes with -p: say yes to anything that would be asked
|
|
561
|
-
--debug print stack traces when something breaks
|
|
562
|
-
-v, --version print the version
|
|
563
|
-
-h, --help the above
|
|
564
|
-
```
|
|
565
|
-
|
|
566
|
-
## Configuration
|
|
567
|
-
|
|
568
|
-
| | |
|
|
569
|
-
| --- | --- |
|
|
570
|
-
| `~/.ucode/.env` | `GEMINI_API_KEY`, and `TAVILY_API_KEY` for web search |
|
|
571
|
-
| `~/.ucode/settings.json`, `.ucode/settings.json` | permissions, always-allowed commands, hooks |
|
|
572
|
-
| `~/.ucode/mcp.json`, `.ucode/mcp.json` | MCP servers |
|
|
573
|
-
| `.ucode/commands/*.md` | your own slash commands |
|
|
574
|
-
| `~/.ucode/snapshots/` | the project before each turn, for `/undo` |
|
|
575
|
-
| `~/.ucode/lessons.json` | mistakes ucode keeps catching, warned about next time |
|
|
576
|
-
| `~/.ucode/sessions/` | one JSON per conversation |
|
|
577
|
-
| `.ucode/skills/` | skills belonging to a project |
|
|
578
|
-
| `UCODE.md` | project memory, read every turn |
|
|
579
|
-
| `~/.ucode/UCODE.md` | your own standing instructions, for every project |
|
|
580
|
-
|
|
581
|
-
Environment overrides: `UCODE_MODEL`, `UCODE_WORKER_MODEL` (a faster model for
|
|
582
|
-
parallel workers), `UCODE_WORKER_STEPS`, `UCODE_MAX_CONTEXT_TOKENS`,
|
|
583
|
-
`UCODE_MAX_STEPS`, `UCODE_MAX_TOOL_OUTPUT`, `UCODE_REQUEST_TIMEOUT_MS`,
|
|
584
|
-
`UCODE_STALL_MS` (how long a silent reply is waited on before asking again, 60s),
|
|
585
|
-
`UCODE_BASE_URL`, `UCODE_NO_UPDATE`, `UCODE_THINK=0`, `UCODE_DESIGN_CHECK=0`,
|
|
586
|
-
`UCODE_RPM` (requests a minute before pacing, 0 = off), `UCODE_RIPGREP=0`.
|
|
587
|
-
|
|
588
|
-
Search uses ripgrep (`rg`) when it is installed — much faster on a big
|
|
589
|
-
project — and its own search otherwise.
|
|
590
|
-
|
|
591
|
-
Web search needs a Tavily key — free, 1000 searches a month, no card. Without
|
|
592
|
-
one, ucode answers from what it knows and says that it could not check.
|
|
593
|
-
|
|
594
|
-
## How it is put together
|
|
3
|
+
# ucode
|
|
595
4
|
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
src/core/loop.js the agent loop, the system prompt, the slash commands
|
|
599
|
-
src/core/provider.js the only file that knows which provider answers
|
|
600
|
-
src/core/history.js sessions on disk
|
|
601
|
-
src/core/window.js folding a long conversation to fit
|
|
602
|
-
src/core/skills.js loading skills, and deciding which load themselves
|
|
603
|
-
src/core/context.js the project map and project memory
|
|
604
|
-
src/core/failure.js one error shape: what, why, what next
|
|
605
|
-
src/core/scope.js what a request carries: build scope, design direction, edit rules
|
|
606
|
-
src/core/genericcheck.js the check for a generated-looking design
|
|
607
|
-
src/core/lessons.js mistakes counted across sessions, warned about up front
|
|
608
|
-
src/core/snapshot.js the project before every turn, for /undo
|
|
609
|
-
src/core/settings.js permissions, always-allow, hooks, project trust
|
|
610
|
-
src/core/mcp.js the MCP client: stdio and HTTP servers, no SDK
|
|
611
|
-
src/core/headless.js ucode -p: one job, no keyboard
|
|
612
|
-
src/tools/ the twenty-one tools, plus their shared plumbing
|
|
613
|
-
src/ui/screen.js the full-screen interface
|
|
614
|
-
src/ui/plain.js the same interface for when there is no terminal
|
|
615
|
-
src/ui/theme.js colour, boxes, and the string maths behind both
|
|
616
|
-
```
|
|
5
|
+
**A free, open-source AI coding agent for your terminal.**<br>
|
|
6
|
+
Builds whole apps in about a minute on Google Gemini's free tier — then opens them and clicks through to check its own work.
|
|
617
7
|
|
|
618
|
-
|
|
619
|
-
|
|
8
|
+
[](https://www.npmjs.com/package/ucode-agent)
|
|
9
|
+
[](https://www.npmjs.com/package/ucode-agent)
|
|
10
|
+
[](https://github.com/sppideey/ucode-agent/actions/workflows/test.yml)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
[](https://nodejs.org)
|
|
13
|
+
[](https://github.com/sppideey/ucode-agent/stargazers)
|
|
620
14
|
|
|
621
|
-
|
|
622
|
-
to do next — so no screen ever has to fall back on a stack trace. Tool failures
|
|
623
|
-
are handed to the model as text instead, which is why they read like
|
|
624
|
-
instructions.
|
|
15
|
+
<img src="https://raw.githubusercontent.com/sppideey/ucode-agent/main/.github/ucode-hero.png" alt="ucode in a terminal: a tasks app built in 58 seconds, with the command list popped up over the input box" width="900">
|
|
625
16
|
|
|
626
|
-
|
|
17
|
+
</div>
|
|
627
18
|
|
|
628
19
|
```bash
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
npm link # puts `ucode` on PATH, pointing at this checkout
|
|
633
|
-
npm test
|
|
20
|
+
npm i -g ucode-agent # Node 22 or newer
|
|
21
|
+
ucode login YOUR_KEY # a free key from aistudio.google.com/apikey
|
|
22
|
+
ucode # in any project folder
|
|
634
23
|
```
|
|
635
24
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
The tests need no network and no framework — `node test/run.js` runs them all.
|
|
642
|
-
|
|
643
|
-
Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) (sign off
|
|
644
|
-
with `git commit -s`).
|
|
645
|
-
|
|
646
|
-
## Licence
|
|
647
|
-
|
|
648
|
-
ucode is free software under the **GNU AGPL v3** ([LICENSE](LICENSE)) with
|
|
649
|
-
three additional terms ([NOTICE](NOTICE)): every copy and every changed version
|
|
650
|
-
keeps the credit "made and tested by om dixit" on screen, a changed version is
|
|
651
|
-
marked as changed, and the ucode name and logo stay ucode's.
|
|
652
|
-
|
|
653
|
-
| What | Licence |
|
|
654
|
-
| --- | --- |
|
|
655
|
-
| ucode's code | AGPL-3.0-only, with the terms in [NOTICE](NOTICE) |
|
|
656
|
-
| `templates/` and `skills/` — what goes into the apps you build | [MIT No Attribution](templates/LICENSE) — the apps are yours, no credit needed |
|
|
657
|
-
| The documentation | [CC BY 4.0](LICENSE-DOCS) |
|
|
658
|
-
| Code adapted from other projects | its own — see [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) |
|
|
659
|
-
| Releases up to 1.66.0 | MIT OR Apache-2.0, unchanged |
|
|
660
|
-
|
|
661
|
-
Contributions: [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
662
|
-
|
|
663
|
-
The edit matchers, the summary template, the context-overflow and transient-error
|
|
664
|
-
patterns and tool-name repair are adapted from
|
|
665
|
-
[opencode](https://opencode.ai) (MIT); see
|
|
666
|
-
[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
|
25
|
+
A coding agent that lives in your terminal, like Claude Code or Codex CLI — but
|
|
26
|
+
free: it runs on Gemini's free tier, or on Ollama with no internet at all. It
|
|
27
|
+
reads your code, edits it, runs your commands, checks its own work, and keeps
|
|
28
|
+
every conversation on disk. If it helps you, a ⭐ helps other people find it.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ucode-agent",
|
|
3
|
-
"version": "1.67.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.67.1",
|
|
4
|
+
"description": "Free, open-source AI coding agent for your terminal: builds whole apps in about a minute on Google Gemini's free tier, edits real code, checks and fixes its own work.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "ucode.js",
|
|
7
7
|
"bin": {
|
|
@@ -35,14 +35,27 @@
|
|
|
35
35
|
"node": ">=22"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
|
-
"
|
|
38
|
+
"ai",
|
|
39
|
+
"ai-agent",
|
|
40
|
+
"coding-agent",
|
|
41
|
+
"ai-coding-assistant",
|
|
42
|
+
"ai-coding-agent",
|
|
43
|
+
"agentic-coding",
|
|
39
44
|
"cli",
|
|
40
45
|
"terminal",
|
|
41
|
-
"
|
|
46
|
+
"tui",
|
|
42
47
|
"llm",
|
|
43
48
|
"gemini",
|
|
44
49
|
"google-gemini",
|
|
45
|
-
"
|
|
50
|
+
"gemini-api",
|
|
51
|
+
"ollama",
|
|
52
|
+
"mcp",
|
|
53
|
+
"model-context-protocol",
|
|
54
|
+
"code-generation",
|
|
55
|
+
"developer-tools",
|
|
56
|
+
"claude-code-alternative",
|
|
57
|
+
"codex-alternative",
|
|
58
|
+
"free"
|
|
46
59
|
],
|
|
47
60
|
"author": "om dixit",
|
|
48
61
|
"license": "AGPL-3.0-only",
|