docs: update README with new flags, examples, and dependencies
This commit is contained in:
parent
0ed6a23334
commit
7441a9fc19
1 changed files with 18 additions and 14 deletions
22
README.md
22
README.md
|
|
@ -8,7 +8,7 @@ A Bun-based CLI tool for LLM chats with terminal native streaming.
|
||||||
- **Conversation persistence** — chat history saved to JSON
|
- **Conversation persistence** — chat history saved to JSON
|
||||||
- **Model configuration** — persist model preferences to JSON
|
- **Model configuration** — persist model preferences to JSON
|
||||||
- **Reasoning display** — thinking tokens rendered _in style_ on stderr
|
- **Reasoning display** — thinking tokens rendered _in style_ on stderr
|
||||||
- **Usage stats** — input/output tokens and elapsed time after each response
|
- **Usage stats** — input/output tokens and tokens/sec rate after each response
|
||||||
- **TTY-aware** — automatically disables markdown rendering when output is piped
|
- **TTY-aware** — automatically disables markdown rendering when output is piped
|
||||||
- **Text-to-speech** — `ttsc` sub-command for streaming TTS via Kokoro model
|
- **Text-to-speech** — `ttsc` sub-command for streaming TTS via Kokoro model
|
||||||
|
|
||||||
|
|
@ -39,21 +39,21 @@ lmc [options] <prompt...>
|
||||||
```
|
```
|
||||||
|
|
||||||
| Flag | Short | Type | Description |
|
| Flag | Short | Type | Description |
|
||||||
| ------------ | ----- | ------- | ------------------------------------------------- |
|
| ------------ | ----- | ------- | ----------------------------------------------------- |
|
||||||
| `--new` | `-n` | boolean | Start a new conversation (clear history) |
|
| `--new` | `-n` | boolean | Start a new conversation (clear history) |
|
||||||
| `--model` | `-m` | string | Set model name for this session |
|
| `--model` | `-m` | string | Set model name for this session |
|
||||||
| `--save` | `-s` | boolean | Save the specified model (--model) as the default |
|
| `--config` | `-c` | boolean | Initialize a new config file (`~/.lmc_config.json`) |
|
||||||
| `--plain` | — | boolean | Disable markdown rendering (plain text output) |
|
| `--plain` | — | boolean | Disable markdown rendering for both stdout and stderr |
|
||||||
| `--plainOut` | — | boolean | Disable markdown rendering for stdout only |
|
| `--plainOut` | — | boolean | Disable markdown rendering for stdout only |
|
||||||
| `--plainErr` | — | boolean | Disable markdown rendering for stderr only |
|
| `--plainErr` | — | boolean | Disable markdown rendering for stderr only |
|
||||||
|
|
||||||
**Examples:**
|
**Examples:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
lmc --config # Initialize/edit config
|
||||||
lmc --new "Introduce yourself." # New conversation
|
lmc --new "Introduce yourself." # New conversation
|
||||||
lmc "What is TypeScript?" # Continue most recent chat
|
lmc "What is TypeScript?" # Continue most recent chat
|
||||||
lmc -m llama3 "Explain quantum computing" # Chat with specific model
|
lmc -m llama3 "Explain quantum computing" # Chat with specific model on-the-fly
|
||||||
lmc --model llama3 --save # Set default model
|
|
||||||
lmc --plain "Plain text output" # No markdown rendering
|
lmc --plain "Plain text output" # No markdown rendering
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -66,12 +66,14 @@ echo "text" | ttsc [options]
|
||||||
| Flag | Short | Type | Description |
|
| Flag | Short | Type | Description |
|
||||||
| -------- | ----- | ------- | -------------------------------------------------------- |
|
| -------- | ----- | ------- | -------------------------------------------------------- |
|
||||||
| `--wait` | `-w` | boolean | Wait for all processing before exiting (don't auto-play) |
|
| `--wait` | `-w` | boolean | Wait for all processing before exiting (don't auto-play) |
|
||||||
|
| `--url` | `-u` | boolean | Fetch text from a URL instead of stdin |
|
||||||
|
|
||||||
**Examples:**
|
**Examples:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
echo "Hello, world!" | ttsc
|
echo "Hello, world!" | ttsc
|
||||||
echo "Read this aloud" | ttsc --wait
|
echo "Read this aloud" | ttsc --wait
|
||||||
|
echo "https://example.com" | ttsc --url
|
||||||
```
|
```
|
||||||
|
|
||||||
Requires: [uv](https://docs.astral.sh/uv/)
|
Requires: [uv](https://docs.astral.sh/uv/)
|
||||||
|
|
@ -113,8 +115,10 @@ out/ — Bundled output (index.js, tts.js)
|
||||||
| Package | Purpose |
|
| Package | Purpose |
|
||||||
| --------------------------- | ----------------------------------------- |
|
| --------------------------- | ----------------------------------------- |
|
||||||
| `ai` (Vercel AI SDK) | Streaming text/usage |
|
| `ai` (Vercel AI SDK) | Streaming text/usage |
|
||||||
| `@ai-sdk/openai-compatible` | OpenAI-compatible API client |
|
| `@clack/prompts` | Interactive prompts and spinner |
|
||||||
| `shiki` | Syntax highlighting (kanagawa-wave theme) |
|
| `@cliffy/table` | ASCII table rendering |
|
||||||
| `cli-table3` | ASCII table rendering |
|
| `@mozilla/readability` | HTML-to-text extraction (ttsc) |
|
||||||
| `chalk` | Terminal string styling |
|
| `chalk` | Terminal string styling |
|
||||||
|
| `happy-dom` | DOM parsing for URLs (ttsc) |
|
||||||
|
| `shiki` | Syntax highlighting (kanagawa-wave theme) |
|
||||||
| `terminal-link` | Clickable terminal hyperlinks |
|
| `terminal-link` | Clickable terminal hyperlinks |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue