@theplato/tiro-cli 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,14 +3,17 @@
3
3
  > AI notes & transcripts — an **agent-first** command line for [Tiro](https://tiro.ooo).
4
4
  > The "feet" to MCP's "hands": filesystem-heavy, pipe-friendly, context-economical.
5
5
 
6
+ [![npm version](https://img.shields.io/npm/v/@theplato/tiro-cli)](https://www.npmjs.com/package/@theplato/tiro-cli)
7
+ [![Node.js](https://img.shields.io/node/v/@theplato/tiro-cli)](https://nodejs.org)
8
+
6
9
  ---
7
10
 
8
11
  ## Quick start
9
12
 
10
13
  ```bash
11
14
  npm install -g @theplato/tiro-cli
12
- tiro auth login # browser opens; OAuth + PKCE
13
- tiro notes search --speaker "김철수" --since 7d --json
15
+ tiro auth login # browser opens; OAuth + PKCE
16
+ tiro notes search "Q3 Planning" --since 7d --json
14
17
  ```
15
18
 
16
19
  Already authenticated through MCP? Reuse your token:
@@ -42,18 +45,20 @@ The CLI is **not a replacement for MCP**. It's the same data through a different
42
45
 
43
46
  - 🔐 **OAuth Authorization Code + PKCE** — no copy-paste tokens, no secrets in shell history. Tokens live in OS Keychain.
44
47
  - 📁 **`--output` writes to disk** — stdout becomes a single line of metadata. Agents stay context-light.
48
+ - 🪞 **Same JSON shape as MCP** — `tiro notes transcript --format json` mirrors `get_note_transcript` exactly. Switch surfaces without changing parsers.
45
49
  - 🧵 **NDJSON streams by default** — pipe to `jq`, `head`, `xargs`. No buffer-in-memory surprises.
46
50
  - 🤖 **Agent-aware** — TTY detection auto-selects pretty vs JSON. `error.suggestion` field for auto-recovery.
47
- - 🪞 **Self-describing** *(soon)* — `tiro schema notes export` returns input/output JSON Schema.
48
51
  - 🚫 **No voice in v1** — intentionally matches MCP feature parity (audio uploads belong elsewhere).
49
52
 
50
53
  ---
51
54
 
52
55
  ## Installation
53
56
 
54
- ### npm (recommended)
55
57
  ```bash
56
- npm install -g @theplato/tiro-cli
58
+ npm install -g @theplato/tiro-cli # npm
59
+ pnpm add -g @theplato/tiro-cli # pnpm
60
+ yarn global add @theplato/tiro-cli # yarn
61
+ bun add -g @theplato/tiro-cli # bun
57
62
  tiro --version
58
63
  ```
59
64
 
@@ -101,25 +106,26 @@ tiro notes list
101
106
 
102
107
  ### List recent notes
103
108
  ```bash
104
- tiro notes list # pretty table in TTY
105
- tiro notes list --json # NDJSON for pipes
109
+ tiro notes list # pretty table in TTY
110
+ tiro notes list --json # NDJSON for pipes
111
+ tiro notes list --keyword "OKR" --since 30d # OpenSearch reorder by keyword
106
112
  tiro notes list --folder <id> --limit 100 --cursor <token>
107
113
  ```
108
114
 
109
- ### Search by speaker, date, folder
115
+ ### Deep keyword search (returns notes + their primary documents)
110
116
  ```bash
111
- tiro notes search --speaker "김철수" --since 7d
112
- tiro notes search "quarterly review" --since 2026-04-01 --until 2026-05-01
113
- tiro notes search --speaker "이영희" --folder <id> --json | jq '.[] | .guid'
117
+ tiro notes search "Q3 Planning" # positional keyword
118
+ tiro notes search "OKR" --since 2026-04-01 --until 2026-05-01
119
+ tiro notes search "Acme Corp" --folder <id> --json | jq '.[] | .guid'
114
120
  ```
115
121
 
116
122
  `--since` / `--until` accept ISO-8601 (`2026-04-01T10:00:00Z`) or relative (`7d`, `24h`, `30m`).
117
123
 
118
124
  ### Get one note → stdout
119
125
  ```bash
120
- tiro notes get <guid> # markdown to TTY
121
- tiro notes get <guid> --format json # JSON to stdout
122
- tiro notes get <guid> --include transcript # include paragraphs
126
+ tiro notes get <guid> # markdown to TTY
127
+ tiro notes get <guid> --format json # JSON to stdout
128
+ tiro notes get <guid> --include transcript # include speaker-attributed paragraphs
123
129
  ```
124
130
 
125
131
  ### Get one note → file (agent-friendly)
@@ -132,11 +138,13 @@ This is the killer pattern for agents — **the actual content goes to disk; onl
132
138
 
133
139
  ### Raw transcript only
134
140
  ```bash
135
- tiro notes transcript <guid> # txt by default
141
+ tiro notes transcript <guid> # md by default in TTY, txt in pipe
136
142
  tiro notes transcript <guid> --output ./transcript.md
137
- tiro notes transcript <guid> --format json --output ./paragraphs.json
143
+ tiro notes transcript <guid> --format json --output ./paragraphs.json # MCP-shape JSON
138
144
  ```
139
145
 
146
+ `--format json` returns the exact shape MCP's `get_note_transcript` emits (`{noteGuid, title, participants, createdAt, recordingDurationSeconds, paragraphs[]}` with each paragraph carrying `segments[]` of `{content, speaker:{label,name}|null}`).
147
+
140
148
  ---
141
149
 
142
150
  ## Commands
@@ -146,10 +154,10 @@ tiro auth login Sign in via OAuth (browser-based, PKCE)
146
154
  tiro auth status Show current account and scopes
147
155
  tiro auth logout Clear stored credentials
148
156
 
149
- tiro notes list List recent notes (pretty | NDJSON)
150
- tiro notes search Search by speaker / date / folder / keyword
157
+ tiro notes list List notes (lightweight metadata)
158
+ tiro notes search Deep keyword search (notes + documents hydrated)
151
159
  tiro notes get Get a single note (stdout or file)
152
- tiro notes transcript Get raw transcript paragraphs
160
+ tiro notes transcript Get the full transcript (matches MCP get_note_transcript)
153
161
 
154
162
  # Coming in v0.3 / v0.4:
155
163
  tiro notes export Bulk-export search results to a directory
@@ -161,6 +169,7 @@ tiro schema [<command>] Print JSON Schema (for agents)
161
169
 
162
170
  Full sample of every command: `tiro <command> --help`.
163
171
  Full design spec: [`SPEC.md`](./SPEC.md).
172
+ Release history: [`CHANGELOG.md`](./CHANGELOG.md).
164
173
 
165
174
  ---
166
175
 
@@ -206,19 +215,31 @@ If you're an agent (Claude Code, Cursor, ChatGPT) calling tiro CLI from a shell:
206
215
 
207
216
  1. **Default to `--json`**: predictable shape, NDJSON for streams.
208
217
  2. **Always use `--output`** for `notes get` / `notes transcript` — keeps the actual content out of your context window. The stdout response is one line of metadata.
209
- 3. **Pipe instead of buffer**: `tiro notes search ... --json | jq -c '.[] | select(.duration > 600)'`.
210
- 4. **Read errors as JSON**: `error.code`, `error.errorType`, `error.suggestion` are stable. The `suggestion` field is designed for auto-recovery (e.g. `"tiro auth login"` → run that next).
211
- 5. **Respect exit codes**: `4` = auth needed, `78` = no token configured.
218
+ 3. **`tiro notes transcript --format json`** matches MCP's `get_note_transcript` JSON exactly. Reuse your MCP parser.
219
+ 4. **Pipe instead of buffer**: `tiro notes search "..." --json | jq -c '.[] | select(.recordingDurationSeconds > 600)'`.
220
+ 5. **Read errors as JSON**: `error.code`, `error.errorType`, `error.suggestion` are stable. The `suggestion` field is designed for auto-recovery (e.g. `"tiro auth login"` → run that next).
221
+ 6. **Respect exit codes**: `4` = auth needed, `78` = no token configured.
212
222
 
213
- Example agent flow:
223
+ Worked example — 30 days of "Acme Corp" meetings:
214
224
  ```bash
215
- # 1. Search → metadata only
216
- tiro notes search --speaker "김철수" --since 30d --output ./april.jsonl
225
+ # 1. Search → metadata + hydrated documents (NDJSON)
226
+ tiro notes search "Acme Corp" --since 30d --json > /tmp/acme.jsonl
227
+ # stdout: ~12 lines of NDJSON, ~3KB total
228
+
217
229
  # 2. Pull guids without loading bodies
218
- cat ./april.jsonl | jq -r '.guid' > guids.txt
219
- # 3. Download transcripts to disk, manifest tracks status
220
- xargs -I{} tiro notes get {} --output ./notes/{}.md --include transcript < guids.txt
221
- # Total context cost: ~80 tokens for 100 notes.
230
+ cat /tmp/acme.jsonl | jq -r '.guid' > /tmp/guids.txt
231
+
232
+ # 3. Download transcripts to disk; agent reads paths instead of content
233
+ xargs -I{} tiro notes transcript {} --output ./out/{}.md < /tmp/guids.txt
234
+
235
+ # Context cost so far: ~80 tokens (paths + counts).
236
+ # Disk: 12 markdown files ready for grep / Read tool.
237
+ ```
238
+
239
+ Real participant names rendered in markdown will look like:
240
+ ```
241
+ **[Yeoul, 00:12]** Let's start with the Acme deal pipeline.
242
+ **[Evan, 00:18]** They just signed the LOI.
222
243
  ```
223
244
 
224
245
  ---
@@ -263,7 +284,7 @@ OAuth Authorization Code + PKCE flow:
263
284
  1. Dynamic Client Registration (RFC 7591) — no preconfigured client_id needed
264
285
  2. Loopback redirect on an ephemeral `127.0.0.1:<port>`
265
286
  3. PKCE S256 challenge, no client secret stored
266
- 4. JWT (HS256) issued for 180 days, stored in OS Keychain
287
+ 4. JWT issued for 180 days, stored in OS Keychain
267
288
  5. Same token works on `/v1/external/*` and `/v1/mcp/*` (audience-list overlap)
268
289
 
269
290
  ---
@@ -271,13 +292,13 @@ OAuth Authorization Code + PKCE flow:
271
292
  ## Roadmap
272
293
 
273
294
  - ✅ **v0.1** — Auth (`login`, `status`, `logout`) + `--help`
274
- - 🚧 **v0.2** — Notes core (`list`, `search`, `get`, `transcript`)
295
+ - **v0.2** — Notes core (`list`, `search`, `get`, `transcript`); MCP-shape transcript JSON; first test suite
275
296
  - ⏳ **v0.3** — `notes export` (bulk → directory + manifest.jsonl)
276
297
  - ⏳ **v0.4** — Templates, share-links, folders, `schema`
277
- - ⏳ **v1.0** — Stable. Tests, docs polish, npm publish.
298
+ - ⏳ **v1.0** — Stable. Public docs, license decision, Homebrew tap.
278
299
  - 🔮 **v1.x** — Device Flow (RFC 8628), shell completions, self-update
279
300
 
280
- See [`SPEC.md`](./SPEC.md) for the full v1 design.
301
+ See [`SPEC.md`](./SPEC.md) for the full v1 design and [`CHANGELOG.md`](./CHANGELOG.md) for release history.
281
302
 
282
303
  ---
283
304
 
package/SPEC.md CHANGED
@@ -217,7 +217,7 @@ ENVIRONMENT
217
217
 
218
218
  EXAMPLES
219
219
  tiro auth login
220
- tiro notes search --speaker "김철수" --since 7d --json
220
+ tiro notes search "Q3 Planning" --since 7d --json
221
221
  tiro notes get <guid> --output ./meeting.md --include transcript,summary
222
222
  tiro notes export --query "..." --output-dir ./backup --include transcript,summary
223
223
  ```
@@ -246,7 +246,7 @@ list / search 결과는 line-delimited (한 줄에 한 객체) — agent 가 `he
246
246
  ### 7.5 Manifest (`manifest.jsonl`)
247
247
  bulk export 자동 생성. 한 줄에 한 항목:
248
248
  ```jsonl
249
- {"guid":"note-guid-123","title":"주간 미팅","path":"./n1.md","size":5234,"status":"ok"}
249
+ {"guid":"note-guid-123","title":"Weekly standup","path":"./n1.md","size":5234,"status":"ok"}
250
250
  {"guid":"note-guid-789","path":null,"error":{"code":"not_found","message":"..."}}
251
251
  ```
252
252