heartcode 0.1.44 → 0.1.54
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/CHANGELOG.md +243 -0
- package/README.md +147 -126
- package/SKILL.md +16 -18
- package/bin/heartcode.js +65 -62
- package/package.json +2 -2
- package/prompts/README.md +1 -1
- package/prompts/agent.md +249 -352
- package/prompts/compact.md +24 -45
- package/prompts/guided.md +43 -67
- package/prompts/tests.md +15 -0
- package/src/acp.js +1 -1
- package/src/agent.js +91 -81
- package/src/check.js +411 -0
- package/src/client.js +21 -37
- package/src/config.js +10 -1
- package/src/guided.js +13 -12
- package/src/headless.js +28 -2
- package/src/log.js +1 -1
- package/src/mcp.js +30 -21
- package/src/prompts.js +1 -0
- package/src/reset.js +1 -1
- package/src/sessions.js +56 -17
- package/src/settings.html +296 -154
- package/src/settings.js +108 -43
- package/src/skills.js +42 -7
- package/src/tabs.js +1 -1
- package/src/tools.js +40 -29
- package/src/ui.js +126 -30
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,249 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in each version of HeartCode, newest first.
|
|
4
4
|
|
|
5
|
+
## 0.1.54 (2026-11-04)
|
|
6
|
+
|
|
7
|
+
- **Questions always come with a recommended answer**: ask_user needs options, the first one marked
|
|
8
|
+
"recommended"; nobody answers within 30 seconds (each key starts the wait again) and it's taken,
|
|
9
|
+
shown as such, and the model is told it was. A model that types its questions as text instead is
|
|
10
|
+
sent back once to ask them in the dialog.
|
|
11
|
+
- **Fewer, shorter prompts** (128 → 101), written for small models: variants of one message merged
|
|
12
|
+
(hooks, "not done yet", output shortened, repeats, bad replies…), every rule kept, about a quarter
|
|
13
|
+
less sent with each request. A plan made without looking anything up is asked once whether it uses
|
|
14
|
+
something to read the current docs for. "Plan first" says plainly that nothing was written. The
|
|
15
|
+
reviewer is told when a long change is shortened, so it no longer calls a whole file truncated.
|
|
16
|
+
- **Guided mode no longer loops**: a tiny model that kept picking "read" after the work was done
|
|
17
|
+
now finishes (the menu doesn't offer a step that just repeated with nothing new).
|
|
18
|
+
- **Alt, never Ctrl**: Alt+O shows all of the thinking (was Ctrl+O), Alt+A / Alt+N tick all / none in
|
|
19
|
+
a multi-select; the Ctrl+PgUp/PgDn/Home/End alternatives are gone. Only Ctrl+C and Ctrl+D remain.
|
|
20
|
+
- **MCP servers**: added from the command alone (the name comes from it), and each flag is a pill
|
|
21
|
+
to tick on and off in the list.
|
|
22
|
+
- **System prompt page redesigned** like the Skills page: kinds to switch between (System, Tools,
|
|
23
|
+
Notes & replies, Guided mode, Summaries, Tests), search, "Changed by you", readable names, and
|
|
24
|
+
labelled parts (what it is, placeholders to click in, the prompt). On phones, the lists of the
|
|
25
|
+
prompts, skills and files pages no longer push the editor off the screen.
|
|
26
|
+
- **README**: easier to read, what happens when you ask it to make something, and a recommended
|
|
27
|
+
step: the design skill, Chrome DevTools MCP and computer use MCP, with why and how.
|
|
28
|
+
|
|
29
|
+
## 0.1.53 (2026-11-04)
|
|
30
|
+
|
|
31
|
+
- **Your models, in your order, and nothing picks for you**: #1 answers, the next one in your list
|
|
32
|
+
when it fails; #1 can hand a part to your other models, the first in your order that can do it (one
|
|
33
|
+
that sees, for an image). Gone: the orchestrator (the Your order / Orchestrator switch,
|
|
34
|
+
`--model-choice`, its handoff checks and the "never tested" dialog), the skills tests and the
|
|
35
|
+
orchestrator scenes, each model's job record, and models left out as "not used". Helpers, image
|
|
36
|
+
describers, reviewers and guided mode all go by your order.
|
|
37
|
+
- **Test stays**: Test all, Test on a row and on the ones selected, the Works? column (sort by it:
|
|
38
|
+
fastest first), the result filter, the Request viewer, Tests wait. While it runs, the top of the page
|
|
39
|
+
stays three lines: the list's settings, the filters with Test all and Save order, then "Testing 56
|
|
40
|
+
models ✓ 9 work · ✗ 0 don't … 9 of 56 · Stop".
|
|
41
|
+
- **LMArena's ranks, to sort by**: Update model info gets models.dev and LMArena's public rankings
|
|
42
|
+
together; Coding, Web apps and Vision show each model's score and place. They never choose a model.
|
|
43
|
+
- **Your models page tidier**: the list's settings in one row (If one fails, Give up after, Stalled
|
|
44
|
+
after, Tests wait, New message to), the filters as one row with them; Tools, Thinking, Images and
|
|
45
|
+
Free as pill toggles; the table sized to its columns.
|
|
46
|
+
- **No built-in skills or MCP servers**: HeartCode comes with none; add or install the ones you want.
|
|
47
|
+
The design guides moved to their own repo (`/install_skill p32929/p32929_design_skill`). If you used
|
|
48
|
+
the built-in `computer-use` or `chrome-devtools` server, add it in /settings → MCP servers.
|
|
49
|
+
- **Skills in the Agent Skills format**: a skill's `metadata:` block is read (HeartCode's own fields
|
|
50
|
+
there: `heartcode-use`, `heartcode-load`); `load` brings a folder skill's files with it; the skill
|
|
51
|
+
tool reads a skill's own files (`file`); an always-on skill brings its files too, and its guides can
|
|
52
|
+
be read.
|
|
53
|
+
- **Skills page rewritten**: your skills listed on the left, the one chosen on the right (who uses it,
|
|
54
|
+
where it lives, its files, the prompt); install in one line. Saving a one-file skill no longer makes a
|
|
55
|
+
second copy in a folder, and renaming a folder skill moves it with its files instead of losing them.
|
|
56
|
+
- **Page checks look at more**: `heartcode page` fails text too faint to read (WCAG contrast), content
|
|
57
|
+
hidden when the page loads (shown only on scroll), icons that don't draw, and sideways scrolling on a
|
|
58
|
+
phone, saying which.
|
|
59
|
+
- A helper that keeps making the same call over and over ends, and the job goes to your next model,
|
|
60
|
+
instead of going round until Esc.
|
|
61
|
+
|
|
62
|
+
## 0.1.52 (2026-11-04)
|
|
63
|
+
|
|
64
|
+
- **Sessions live with the project**: a new conversation is saved in the folder you opened, in
|
|
65
|
+
`.heartcode/sessions/` (which ignores itself in git: conversations can hold secrets), not in
|
|
66
|
+
`~/.heart/sessions`. A worktree's go to its main project, so removing the worktree keeps them.
|
|
67
|
+
Older sessions in `~/.heart/sessions` still show in /resume and move into their project when next
|
|
68
|
+
saved. `--resume <id>` and an editor's session/load still find one from any folder (an index in
|
|
69
|
+
`~/.heart/sessions.json`); a folder that can't be written falls back to `~/.heart/sessions`.
|
|
70
|
+
Resetting everything (`~/.heart`) no longer deletes your projects' sessions.
|
|
71
|
+
- **Design guides, rewritten** (`skills/design/`): the old one-file design skill is gone, replaced by
|
|
72
|
+
short, sourced guides (shadcn/ui, GOV.UK, Nielsen Norman Group, WAI-ARIA, WCAG, MDN Baseline): one
|
|
73
|
+
set of general rules (full width, spacing, type, the theme's tokens, states, accessibility, modern
|
|
74
|
+
practice: native `<dialog>`, `popover`, container queries, `dvh`, safe areas, `:user-invalid`, undo
|
|
75
|
+
over "are you sure?", each tagged by how widely it works) and 17 component guides (button,
|
|
76
|
+
typography, field, select, choice, card, badge, alert, toast, dialog, sheet and bottom sheet,
|
|
77
|
+
dropdown menu, tooltip, tabs, table, sidebar, date picker). Each is a Markdown file for the model and
|
|
78
|
+
an HTML page showing the same rules, in one theme (`theme.css`: DM Sans, Geist Mono, a 1rem radius,
|
|
79
|
+
light and dark). Not loaded by models yet: the skill's entry point comes next.
|
|
80
|
+
|
|
81
|
+
## 0.1.51 (2026-11-04)
|
|
82
|
+
|
|
83
|
+
- **Models that think now show it**: many (gemma4, Qwen on Groq, Gemini) think only when asked, and
|
|
84
|
+
HeartCode didn't ask unless you'd set an effort; now a model that can think is asked for low effort
|
|
85
|
+
by default (your setting wins), and Gemini's thinking is asked for and taken out of its answer.
|
|
86
|
+
- **Thinking, two lines at a time**: while a model thinks, its last two lines show live above the
|
|
87
|
+
spinner; after its reply, those two lines stay above it under "thought for …", so you see what it
|
|
88
|
+
thought and what it answered. Ctrl+O shows all of it as it comes (what came before too), and again
|
|
89
|
+
goes back; once it's over, Ctrl+O shows the whole thought it just had. A helper's thinking (the work an orchestrator
|
|
90
|
+
hands out) shows as it comes too, not only when its reply ends (unless several helpers reply at
|
|
91
|
+
once).
|
|
92
|
+
- "↻ … answered" (another model in your list answered) is on a line of its own under the reply, no
|
|
93
|
+
longer glued to its last line.
|
|
94
|
+
- **Headless: replies as they come**: `heart -p --output-format stream-json --include-partial-messages`
|
|
95
|
+
now streams each reply's thinking and text as Claude Code does (`stream_event` lines with
|
|
96
|
+
`thinking_delta` and `text_delta`), before its whole `assistant` line (which, as before, has the
|
|
97
|
+
thinking in a `thinking` block).
|
|
98
|
+
|
|
99
|
+
- **Smoother scrolling**: a trackpad or a fast-spun wheel moves the conversation a line per step (a
|
|
100
|
+
single notch still three), the screen is drawn at most once a frame however many scroll events
|
|
101
|
+
come, and only the rows that changed are written.
|
|
102
|
+
- **The mouse wheel scrolls only the conversation again**: HeartCode takes the mouse by default, so
|
|
103
|
+
the tabs, the input and the status bar stay put while you scroll (with the terminal's own mouse,
|
|
104
|
+
its wheel scrolled the whole screen). Dragging selects and copies; over SSH the copy goes to the
|
|
105
|
+
computer you're at (through the terminal), not the remote one. Option+drag (Shift+drag elsewhere)
|
|
106
|
+
is still the terminal's own selection, and "HeartCode takes the mouse" in /settings → General
|
|
107
|
+
gives the mouse back to the terminal (at once, in an open HeartCode too).
|
|
108
|
+
|
|
109
|
+
- **Every test prompt is in one place, as Markdown**: prompts/tests.md holds what Test asks your
|
|
110
|
+
models: the "does it answer" message, the tool check, the four skill jobs and the six orchestrator
|
|
111
|
+
scenes. They're on the settings page's System prompt page, in their own group (Tests) right under
|
|
112
|
+
the system prompts, to read, change and reset like any other prompt; each one's note says what
|
|
113
|
+
its scoring relies on (a name or id the check looks for). A change is used by the next Test, also
|
|
114
|
+
on a settings page started on its own (heart settings).
|
|
115
|
+
|
|
116
|
+
## 0.1.50 (2026-11-04)
|
|
117
|
+
|
|
118
|
+
- **Asks before an untested orchestrator starts**: with an orchestrator whose models were never
|
|
119
|
+
tested together, the first message waits for a choice: open the settings page and run Test (the
|
|
120
|
+
message goes when the page is turned off), use your order instead, or send it anyway (not asked
|
|
121
|
+
again that session). Esc leaves it unsent.
|
|
122
|
+
- **Test is much faster**: each model's skill jobs run at once, every orchestrator's scenes run at
|
|
123
|
+
once, and the skills and the orchestrators are tested side by side, with at most 4 requests at a
|
|
124
|
+
time per provider (so a free tier isn't flooded); the first step tests 4 models at a time per
|
|
125
|
+
provider. All 56 models of a real list: about 8 minutes; five models: under 2. The dialog shows
|
|
126
|
+
the time, and what's running (a job waiting its turn shows as waiting, not running).
|
|
127
|
+
- **Orchestrators are ranked by scenes passed** (one that never answers no longer ranks above one
|
|
128
|
+
that passed 5 of 6), and a Test where some didn't answer still puts the others in order, best
|
|
129
|
+
first, with those after them.
|
|
130
|
+
- **Dialogs close once they're done**: "Open settings and run Test" opens the page straight into the
|
|
131
|
+
Test, already running; when it's done, HeartCode's dialog closes by itself ("done"), your message
|
|
132
|
+
goes, and the page stays open with the results. Turned off before that (Esc), the question isn't
|
|
133
|
+
asked again: the message goes, with a line saying the models aren't tested yet. Switching to your
|
|
134
|
+
order on the page ends it too.
|
|
135
|
+
- **HeartCode decides which of your models can be used**: you choose any models (and as many
|
|
136
|
+
orchestrators as you like); a model that can't work is left out for now, and Your models tags it
|
|
137
|
+
"not used" with why: its key or name refused (401, 403, 404, until it's tested again), a limit
|
|
138
|
+
smaller than its first request (its window, or a per-minute cap its provider states, like Groq's
|
|
139
|
+
2,000 tokens a minute, now kept when a provider says so), or an orchestrator that failed every
|
|
140
|
+
scene of the last Test.
|
|
141
|
+
- **A model that goes silent, or says a request is too large, isn't tried again** as a helper: the
|
|
142
|
+
orchestrator hands the job on at once (it used to wait up to 150 s three times).
|
|
143
|
+
- **A handoff's check asks like any command**: plan mode, a command reaching outside the project and
|
|
144
|
+
your permission setting apply ("Run the check …?"); a page check only opens a page.
|
|
145
|
+
- **Page checks, sturdier**: every step has a time limit, so a page stuck in a loop fails ("stuck in a
|
|
146
|
+
loop") instead of hanging, and Esc stops a check at once (not counted against the model). A
|
|
147
|
+
computer too slow to draw a 3D page is told apart from a stuck one (screenshots left out, the rest
|
|
148
|
+
checked). A folder means its index.html; odd paths ("50%off.png") no longer crash HeartCode; the
|
|
149
|
+
browser and its temp folder are always cleaned up.
|
|
150
|
+
- **No browser? HeartCode fetches one**: Google's headless browser for testing (about 100 MB, once,
|
|
151
|
+
into ~/.heart/browser), so page checks work on a server or Linux box without Chrome (Ubuntu's
|
|
152
|
+
AppArmor refusal handled).
|
|
153
|
+
- **Test, sturdier**: one that fails says so (never "Tested"); one with no models left to hand work to
|
|
154
|
+
is refused at the start; a stopped skills step isn't counted as scored; a provider removed
|
|
155
|
+
meanwhile, or Test all pressed between steps, no longer leaves two runs going.
|
|
156
|
+
- **Skills tests run the model's code locked down** (Node's permission model: its own folder only, no
|
|
157
|
+
writing, no other programs) and without freezing the settings page.
|
|
158
|
+
- `heartcode page` screenshots are kept out of git (their own .gitignore); workers clean up the
|
|
159
|
+
scratch files they made, and the review looks for leftovers (not tools' caches).
|
|
160
|
+
- `heartcode page fix the footer` is a prompt again (only a file or URL after "page" is a page check).
|
|
161
|
+
- The model table stays pinned while you scroll in a narrow window (only a phone lets it scroll away);
|
|
162
|
+
"More columns" sits clear of the rows' buttons.
|
|
163
|
+
- **Needs Node.js 22 or newer** (page checks use its built-in WebSocket).
|
|
164
|
+
- **The table shows it scrolls sideways**: when there are more columns than fit, that side fades out
|
|
165
|
+
and a small "‹ More columns ›" stays in view at the bottom; click it (or Shift + scroll, or swipe).
|
|
166
|
+
|
|
167
|
+
## 0.1.49 (2026-11-04)
|
|
168
|
+
|
|
169
|
+
- **Your models, simpler**: how a model is picked is a switch at the top, **Your order** or
|
|
170
|
+
**Orchestrator**, with one line on what it means, and only the settings for that one under it
|
|
171
|
+
("New message to" only with your order; "If an orchestrator fails" with one).
|
|
172
|
+
- **One Test with an orchestrator**: one click checks the whole team, step by step, live in one
|
|
173
|
+
dialog: does each model answer, the skills of the ones that do the work (scored this week: kept),
|
|
174
|
+
then each orchestrator handing them work in a few short scenes (put in order, the best first).
|
|
175
|
+
It runs on the server (close the page, it goes on), and each step says what it came to. With
|
|
176
|
+
your order, Test all (does each answer) is all there is. The selection bar's Test does the same
|
|
177
|
+
for the models selected.
|
|
178
|
+
- **HeartCode says when the team was never tested**: with an orchestrator, the first message of a
|
|
179
|
+
session says to run Test in /settings (or use your order) until it's been run once.
|
|
180
|
+
- The sidebar names your first two orchestrators and how many more.
|
|
181
|
+
|
|
182
|
+
## 0.1.48 (2026-11-04)
|
|
183
|
+
|
|
184
|
+
- **Work is checked, not taken on trust**: each job the orchestrator hands out carries a check that
|
|
185
|
+
HeartCode runs itself when the model is done: a command that must pass (the tests, the program),
|
|
186
|
+
or `page <file>`: the page opened in a real headless browser (Chrome, Chromium or Edge, found on
|
|
187
|
+
your computer; without one, a static check that its files are there and its scripts parse). It
|
|
188
|
+
fails on errors, a blank page, or a click or key that breaks it. A failed check goes back to the
|
|
189
|
+
orchestrator with the output; the work stays, and the fix goes to the next model.
|
|
190
|
+
- **`heartcode page <file|url>`**: the same check from your shell (exit 0 when it passes), with
|
|
191
|
+
desktop and phone screenshots in `.heartcode/page-shots/`. Workers run it on their own page before
|
|
192
|
+
they report.
|
|
193
|
+
- **The orchestrator learns from what happened**: every handoff goes into the model's record
|
|
194
|
+
(`~/.heart/model-stats.json`: check passed or failed, no answer, how long), and the orchestrator
|
|
195
|
+
sees each model's recent record and the past jobs most like the one in hand. Models with something
|
|
196
|
+
to show for themselves are listed first. A model much slower than your others is marked SLOW. Out
|
|
197
|
+
of quota doesn't count against a model.
|
|
198
|
+
- **Test skills** (Your models, and for selected rows): four small real jobs per model, each scored
|
|
199
|
+
by HeartCode, never by another model: a function against hidden tests, a small web app used in a
|
|
200
|
+
real browser on a desktop and a phone, a picture with known shapes to find and count, and a bug to
|
|
201
|
+
fix with HeartCode's own tools. Live in a dialog; each answer may take Tests wait × 6.
|
|
202
|
+
- **Skills and Jobs columns** on Your models: the Test skills scores as coloured chips, and the record
|
|
203
|
+
of real jobs (click to clear it), both sortable.
|
|
204
|
+
- **Test orchestrators** wants a check on the jobs that make something.
|
|
205
|
+
- **A built-in `design` skill**, loaded by the model before building an interface or a game: settle
|
|
206
|
+
the direction first, the five states of every screen, a small system of type, colour and space,
|
|
207
|
+
the defaults to refuse, games and 3D, and looking at the rendered page before calling it done.
|
|
208
|
+
From ideas in Impeccable (Apache-2.0), AI Web Design and User Flow Specs (MIT), written anew.
|
|
209
|
+
|
|
210
|
+
## 0.1.47 (2026-11-04)
|
|
211
|
+
|
|
212
|
+
- **Add to orchestrators / Remove from orchestrators** in place of Mark as orchestrators: add the
|
|
213
|
+
selected models after the ones you have (none twice), or take them out; the rest keep their order.
|
|
214
|
+
- **Test orchestrators, plainer**: one button beside Test all opens a dialog with a table, one row
|
|
215
|
+
per orchestrator and a column per scene (Hello, Small job, Big job, After a failure, Reports
|
|
216
|
+
back): ✓, ✗, the seconds it's been waiting, or ⏱ for no answer in time. What went wrong is one
|
|
217
|
+
line per orchestrator. Start / Test again is in the dialog, and closing it doesn't stop the test.
|
|
218
|
+
- **Each scene waits as long as Tests wait**, like the other model tests, not two minutes.
|
|
219
|
+
- **Your models, less cluttered**: a one-line intro, no list of orchestrator names above the table
|
|
220
|
+
(the table's orchestrator #1, #2… tags show them).
|
|
221
|
+
|
|
222
|
+
## 0.1.46 (2026-11-04)
|
|
223
|
+
|
|
224
|
+
- **The orchestrator chooses the model, sized to the job**: it always names the model (no silent
|
|
225
|
+
default to your #1), the smallest that will do the job well (a folder listing to a small model, a
|
|
226
|
+
real program to a strong one). When that model fails or is out of quota, it hears why and picks
|
|
227
|
+
another, instead of HeartCode going down your list to a big one. A model out of quota is refused
|
|
228
|
+
without a request, and `provider/model` or a short name (`gemini-3.5-flash` for
|
|
229
|
+
`models/gemini-3.5-flash`) works in a handoff.
|
|
230
|
+
- **One handoff at a time**: an orchestrator's handoffs run one after another, so the same job sent
|
|
231
|
+
twice finds the work done instead of overwriting it. A handoff with no prompt says exactly what's
|
|
232
|
+
missing.
|
|
233
|
+
- **Test orchestrators** (Your models): each orchestrator gets the same 5 short scenes (a hello, a
|
|
234
|
+
small job, a big job, another model after a failure, reporting finished work), checked on what it
|
|
235
|
+
does. A dialog shows it live: each scene's ✓ or ✗, what the model did, what it's waiting on. Then
|
|
236
|
+
they're put in order, the most passed first; Results shows the last run again. The table tags
|
|
237
|
+
them orchestrator #1, #2…, and their own order now decides which answers first.
|
|
238
|
+
- **Test all** names the models being tested now, not only their providers.
|
|
239
|
+
|
|
240
|
+
## 0.1.45 (2026-11-03)
|
|
241
|
+
|
|
242
|
+
- **Rate limits hand the work on**: a helper whose model answers 429 goes to your next model at
|
|
243
|
+
once, instead of waiting a minute and asking the same one again (and again). When the provider
|
|
244
|
+
says its quota is out for longer than a minute (Gemini: "retry in 13 hours"), HeartCode doesn't
|
|
245
|
+
wait at all, remembers it until then, tries that model last, and tells the orchestrator it's out
|
|
246
|
+
of quota so it picks another.
|
|
247
|
+
|
|
5
248
|
## 0.1.44 (2026-11-03)
|
|
6
249
|
|
|
7
250
|
- **Orchestrators first**: with Pick on "an orchestrator hands it out", the model shown (status bar,
|
package/README.md
CHANGED
|
@@ -2,90 +2,88 @@
|
|
|
2
2
|
|
|
3
3
|
# HeartCode
|
|
4
4
|
|
|
5
|
-
A coding agent for your terminal
|
|
5
|
+
A coding agent for your terminal. It works with any OpenAI-compatible model: free ones, paid
|
|
6
|
+
ones, local ones, several at once.
|
|
6
7
|
|
|
7
|
-
**Zero dependencies.**
|
|
8
|
-
|
|
9
|
-
what you can read.
|
|
8
|
+
**Zero dependencies.** Only Node.js (22 or newer) and HeartCode's own code. No `node_modules`, no
|
|
9
|
+
install scripts. What you install is what you can read.
|
|
10
10
|
|
|
11
11
|
<!-- image: HeartCode in the terminal, answering a message -->
|
|
12
12
|

|
|
13
13
|
|
|
14
14
|
## Why I made it
|
|
15
15
|
|
|
16
|
-
Not to compete with other coding CLIs. I made it for
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- **Set up in a web page**
|
|
53
|
-
- **
|
|
16
|
+
Not to compete with other coding CLIs. I made it for myself, because none of the ones I tried
|
|
17
|
+
did what I needed.
|
|
18
|
+
|
|
19
|
+
**Safety first.** A coding CLI runs with your files, your keys and your shell. Most pull in
|
|
20
|
+
hundreds of npm packages, and any of them can be hijacked to ship malware in an update. HeartCode
|
|
21
|
+
has none, so there's nothing for anyone to poison.
|
|
22
|
+
|
|
23
|
+
## What it does differently
|
|
24
|
+
|
|
25
|
+
**It keeps working when a model doesn't**
|
|
26
|
+
- Give it a list of models, from any providers (free ones too). When one hits a rate limit, goes
|
|
27
|
+
down or fails, the next one answers and the work goes on. A ↻ in the status bar shows it.
|
|
28
|
+
- When a conversation gets too long for a model, it moves to one of your models with more room
|
|
29
|
+
instead of summarizing things away.
|
|
30
|
+
- When a model goes round in circles, the next one takes over. Only you stop it (Esc).
|
|
31
|
+
|
|
32
|
+
**It works carefully**
|
|
33
|
+
- It asks what you want before it builds, reads the current docs before it uses something, and
|
|
34
|
+
makes a plan before it changes anything.
|
|
35
|
+
- It runs and tests what it changed before it says "done", and another of your models checks the
|
|
36
|
+
result against what you asked.
|
|
37
|
+
- It writes the least code that works and changes only what the task needs.
|
|
38
|
+
|
|
39
|
+
**It learns, per project**
|
|
40
|
+
- Every web page it reads is saved in `.heartcode/research/`.
|
|
41
|
+
- After a task, it saves what's worth knowing as notes (`.heartcode/memory/`) and deletes the junk
|
|
42
|
+
and throwaway files, in the background.
|
|
43
|
+
- A mistake it fixes becomes a lesson it won't repeat.
|
|
44
|
+
|
|
45
|
+
**It gets good work out of small and local models**
|
|
46
|
+
- Models that can't call tools are guided one simple question at a time.
|
|
47
|
+
- What each model can do comes from [models.dev](https://models.dev), so nothing is wasted
|
|
48
|
+
finding out.
|
|
49
|
+
- It sends only what's needed, and never sends `max_tokens`, so no reply is cut short.
|
|
50
|
+
|
|
51
|
+
**And the rest you'd expect**
|
|
52
|
+
- **Set up in a web page** (`/settings`), not by editing config files.
|
|
53
|
+
- **Skills, MCP servers and hooks** in Claude Code's formats; `/import` brings yours over.
|
|
54
|
+
- **Tabs** (`Alt+T`) and git worktrees, for work kept apart.
|
|
55
|
+
- **Servers in the background**: the model starts a dev server and keeps working. `Alt+B` shows
|
|
56
|
+
their logs live.
|
|
57
|
+
- **Telegram messages** when a task finishes, fails or waits for you.
|
|
58
|
+
- **Logs** of exactly what you choose (seven kinds, all off by default), readable on the settings page.
|
|
59
|
+
- **`heart -p`** runs one task without the screen, for other tools and AI agents, like `claude -p`
|
|
54
60
|
(see [SKILL.md](SKILL.md)).
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- **Takes skills, MCP servers and hooks** in Claude Code's formats; `/import` brings yours over.
|
|
59
|
-
- **Tells you when a newer version is out** (a check with npm each time it starts, in the status bar):
|
|
60
|
-
`/update` shows what changed and installs it the way you installed HeartCode. Switch it off in
|
|
61
|
-
`/settings` → General.
|
|
62
|
-
- **An orchestrator that hands work out**: with "Pick" set to "an orchestrator hands it out",
|
|
63
|
-
each message starts on a model you choose for that (a quick, cheap one is enough). It answers
|
|
64
|
-
at once when it can ("hi" needs no other model), and otherwise hands the work to whichever of
|
|
65
|
-
your models it thinks suits it. It knows what each one can do and where it stands in LMArena's
|
|
66
|
-
public rankings. Your models shows each model's Coding, Web apps and Vision scores.
|
|
67
|
-
- **Works with discipline by default**: its rules (from Karpathy's guidelines, Grill Me,
|
|
68
|
-
Superpowers, Ponytail and Caveman) have it ask before building, find a bug's root cause first,
|
|
69
|
-
write the least code that works, change only what the task needs, prove it before saying done,
|
|
70
|
-
then stop, and answer short. A skill with `use: always` adds rules of your own to every message.
|
|
71
|
-
- **Tabs** (`Alt+T`), each with its own conversation, and git worktrees for work kept apart.
|
|
72
|
-
- **Servers and watchers in the background**: the model starts one and goes on working, reads its
|
|
73
|
-
output when it needs to, and stops it. `Alt+B` (or `/background`) shows their logs live above the input,
|
|
74
|
-
a tab each (←/→ or a click switches), while you work; nothing outlives HeartCode.
|
|
75
|
-
- **`/context`**: what fills the context window, part by part (system prompt, tools, messages, tool
|
|
76
|
-
results) and the biggest single pieces.
|
|
77
|
-
|
|
78
|
-
## How I set it up and use it
|
|
61
|
+
- **`heartcode page index.html`** checks a web page in a real browser (errors, blank page, faint
|
|
62
|
+
text, missing icons) and saves desktop and phone screenshots.
|
|
63
|
+
- **`/context`** shows what fills the context window. `/update` installs a newer version.
|
|
79
64
|
|
|
80
|
-
|
|
65
|
+
## What happens when you ask it to make something
|
|
66
|
+
|
|
67
|
+
1. **It asks first.** If your request leaves something open (how it should look, how far to go,
|
|
68
|
+
whether to test it), it asks you, with its own suggestion first. Small fixes it just does.
|
|
69
|
+
2. **It reads up** on whatever it's about to use, instead of trusting its memory.
|
|
70
|
+
3. **It makes a plan**: a todo list you can see. It can't change a file before there's one.
|
|
71
|
+
4. **It does the work**: reading files, running commands, editing.
|
|
72
|
+
5. **It may split the work.** Your #1 model can hand a job to a helper, or run separate parts at
|
|
73
|
+
the same time, each on its own files. Helpers use your models in your order. The model decides.
|
|
74
|
+
6. **It checks before it says it's done**: it must have tested what it changed, finished its todo
|
|
75
|
+
list and made the files it names. Then your next models say yes or no; a no sends it back.
|
|
76
|
+
7. **It tidies up** in the background: saves notes for next time, removes throwaway files.
|
|
81
77
|
|
|
82
|
-
|
|
78
|
+
## How to set it up
|
|
79
|
+
|
|
80
|
+
### 1. Install
|
|
83
81
|
|
|
84
82
|
```sh
|
|
85
83
|
npm install -g heartcode
|
|
86
84
|
```
|
|
87
85
|
|
|
88
|
-
Or from source:
|
|
86
|
+
Or from source (a `git pull` then updates it):
|
|
89
87
|
|
|
90
88
|
```sh
|
|
91
89
|
git clone https://github.com/p32929/HeartCode.git
|
|
@@ -93,11 +91,7 @@ cd HeartCode
|
|
|
93
91
|
npm start
|
|
94
92
|
```
|
|
95
93
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
### 2. Run `heart`
|
|
99
|
-
|
|
100
|
-
In the project you want to work on:
|
|
94
|
+
### 2. Run `heart` in your project
|
|
101
95
|
|
|
102
96
|
```sh
|
|
103
97
|
cd ~/code/my-app
|
|
@@ -106,24 +100,20 @@ heart
|
|
|
106
100
|
|
|
107
101
|
### 3. Open the settings page
|
|
108
102
|
|
|
109
|
-
Type `/settings`. The
|
|
110
|
-
network
|
|
111
|
-
|
|
112
|
-
it has a secret key, and the page answers only to this machine's own addresses. A running
|
|
113
|
-
HeartCode picks up what you change right away.
|
|
103
|
+
Type `/settings`. The page opens in your browser. Its link also works from another device on your
|
|
104
|
+
network (handy when HeartCode runs on a server over SSH). Only that link works: it has a secret
|
|
105
|
+
key. A running HeartCode picks up your changes right away.
|
|
114
106
|
|
|
115
107
|
<!-- image: the settings page -->
|
|
116
108
|

|
|
117
109
|
|
|
118
|
-
|
|
110
|
+
What's in the sidebar:
|
|
119
111
|
|
|
120
|
-
- **Models**: *Your list* (the models HeartCode uses, in order) and *Providers* (where they
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
- **Skills**, **MCP servers** and **System prompt**: what HeartCode can do and how it's told.
|
|
126
|
-
- **Advanced**: *Logs* (seven kinds, each on or off, and a viewer) and *Files* (the rest of the settings, as files).
|
|
112
|
+
- **Models**: *Your list* (the models HeartCode uses, in order) and *Providers* (where they come from).
|
|
113
|
+
- **General**: what it may do without asking, colors, thinking effort, voice input, web search,
|
|
114
|
+
and the *Status bar* (drag and drop what it shows). **Notifications**: Telegram.
|
|
115
|
+
- **Skills**, **MCP servers** and **System prompt**: what HeartCode can do and what it's told.
|
|
116
|
+
- **Advanced**: *Logs* and *Files* (the rest of the settings, as files).
|
|
127
117
|
|
|
128
118
|
### 4. Add a provider and pick models
|
|
129
119
|
|
|
@@ -131,64 +121,93 @@ On **Models → Providers**:
|
|
|
131
121
|
|
|
132
122
|

|
|
133
123
|
|
|
134
|
-
1. **Add a provider**: its name, base URL and API key.
|
|
135
|
-
2. **
|
|
124
|
+
1. **Add a provider**: its name, base URL and API key. A preset fills in the URL.
|
|
125
|
+
2. **Pick models**: click a model to add it to your list. I use the free ones.
|
|
136
126
|
|
|
137
127
|
### 5. Put your list in order
|
|
138
128
|
|
|
139
129
|
On **Models → Your list**:
|
|
140
130
|
|
|
141
|
-
1. **Sort
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
- **
|
|
164
|
-
|
|
165
|
-
|
|
131
|
+
1. **Sort.** Click *Abilities*, then *Context*: the most capable models come first, the biggest
|
|
132
|
+
context window first among those. Click **Save order**.
|
|
133
|
+
2. **Drag rows** to fine-tune. #1 is the one HeartCode uses; the rest are its fallbacks, in order.
|
|
134
|
+
3. **Test** (optional): **Test all** sends each model a short message and shows which answer and
|
|
135
|
+
how fast (*Works?*). Sort by it to put the fastest first.
|
|
136
|
+
4. **Filter** (optional): by name, provider, test result, context, abilities or free. **Use only
|
|
137
|
+
these** keeps just the ones you see, in that order.
|
|
138
|
+
|
|
139
|
+
**Update model info** fetches what each model can do and costs (from models.dev) and its places in
|
|
140
|
+
LMArena's public rankings for coding, web apps and vision, as columns to sort by. A model *not
|
|
141
|
+
found* in models.dev: **Retry** looks it up again, or **Set up** tells HeartCode what it can do.
|
|
142
|
+
|
|
143
|
+
### 6. Recommended: let it see what it builds
|
|
144
|
+
|
|
145
|
+
Out of the box, HeartCode reads, writes and runs code. It can't see a page it made or click
|
|
146
|
+
through an app. These three fix that. They're optional, but you'll get much better results with
|
|
147
|
+
them, especially for anything with a screen.
|
|
148
|
+
|
|
149
|
+
**The design skill**: so the pages and apps it makes look right.
|
|
150
|
+
AI-made interfaces often look generic, crowded or broken. This skill gives the model a method
|
|
151
|
+
(understand the job, break the design down, take every size and color from one system, check it)
|
|
152
|
+
plus a theme, a starter page and guides for common components, in shadcn/ui's look.
|
|
153
|
+
- Install: **Skills** → paste `p32929/p32929_design_skill` in *Install a skill* → **Install**.
|
|
154
|
+
Or type `/install_skill p32929/p32929_design_skill` in HeartCode.
|
|
155
|
+
- The model loads it when a task is about how something looks. To have it in every message, set
|
|
156
|
+
*Who uses it* to *Always on*.
|
|
157
|
+
|
|
158
|
+
**Chrome DevTools MCP**: so it can check web pages in a real browser.
|
|
159
|
+
The model opens what it built in Chrome, clicks through it, reads the console errors and takes
|
|
160
|
+
screenshots, instead of guessing whether it works.
|
|
161
|
+
- Install: **MCP servers** → **+ Add a server** → paste `npx -y chrome-devtools-mcp@latest --isolated`
|
|
162
|
+
→ **Add server**. Its name (*chrome-devtools*) comes from the command.
|
|
163
|
+
- `--isolated` gives it a fresh browser profile each time, so it never touches your own Chrome.
|
|
164
|
+
Add `--headless` with the *+ flag* box to hide the window; untick a flag to turn it off.
|
|
165
|
+
- Needs Google Chrome installed.
|
|
166
|
+
|
|
167
|
+
**Computer use MCP**: so it can use apps outside the browser.
|
|
168
|
+
Screenshots, mouse, keyboard and apps on your computer: for testing a desktop app or a game, or
|
|
169
|
+
anything a browser can't reach.
|
|
170
|
+
- Install: **+ Add a server** → paste `npx -y @zavora-ai/computer-use-mcp@latest` → **Add server**.
|
|
171
|
+
Its name is *computer-use*.
|
|
172
|
+
- On macOS, give your terminal app **Accessibility** and **Screen Recording** access (System
|
|
173
|
+
Settings → Privacy & Security), and install the Xcode command line tools
|
|
174
|
+
(`xcode-select --install`).
|
|
175
|
+
- It can click anything on your screen. Switch it off in the list when you don't need it.
|
|
176
|
+
|
|
177
|
+
For screenshots to be useful, one of your models must be able to see images. If #1 can't, it
|
|
178
|
+
hands the looking to the first of your models that can.
|
|
179
|
+
|
|
180
|
+
**Also useful:**
|
|
181
|
+
- **Notifications**: a Telegram message when a task finishes, fails or waits for you. Make a bot with
|
|
182
|
+
[@BotFather](https://t.me/BotFather), paste its token, press Start in the bot; HeartCode finds your chat.
|
|
183
|
+
- **Advanced → Logs**: switch on only the kinds you need and read them there (by run, searched,
|
|
184
|
+
live). Logs older than 3 days are deleted.
|
|
166
185
|
|
|
167
186
|
### 7. Back to HeartCode
|
|
168
187
|
|
|
169
|
-
Go back to the terminal. While the settings page is on, HeartCode shows a dialog and waits.
|
|
170
|
-
|
|
188
|
+
Go back to the terminal. While the settings page is on, HeartCode shows a dialog and waits. Your
|
|
189
|
+
changes are already in.
|
|
171
190
|
|
|
172
191
|
### 8. Press Enter to stop the settings page
|
|
173
192
|
|
|
174
|
-
**Turn off** is selected: press Enter.
|
|
193
|
+
**Turn off** is selected: press Enter.
|
|
175
194
|
|
|
176
195
|
<!-- image: the "settings page is on" dialog -->
|
|
177
196
|

|
|
178
197
|
|
|
179
198
|
### 9. Send "Hi" as a test
|
|
180
199
|
|
|
181
|
-
Type `Hi` and press Enter.
|
|
200
|
+
Type `Hi` and press Enter. A reply means your model works.
|
|
182
201
|
|
|
183
202
|
### 10. Start using it
|
|
184
203
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
commands
|
|
191
|
-
|
|
204
|
+
Ask it to read, change, run and fix things in your project, like any coding agent.
|
|
205
|
+
|
|
206
|
+
- `/` shows every command; `heart --help` lists the rest.
|
|
207
|
+
- `Shift+Tab` changes what it may do without asking.
|
|
208
|
+
- `Esc` stops it, or closes a dialog.
|
|
209
|
+
- While it works, commands that don't change the conversation (`/help`, `/cost`, `/diff`,
|
|
210
|
+
`/settings`…) run at once; the ones that do (`/compact`, `/rewind`…) wait until it's done.
|
|
192
211
|
|
|
193
212
|
## Thanks
|
|
194
213
|
|
|
@@ -198,7 +217,9 @@ models: sending a "no, do this instead" as your own message, counting code's tok
|
|
|
198
217
|
keeping the provider's prompt cache, checking what uses a changed function, saving what the model
|
|
199
218
|
found before compacting), [OpenCode](https://github.com/anomalyco/opencode),
|
|
200
219
|
[Cline](https://github.com/cline/cline), [OpenClaw](https://github.com/openclaw/openclaw) and
|
|
201
|
-
[Pi](https://github.com/earendil-works/pi), for the many use cases like these they showed me.
|
|
220
|
+
[Pi](https://github.com/earendil-works/pi), for the many use cases like these they showed me. Its
|
|
221
|
+
working rules (ask before building, root cause first, the least code that works, prove it, answer
|
|
222
|
+
short) come from Karpathy's guidelines, Grill Me, Superpowers, Ponytail and Caveman.
|
|
202
223
|
|
|
203
224
|
## License
|
|
204
225
|
|