diff --git a/README.md b/README.md index 981bddb..d8ddfa9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # lmc -A Bun-based CLI tool for LLM chats with terminal native streaming. +A CLI tool for LLM chats with terminal native streaming. ## Features @@ -14,15 +14,20 @@ A Bun-based CLI tool for LLM chats with terminal native streaming. ## Requirements -- [Bun](https://bun.com) v1.3+ +- [pnpm](https://pnpm.io) v11+ +- [Node.js](https://nodejs.org) v22+ - [uv](https://docs.astral.sh/uv/) — only for `ttsc` (text-to-speech) ## Installation ```bash -bun install -bun build:js -bun link +# Bundle and install locally +pnpm build +pnpm add --global . + +# Build a single-file exe +pnpm build:bin +cp dist/lmc dist/ttsc /somewhere/bin/ # For ttsc only cp -r tts ~/.ttsc @@ -67,6 +72,7 @@ echo "text" | ttsc [options] | -------- | ----- | ------- | -------------------------------------------------------- | | `--wait` | `-w` | boolean | Wait for all processing before exiting (don't auto-play) | | `--url` | `-u` | boolean | Fetch text from a URL instead of stdin | +| `--edit` | `-e` | boolean | Edit the input with your $EDITOR before processing | **Examples:** @@ -86,9 +92,8 @@ Wants: ## Development ```bash -bun run dev # dev run -bun run prod # run bundled output -bun run check # biome lint + format + organize imports +pnpm run dev # dev run +pnpm run check # biome lint + format + organize imports ``` ## Architecture @@ -97,7 +102,7 @@ bun run check # biome lint + format + organize imports index.ts — LMC entry point, orchestration tts.ts — TTSC entry point, orchestration src/render/index.ts — Renderer class: streams LLM response, buffers markdown -src/render/markdown.ts — renderMarkdown(): syntax-highlighted markdown via Bun.markdown + Shiki +src/render/markdown.ts — renderMarkdown(): syntax-highlighted markdown via Marked + Shiki src/conversation/ — Conversation persistence src/config/ — App config persistence tts/ — TTS python stub (Kokoro pipeline) @@ -112,13 +117,14 @@ out/ — Bundled output (index.js, tts.js) ## Dependencies -| Package | Purpose | -| --------------------------- | ----------------------------------------- | -| `ai` (Vercel AI SDK) | Streaming text/usage | -| `@clack/prompts` | Interactive prompts and spinner | -| `@cliffy/table` | ASCII table rendering | -| `@mozilla/readability` | HTML-to-text extraction (ttsc) | -| `chalk` | Terminal string styling | -| `happy-dom` | DOM parsing for URLs (ttsc) | -| `shiki` | Syntax highlighting (kanagawa-wave theme) | -| `terminal-link` | Clickable terminal hyperlinks | +| Package | Purpose | +| ---------------------- | ------------------------------- | +| `ai` (Vercel AI SDK) | Streaming text/usage | +| `@clack/prompts` | Interactive prompts and spinner | +| `@cliffy/table` | ASCII table rendering | +| `@mozilla/readability` | HTML-to-text extraction (ttsc) | +| `chalk` | Terminal string styling | +| `happy-dom` | DOM parsing for URLs (ttsc) | +| `shiki` | Syntax highlighting | +| `terminal-link` | Clickable terminal hyperlinks | +| `marked` | Markdown parsing |