little-coder 1.3.0 → 1.4.0
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/.pi/extensions/branding/index.ts +80 -0
- package/.pi/settings.json +1 -0
- package/CHANGELOG.md +19 -0
- package/README.md +5 -2
- package/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { ExtensionAPI, Theme } from "@mariozechner/pi-coding-agent";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { basename, dirname, join } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
// Replace pi's built-in startup header + terminal title with little-coder
|
|
7
|
+
// branding. The interactive TUI's "pi vX.Y.Z" logo, the "Pi can explain its
|
|
8
|
+
// own features..." onboarding line, and the "π - <cwd>" terminal title all
|
|
9
|
+
// come from pi's APP_NAME / built-in header; this extension swaps them for
|
|
10
|
+
// little-coder's own identity using the public ExtensionUIContext hooks.
|
|
11
|
+
//
|
|
12
|
+
// Pairs with `.pi/settings.json` setting `"quietStartup": true`, which
|
|
13
|
+
// suppresses pi's built-in header AND the loaded-resources dump (the long
|
|
14
|
+
// list of extension paths, skills, prompts, themes that used to flood the
|
|
15
|
+
// screen on launch). Power users can still run `little-coder --verbose` to
|
|
16
|
+
// override quietStartup and see the resource list.
|
|
17
|
+
//
|
|
18
|
+
// Implementation pattern follows the bundled pi example at
|
|
19
|
+
// `node_modules/@mariozechner/pi-coding-agent/examples/extensions/custom-header.ts` —
|
|
20
|
+
// the factory returns a duck-typed Component (`render(width): string[]` +
|
|
21
|
+
// `invalidate()`), so no deep imports from pi-tui are needed.
|
|
22
|
+
|
|
23
|
+
const TAGLINE = "A coding agent tuned for small local models";
|
|
24
|
+
|
|
25
|
+
function readVersion(): string {
|
|
26
|
+
// .pi/extensions/branding/index.ts → up 3 → package root (where package.json lives).
|
|
27
|
+
// The same path math works in the local checkout (loaded via tsx) and in the
|
|
28
|
+
// installed npm package layout (node_modules/little-coder/.pi/extensions/branding/).
|
|
29
|
+
try {
|
|
30
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
31
|
+
const pkgPath = join(here, "..", "..", "..", "package.json");
|
|
32
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
33
|
+
if (typeof pkg?.version === "string" && pkg.version.length > 0) return pkg.version;
|
|
34
|
+
} catch {
|
|
35
|
+
// best-effort; fall through
|
|
36
|
+
}
|
|
37
|
+
return "0.0.0";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const VERSION = readVersion();
|
|
41
|
+
|
|
42
|
+
function buildHeader(theme: Theme): string[] {
|
|
43
|
+
const logo =
|
|
44
|
+
theme.bold(theme.fg("accent", "little-coder")) +
|
|
45
|
+
theme.fg("dim", ` v${VERSION}`);
|
|
46
|
+
const tagline = theme.fg("muted", TAGLINE);
|
|
47
|
+
const dim = (s: string) => theme.fg("dim", s);
|
|
48
|
+
const sep = theme.fg("muted", " · ");
|
|
49
|
+
const hints = [
|
|
50
|
+
`${dim("esc")} interrupt`,
|
|
51
|
+
`${dim("ctrl-l/ctrl-c")} clear/exit`,
|
|
52
|
+
`${dim("/")} commands`,
|
|
53
|
+
`${dim("!")} bash`,
|
|
54
|
+
`${dim("ctrl-r")} more`,
|
|
55
|
+
].join(sep);
|
|
56
|
+
return ["", logo, tagline, "", hints, ""];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function setTitleForCwd(setTitle: (t: string) => void, cwd: string): void {
|
|
60
|
+
setTitle(`little-coder - ${basename(cwd)}`);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export default function (pi: ExtensionAPI) {
|
|
64
|
+
// session_start fires on initial load AND on every session switch,
|
|
65
|
+
// so registering once covers both. Pi's own updateTerminalTitle() runs
|
|
66
|
+
// during init/switch, so re-asserting our title here is what keeps
|
|
67
|
+
// "π - <cwd>" from sneaking back in.
|
|
68
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
69
|
+
if (!ctx.hasUI) return;
|
|
70
|
+
|
|
71
|
+
ctx.ui.setHeader((_tui, theme) => ({
|
|
72
|
+
render(_width: number): string[] {
|
|
73
|
+
return buildHeader(theme);
|
|
74
|
+
},
|
|
75
|
+
invalidate() {},
|
|
76
|
+
}));
|
|
77
|
+
|
|
78
|
+
setTitleForCwd(ctx.ui.setTitle.bind(ctx.ui), ctx.cwd);
|
|
79
|
+
});
|
|
80
|
+
}
|
package/.pi/settings.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to little-coder are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and little-coder's public interface (CLI, providers, tools, skills) follows semver starting at `v0.0.1` post-rename.
|
|
4
4
|
|
|
5
|
+
## [v1.4.0] — 2026-05-16
|
|
6
|
+
|
|
7
|
+
Startup UI rebrand. The TUI's opening frame now reads as **little-coder**, not as pi. Pi remains the substrate; the chrome above it just stops pretending it's the product.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- **New `.pi/extensions/branding/` extension.** Calls `pi.ui.setHeader()` and `pi.ui.setTitle()` on every `session_start` event to install a little-coder banner: `little-coder vX.Y.Z` (logo) + `A coding agent tuned for small local models` (tagline, verbatim from the README opening line) + a compact keybinding-hint row. The terminal title goes from `π - <cwd>` to `little-coder - <cwd>`. Implementation pattern follows pi's bundled `examples/extensions/custom-header.ts` — the factory returns a duck-typed Component (`render(width): string[]`), so no deep imports of pi-tui internals are required.
|
|
11
|
+
- **Startup screenshot in README.** A real `docs/assets/startup.svg` captured from a live `little-coder` startup, rendered via [charm.sh `freeze`](https://github.com/charmbracelet/freeze). Embedded near the top of the README so the first thing a visitor sees is the actual product, not a description of it.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- **`.pi/settings.json` now ships `"quietStartup": true`.** This is what suppresses pi's built-in loaded-resources block — the long list of extension paths, skills, prompts, themes that previously flooded the screen on every launch. Power users who want the inventory back can pass `little-coder --verbose`, which sets pi's `verbose: true` and overrides `quietStartup`.
|
|
15
|
+
- **Pi's "Pi can explain its own features..." onboarding string is gone.** The branding extension's `setHeader` replaces pi's built-in header entirely, so the line never renders.
|
|
16
|
+
|
|
17
|
+
### Notes for upgraders
|
|
18
|
+
- No API, settings, or skill-pack breaks. CLI flags unchanged.
|
|
19
|
+
- If you'd customized pi's startup output via your own `models.json` / `.pi/settings.json` override, your changes still apply — the only new top-level key in shipped `.pi/settings.json` is `quietStartup`, and pi's override semantics preserve per-key user values.
|
|
20
|
+
- To restore the original pi-style startup (the `pi vX.Y.Z` logo and the loaded-resources list), run `little-coder --verbose`. There's no way to disable the branding extension from the user side short of editing the installed package, but the rebrand is purely the startup frame — no functional difference.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
5
24
|
## [v1.3.0] — 2026-05-16
|
|
6
25
|
|
|
7
26
|
First functional release of Phase 2 (iterative improvement on real-world coding tasks). Three concrete sharp edges that surfaced while actually using the Mac → Linux LAN setup, plus a quality-of-life cleanup on the pi update banner. Minor version bump because three of the four changes are new behavior, all backwards-compatible.
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
**A coding agent tuned for small local models, built on top of [pi](https://pi.dev).**
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+
|
|
5
7
|
The research story behind all this — why scaffold–model fit matters, how a 9.7 B Qwen beat frontier entries on Aider Polyglot, and what the load-bearing mechanisms actually do — is written up on Substack: **[*Honey, I Shrunk the Coding Agent*](https://open.substack.com/pub/itayinbarr/p/honey-i-shrunk-the-coding-agent)**. Start there if you want the "why"; stay here for the "how".
|
|
6
8
|
|
|
7
9
|
## How it relates to pi
|
|
@@ -290,9 +292,10 @@ The benchmarks harness (`benchmarks/`) is dev-only and not shipped with the npm
|
|
|
290
292
|
little-coder/
|
|
291
293
|
├── .pi/
|
|
292
294
|
│ ├── settings.json # per-model profiles + benchmark_overrides (terminal_bench, gaia)
|
|
293
|
-
│ └── extensions/ #
|
|
295
|
+
│ └── extensions/ # 21 TypeScript extensions, auto-discovered by pi
|
|
296
|
+
│ ├── branding/ # little-coder startup header + terminal title (replaces pi's built-in)
|
|
294
297
|
│ ├── llama-cpp-provider/ # data-driven provider registration from models.json — ships llamacpp, ollama, lmstudio (+ user override file)
|
|
295
|
-
│ ├── write-guard/ # Write refuses on existing files
|
|
298
|
+
│ ├── write-guard/ # Write refuses on existing files; rewrites root-bare /foo.md paths to cwd
|
|
296
299
|
│ ├── extra-tools/ # glob, webfetch, websearch (pi ships grep/find)
|
|
297
300
|
│ ├── skill-inject/ # per-turn tool-skill selection (error > recency > intent)
|
|
298
301
|
│ ├── knowledge-inject/ # algorithm cheat-sheet scoring (word=1.0, bigram=2.0, threshold=2.0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "little-coder",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "A pi-based coding agent optimized for small local language models. Reproduces the whitepaper's scaffold-model-fit adaptations as pi extensions.",
|
|
5
5
|
"homepage": "https://github.com/itayinbarr/little-coder",
|
|
6
6
|
"repository": {
|