From 0975f2c2d737a84c715eeb920e9f6ba104cf4ee1 Mon Sep 17 00:00:00 2001 From: leemour Date: Thu, 15 Oct 2026 02:39:42 +0200 Subject: [PATCH] docs(search): trim output with --json=, as measured --brief changed nothing in tg and --jsonl is no smaller; --json= cut answers 31-64% (cli-testing#72). Co-Authored-By: Claude Opus 5.5 (1M context) --- content/docs/search-efficiently.es.md | 9 +++++---- content/docs/search-efficiently.md | 9 +++++---- content/docs/search-efficiently.ru.md | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/content/docs/search-efficiently.es.md b/content/docs/search-efficiently.es.md index e896fd92..45a898c4 100644 --- a/content/docs/search-efficiently.es.md +++ b/content/docs/search-efficiently.es.md @@ -90,8 +90,9 @@ La respuesta indica si hay más resultados (`has_more`). Eso describe la página ## Mantén la salida corta - `--limit ` limita los resultados. -- `--brief` muestra cada mensaje encontrado como referencia, hora, remitente y extracto. Revisa con él y luego abre un resultado. -- `--json=ref` conserva solo los campos que nombras. `--jsonl` imprime un resultado por línea. `--full` devuelve los textos completos. +- `--json=` conserva solo los campos que nombras, por ejemplo `--json=ref,date,text`. Es la única opción + que reduce cualquier respuesta: entre un 31% y un 64% menos que `--json` completo en [nuestra medición](https://github.com/WireCatLabs/cli-testing/tree/main/performance/agents/output-size). +- `--jsonl` imprime un resultado por línea. No es más corto que `--json`. `--full` devuelve los textos completos. - `--max-output-bytes` limita por defecto la salida automática a 4 MiB. Un resultado que supera el límite falla de forma visible en lugar de recortarse. - `--context ` añade `n` mensajes vecinos a cada lado de un resultado. Vale 0 cuando la salida no es un terminal. @@ -114,8 +115,8 @@ Sustituye los nombres por los tuyos. | --- | --- | | Un acuerdo y su fuente | `tg personal search messages 'chat:"Book club" agreed date>=2026-10-01' --limit 5` | | Todo sobre una persona este mes | `tg personal contacts timeline "Kai Sample" --since-time 2026-10-01` | -| Dónde aparece un número de teléfono | `tg personal search messages 'phone:"+1 555 010 0100"' --brief` | -| Archivos enviados a un chat la semana pasada | `tg personal search messages 'chat:"Book club" has:file date>=2026-10-07' --brief` | +| Dónde aparece un número de teléfono | `tg personal search messages 'phone:"+1 555 010 0100"'` | +| Archivos enviados a un chat la semana pasada | `tg personal search messages 'chat:"Book club" has:file date>=2026-10-07'` | | Qué dice un documento de Drive sobre un tema | `drive personal search 'budget' --exact --limit 5` | Para recetas más largas: [Telegram](./tg/recipes.md) y [MAX](./max/recipes.md). diff --git a/content/docs/search-efficiently.md b/content/docs/search-efficiently.md index f02d7269..b1958ffd 100644 --- a/content/docs/search-efficiently.md +++ b/content/docs/search-efficiently.md @@ -90,8 +90,9 @@ The answer says whether more results exist (`has_more`). That describes the page ## Keep the output small - `--limit ` caps the hits. -- `--brief` shows each found message as a reference, time, sender and excerpt. Scan with it, then open one hit. -- `--json=ref` keeps only the fields you name. `--jsonl` prints one result per line. `--full` returns whole texts. +- `--json=` keeps only the fields you name, for example `--json=ref,date,text`. It is the one option that + shrinks every answer: 31% to 64% smaller than full `--json` in [our measurement](https://github.com/WireCatLabs/cli-testing/tree/main/performance/agents/output-size). +- `--jsonl` prints one result per line. It is no smaller than `--json`. `--full` returns whole texts. - `--max-output-bytes` caps machine output at 4 MiB by default. A result over the cap fails visibly instead of being cut. - `--context ` adds `n` neighbouring messages on each side of a hit. It is 0 when the output is not a terminal. @@ -114,8 +115,8 @@ Replace the names with yours. | --- | --- | | An agreement and its source | `tg personal search messages 'chat:"Book club" agreed date>=2026-10-01' --limit 5` | | Everything about one person this month | `tg personal contacts timeline "Kai Sample" --since-time 2026-10-01` | -| Where a phone number appears | `tg personal search messages 'phone:"+1 555 010 0100"' --brief` | -| Files sent in a chat last week | `tg personal search messages 'chat:"Book club" has:file date>=2026-10-07' --brief` | +| Where a phone number appears | `tg personal search messages 'phone:"+1 555 010 0100"'` | +| Files sent in a chat last week | `tg personal search messages 'chat:"Book club" has:file date>=2026-10-07'` | | What a Drive document says about a topic | `drive personal search 'budget' --exact --limit 5` | For longer ones, see the recipes for [Telegram](./tg/recipes.md) and [MAX](./max/recipes.md). diff --git a/content/docs/search-efficiently.ru.md b/content/docs/search-efficiently.ru.md index 82624ff0..9ec1f1a6 100644 --- a/content/docs/search-efficiently.ru.md +++ b/content/docs/search-efficiently.ru.md @@ -90,8 +90,9 @@ tg personal search messages 'chat:"Book club" from:"Kai Sample" date>=2026-10-01 ## Держите вывод коротким - `--limit ` ограничивает число результатов. -- `--brief` показывает каждое найденное сообщение как ссылку на источник, время, отправителя и фрагмент. Просмотрите так, потом откройте один результат. -- `--json=ref` оставляет только названные поля. `--jsonl` печатает по одному результату в строке. `--full` возвращает тексты целиком. +- `--json=<поля>` оставляет только названные поля, например `--json=ref,date,text`. Только этот флаг уменьшает + любой ответ: на 31–64% меньше полного `--json` в [нашем замере](https://github.com/WireCatLabs/cli-testing/tree/main/performance/agents/output-size). +- `--jsonl` печатает по одному результату в строке. Он не короче `--json`. `--full` возвращает тексты целиком. - `--max-output-bytes` по умолчанию ограничивает машинный вывод 4 МиБ. Результат больше лимита завершается явной ошибкой, а не обрезается. - `--context ` добавляет `n` соседних сообщений с каждой стороны. Вне терминала значение равно 0. @@ -114,8 +115,8 @@ tg personal messages context "msg:telegram/1/77/42" --thread | --- | --- | | Договорённость и её источник | `tg personal search messages 'chat:"Book club" agreed date>=2026-10-01' --limit 5` | | Всё об одном человеке за этот месяц | `tg personal contacts timeline "Kai Sample" --since-time 2026-10-01` | -| Где встречается номер телефона | `tg personal search messages 'phone:"+1 555 010 0100"' --brief` | -| Файлы, присланные в чат на прошлой неделе | `tg personal search messages 'chat:"Book club" has:file date>=2026-10-07' --brief` | +| Где встречается номер телефона | `tg personal search messages 'phone:"+1 555 010 0100"'` | +| Файлы, присланные в чат на прошлой неделе | `tg personal search messages 'chat:"Book club" has:file date>=2026-10-07'` | | Что документ Drive говорит о теме | `drive personal search 'budget' --exact --limit 5` | Более длинные примеры: [Telegram](./tg/recipes.md) и [MAX](./max/recipes.md).