Skip to content

Commit 75e5acd

Browse files
committed
Add latest features Support for Standard Input & No Persistence options
1 parent ab75621 commit 75e5acd

File tree

3 files changed

+198
-2
lines changed

3 files changed

+198
-2
lines changed

app/(home)/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ export default function HomePage() {
6262
</a>
6363
</div>
6464
<p className="text-sm text-muted-foreground">
65-
<span className="text-slate-400 dark:text-slate-500">Feb 9, 2026</span>
65+
<span className="text-slate-400 dark:text-slate-500">Feb 15, 2026</span>
6666
{' - '}
6767
<Link href="/docs/latest" className="text-blue-600 dark:text-blue-400 hover:underline">
68-
Custom User and Agent Avatars
68+
Support for Standard Input & No Persistence options
6969
</Link>
7070
</p>
7171

content/docs/features/cli.mdx

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,85 @@ llms --chat request.json
263263
llms --chat request.json "Override prompt"
264264
```
265265

266+
### Standard Input
267+
268+
`llms` now accepts [OpenAI-compatible Chat Completion requests](https://platform.openai.com/docs/api-reference/chat/create) via standard input, making it easy to integrate into shell pipelines and scripts.
269+
270+
When JSON is piped in, `llms` detects it automatically — no extra flags needed:
271+
272+
```bash
273+
cat request.json | llms
274+
```
275+
276+
Build requests inline with a heredoc:
277+
278+
```bash
279+
llms <<EOF
280+
{
281+
"model": "Minimax M2.5",
282+
"messages": [
283+
{ "role": "user", "content": "Capital of France?" }
284+
]
285+
}
286+
EOF
287+
```
288+
289+
Combine with other CLI tools to generate requests dynamically:
290+
291+
```bash
292+
echo '{"messages":[{"role":"user","content":"Summarize:'"$(cat notes.txt)"'"}]}' | llms
293+
```
294+
295+
Combine with other CLI tools to generate requests dynamically:
296+
297+
```bash
298+
echo '{"messages":[{"role":"user","content":"Summarize:'"$(cat notes.txt)"'"}]}' | llms
299+
```
300+
301+
This pairs well with structured outputs support and `jq` to build end-to-end JSON pipelines:
302+
303+
```bash
304+
(llms <<EOF
305+
{
306+
"model": "moonshotai/kimi-k2-instruct",
307+
"messages": [{"role":"user", "content":"Return capital cities for: France, Italy, Spain, Japan." }],
308+
"response_format": {
309+
"type": "json_schema",
310+
"json_schema": {
311+
"name": "country_capitals",
312+
"schema": {
313+
"type": "object",
314+
"properties": {
315+
"capitals": {
316+
"type": "array",
317+
"items": {
318+
"type": "object",
319+
"properties": {
320+
"country": { "type": "string" },
321+
"capital": { "type": "string" }
322+
},
323+
"required": ["country","capital"]
324+
}
325+
}
326+
},
327+
"required": ["capitals"]
328+
}
329+
}
330+
}
331+
}
332+
EOF
333+
) | jq -r '.capitals[] | "\(.country): \(.capital)"'
334+
```
335+
336+
Output:
337+
338+
```
339+
France: Paris
340+
Italy: Rome
341+
Spain: Madrid
342+
Japan: Tokyo
343+
```
344+
266345
### Request Options
267346

268347
#### `--args PARAMS`
@@ -446,6 +525,27 @@ llms --remove
446525
llms --remove fast_mcp
447526
```
448527

528+
### Persistence Options
529+
530+
By default, all chat completions are saved to the database, including both the chat thread (conversation history) and the individual API request logs.
531+
Use these options to control what gets saved to the database:
532+
533+
#### `--nohistory`
534+
535+
Skip saving the **chat thread** (conversation history) to the database. The individual API **request log** is still recorded.
536+
537+
```sh
538+
llms "What is the capital of France?" --nohistory
539+
```
540+
541+
#### `--nostore`
542+
543+
Do not save **anything** to the database - no request log and no chat thread history. Implies `--nohistory`.
544+
545+
```sh
546+
llms "What is the capital of France?" --nostore
547+
```
548+
449549
### Help
450550

451551
#### `-h, --help`

content/docs/latest.mdx

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,102 @@ title: Latest Features
33
description: Latest features and updates in llms.py
44
---
55

6+
## Feb 15, 2026
7+
8+
### Standard Input
9+
10+
`llms` now accepts [OpenAI-compatible Chat Completion requests](https://platform.openai.com/docs/api-reference/chat/create) via standard input, making it easy to integrate into shell pipelines and scripts.
11+
12+
When JSON is piped in, `llms` detects it automatically — no extra flags needed:
13+
14+
```bash
15+
cat request.json | llms
16+
```
17+
18+
Build requests inline with a heredoc:
19+
20+
```bash
21+
llms <<EOF
22+
{
23+
"model": "Minimax M2.5",
24+
"messages": [
25+
{ "role": "user", "content": "Capital of France?" }
26+
]
27+
}
28+
EOF
29+
```
30+
31+
Combine with other CLI tools to generate requests dynamically:
32+
33+
```bash
34+
echo '{"messages":[{"role":"user","content":"Summarize:'"$(cat notes.txt)"'"}]}' | llms
35+
```
36+
37+
This pairs well with structured outputs support and `jq` to build end-to-end JSON pipelines:
38+
39+
```bash
40+
(llms <<EOF
41+
{
42+
"model": "moonshotai/kimi-k2-instruct",
43+
"messages": [{"role":"user", "content":"Return capital cities for: France, Italy, Spain, Japan." }],
44+
"response_format": {
45+
"type": "json_schema",
46+
"json_schema": {
47+
"name": "country_capitals",
48+
"schema": {
49+
"type": "object",
50+
"properties": {
51+
"capitals": {
52+
"type": "array",
53+
"items": {
54+
"type": "object",
55+
"properties": {
56+
"country": { "type": "string" },
57+
"capital": { "type": "string" }
58+
},
59+
"required": ["country","capital"]
60+
}
61+
}
62+
},
63+
"required": ["capitals"]
64+
}
65+
}
66+
}
67+
}
68+
EOF
69+
) | jq -r '.capitals[] | "\(.country): \(.capital)"'
70+
```
71+
72+
Output:
73+
74+
```
75+
France: Paris
76+
Italy: Rome
77+
Spain: Madrid
78+
Japan: Tokyo
79+
```
80+
81+
### Persistence Options
82+
83+
By default, all chat completions are saved to the database, including both the chat thread (conversation history) and the individual API request logs.
84+
Use these options to control what gets saved to the database:
85+
86+
#### `--nohistory`
87+
88+
Skip saving the **chat thread** (conversation history) to the database. The individual API **request log** is still recorded.
89+
90+
```sh
91+
llms "What is the capital of France?" --nohistory
92+
```
93+
94+
#### `--nostore`
95+
96+
Do not save **anything** to the database - no request log and no chat thread history. Implies `--nohistory`.
97+
98+
```sh
99+
llms "What is the capital of France?" --nostore
100+
```
101+
6102
## Feb 9, 2026
7103

8104
### Custom User and Agent Avatars

0 commit comments

Comments
 (0)