docs: update AGENTS.md to reflect Node.js/pnpm migration
This commit is contained in:
parent
e2253b912d
commit
d157978d52
1 changed files with 18 additions and 8 deletions
26
AGENTS.md
26
AGENTS.md
|
|
@ -1,26 +1,36 @@
|
||||||
# lmc
|
# lmc
|
||||||
|
|
||||||
Bun CLI tool for streaming LLM chat with inline markdown rendering.
|
TypeScript CLI tool for streaming LLM chat with inline markdown rendering.
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
```
|
```
|
||||||
bun run dev # dev run
|
pnpm run dev # dev run (rolldown bundle + node)
|
||||||
bun run prod # run bundled output
|
pnpm run check # biome lint + format + organize imports + typecheck
|
||||||
bun run check # biome lint + format + organize imports
|
pnpm run build # check + bundle index.ts and tts.ts (minified ESM)
|
||||||
|
pnpm run build:bin # check + bundle with esbuild (CJS) + build SEA binaries
|
||||||
|
pnpm run clean # remove dist/
|
||||||
```
|
```
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
- `index.ts` — CLI entry point, orchestration
|
- `src/index.ts` — LMC CLI entry point, orchestration
|
||||||
|
- `src/tts.ts` — TTSC CLI entry point (text-to-speech, Kokoro pipeline via `uv run`)
|
||||||
|
- `src/config.ts` — `initConfig()`, `loadConfig()`: manages `~/.lmc_config.json`
|
||||||
|
- `src/conversation.ts` — `Conversation` class: load/save to `~/.lmc_convo.json`
|
||||||
|
- `src/errors.ts` — `handleTopLevel()`: TTY-aware error wrapping
|
||||||
|
- `src/prompts.ts` — `commitDiff()`, `reviewFile()`, `reviewDiff()`, `file()`: prompt builders
|
||||||
- `src/render/index.ts` — `Renderer` class: streams LLM response, buffers markdown, renders to stdout/stderr
|
- `src/render/index.ts` — `Renderer` class: streams LLM response, buffers markdown, renders to stdout/stderr
|
||||||
- `src/render/markdown.ts` — `renderMarkdown()`: syntax-highlighted markdown via `@comark/ansi` + Shiki
|
- `src/render/markdown.ts` — `renderMarkdown()`: markdown via `marked` + Shiki + `@cliffy/table`
|
||||||
|
- `src/render/codeToANSI.ts` — Shiki token output to ANSI escape sequences
|
||||||
|
|
||||||
## Gotchas
|
## Gotchas
|
||||||
|
|
||||||
- **Bun only** — not Node. Use `Bun.file()`, `Bun.argv`, `Bun.sleep()`.
|
- **Node.js** — Use modern Node APIs (`node:fs/promises`, `node:stream/consumers`, etc.).
|
||||||
- **No tests** — none exist.
|
- **No tests** — none exist.
|
||||||
- **Biome config**: double quotes, space indent, auto-import-organize on. Run `bun run check` before committing.
|
- **Biome config**: double quotes, space indent, auto-import-organize on. `pnpm run check` also runs `tsc --noEmit`.
|
||||||
|
- **Build tools**: rolldown for ESM bundles, esbuild for CJS binaries, `node --build-sea` for SEA single-executable apps.
|
||||||
|
- **TTS**: requires Python with `uv` — Kokoro pipeline lives in `tts/`.
|
||||||
|
|
||||||
## Style
|
## Style
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue