granola-cli 0.1.0
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/LICENSE +21 -0
- package/README.md +776 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +1893 -0
- package/dist/main.js.map +1 -0
- package/package.json +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,776 @@
|
|
|
1
|
+
# Granola CLI
|
|
2
|
+
|
|
3
|
+
> [!IMPORTANT]
|
|
4
|
+
> **Disclaimer**: This is an **unofficial, open-source community project** and is **not affiliated with, endorsed by, or connected to Granola Labs, Inc.** (the company behind [Granola.ai](https://www.granola.ai/)). Granola is a registered trademark of Granola Labs, Inc. This CLI is an independent tool that uses the publicly available Granola API to provide command-line access to your own meeting data.
|
|
5
|
+
|
|
6
|
+
> [!NOTE]
|
|
7
|
+
> This tool has only been tested on **macOS**. It may work on Windows and Linux, but this has not been verified.
|
|
8
|
+
|
|
9
|
+
A command-line interface for [Granola](https://www.granola.ai/) meeting notes.
|
|
10
|
+
|
|
11
|
+
Access your meetings, notes, and transcripts directly from the terminal. Built with TypeScript and designed for both interactive use and scripting.
|
|
12
|
+
|
|
13
|
+
## Table of Contents
|
|
14
|
+
|
|
15
|
+
- [Installation](#installation)
|
|
16
|
+
- [Quick Start](#quick-start)
|
|
17
|
+
- [Authentication](#authentication)
|
|
18
|
+
- [Commands](#commands)
|
|
19
|
+
- [meeting](#meeting)
|
|
20
|
+
- [workspace](#workspace)
|
|
21
|
+
- [folder](#folder)
|
|
22
|
+
- [config](#config)
|
|
23
|
+
- [alias](#alias)
|
|
24
|
+
- [Global Options](#global-options)
|
|
25
|
+
- [Output Formats](#output-formats)
|
|
26
|
+
- [Configuration](#configuration)
|
|
27
|
+
- [Environment Variables](#environment-variables)
|
|
28
|
+
- [Exit Codes](#exit-codes)
|
|
29
|
+
- [Examples](#examples)
|
|
30
|
+
- [Development](#development)
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install -g granola-cli
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or run directly with npx:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx granola-cli meeting list
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Quick Start
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Authenticate with Granola (imports from desktop app)
|
|
48
|
+
granola auth login
|
|
49
|
+
|
|
50
|
+
# List your recent meetings
|
|
51
|
+
granola meeting list
|
|
52
|
+
|
|
53
|
+
# View AI-enhanced summary from a meeting
|
|
54
|
+
granola meeting enhanced <meeting-id>
|
|
55
|
+
|
|
56
|
+
# View your manual notes
|
|
57
|
+
granola meeting notes <meeting-id>
|
|
58
|
+
|
|
59
|
+
# View the transcript
|
|
60
|
+
granola meeting transcript <meeting-id>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Authentication
|
|
64
|
+
|
|
65
|
+
The CLI stores credentials securely in your system keychain.
|
|
66
|
+
|
|
67
|
+
### Login
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Import credentials from Granola desktop app
|
|
71
|
+
granola auth login
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Check Status
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
granola auth status
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Output:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Authenticated
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Logout
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
granola auth logout
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Token Management
|
|
93
|
+
|
|
94
|
+
- Access tokens are automatically refreshed when they expire
|
|
95
|
+
- Refresh tokens are single-use and rotated on each refresh
|
|
96
|
+
- If token refresh fails, you'll need to re-run `granola auth login`
|
|
97
|
+
|
|
98
|
+
### Troubleshooting
|
|
99
|
+
|
|
100
|
+
If you see authentication errors:
|
|
101
|
+
|
|
102
|
+
1. Run `granola auth status` to check credential status
|
|
103
|
+
2. Run `granola auth login` to re-import credentials from Granola desktop
|
|
104
|
+
|
|
105
|
+
## Commands
|
|
106
|
+
|
|
107
|
+
### meeting
|
|
108
|
+
|
|
109
|
+
Work with meetings.
|
|
110
|
+
|
|
111
|
+
#### List meetings
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
granola meeting list [options]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Options:**
|
|
118
|
+
| Option | Description |
|
|
119
|
+
|--------|-------------|
|
|
120
|
+
| `-l, --limit <n>` | Number of meetings to show (default: 20) |
|
|
121
|
+
| `-w, --workspace <id>` | Filter by workspace ID |
|
|
122
|
+
| `-f, --folder <id>` | Filter by folder ID (requires folder support; the CLI warns if folders are unavailable) |
|
|
123
|
+
|
|
124
|
+
**Example:**
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
$ granola meeting list --limit 5
|
|
128
|
+
|
|
129
|
+
Showing 5 meetings
|
|
130
|
+
|
|
131
|
+
ID TITLE DATE
|
|
132
|
+
a1b2c3d4 Q4 Planning Session Dec 18, 2025
|
|
133
|
+
e5f6g7h8 1:1 with Sarah Dec 18, 2025
|
|
134
|
+
i9j0k1l2 Sprint Retrospective Dec 17, 2025
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
#### View meeting details
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
granola meeting view <id> [options]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Options:**
|
|
144
|
+
| Option | Description |
|
|
145
|
+
|--------|-------------|
|
|
146
|
+
| `--web` | Open meeting in browser |
|
|
147
|
+
|
|
148
|
+
**Example:**
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
$ granola meeting view a1b2c3d4
|
|
152
|
+
|
|
153
|
+
Q4 Planning Session
|
|
154
|
+
Recorded Dec 18, 2025
|
|
155
|
+
|
|
156
|
+
Workspace: Product Team
|
|
157
|
+
Organizer: Sarah Chen
|
|
158
|
+
Attendees: 3 participant(s)
|
|
159
|
+
- Mike Johnson (Engineering Manager)
|
|
160
|
+
- Lisa Park (Product Designer)
|
|
161
|
+
- Tom Wilson
|
|
162
|
+
|
|
163
|
+
View notes: granola meeting notes a1b2c3d4
|
|
164
|
+
View transcript: granola meeting transcript a1b2c3d4
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The command displays meeting participants when available, including the organizer and attendees with their job titles.
|
|
168
|
+
|
|
169
|
+
#### View meeting notes (manual)
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
granola meeting notes <id>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Displays user-written meeting notes as markdown. These are notes you manually typed during the meeting. Output is piped through your system pager when running in a TTY. Use `-o markdown|json|yaml|toon` to switch between rendered markdown and the raw ProseMirror document.
|
|
176
|
+
|
|
177
|
+
**Example:**
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
$ granola meeting notes a1b2c3d4
|
|
181
|
+
|
|
182
|
+
# My Notes
|
|
183
|
+
|
|
184
|
+
- Remember to follow up on budget
|
|
185
|
+
- Sarah mentioned design concerns
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Save to file:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
granola meeting notes a1b2c3d4 > meeting-notes.md
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
#### View AI-enhanced notes
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
granola meeting enhanced <id>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Displays AI-generated meeting summaries. These are automatically created by Granola based on the transcript and include structured sections like key decisions, action items, and discussion summaries. Use `-o markdown|json|yaml|toon` to view either the rendered markdown or the structured ProseMirror output.
|
|
201
|
+
|
|
202
|
+
**Example:**
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
$ granola meeting enhanced a1b2c3d4
|
|
206
|
+
|
|
207
|
+
### Key Decisions
|
|
208
|
+
|
|
209
|
+
- Launch date moved to January 15th
|
|
210
|
+
- Budget approved for contractor support
|
|
211
|
+
|
|
212
|
+
### Action Items
|
|
213
|
+
|
|
214
|
+
- Mike: Update roadmap by Friday
|
|
215
|
+
- Sarah: Schedule design review
|
|
216
|
+
|
|
217
|
+
### Discussion Summary
|
|
218
|
+
|
|
219
|
+
The team reviewed Q4 deliverables and identified timeline concerns...
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Save to file:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
granola meeting enhanced a1b2c3d4 > ai-summary.md
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
#### View meeting transcript
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
granola meeting transcript <id> [options]
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Use `-o text|json|yaml|toon` to choose between a pager-friendly transcript or structured output (JSON, YAML, or Toon format) for scripting.
|
|
235
|
+
|
|
236
|
+
**Options:**
|
|
237
|
+
| Option | Description |
|
|
238
|
+
|--------|-------------|
|
|
239
|
+
| `-t, --timestamps` | Include timestamps |
|
|
240
|
+
| `-s, --source <type>` | Filter by source: `microphone`, `system`, or `all` (default) |
|
|
241
|
+
|
|
242
|
+
**Example (default):**
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
$ granola meeting transcript a1b2c3d4
|
|
246
|
+
|
|
247
|
+
You: Let's start with the timeline.
|
|
248
|
+
|
|
249
|
+
Sarah Chen: We're about two weeks behind on the design phase.
|
|
250
|
+
|
|
251
|
+
Mike Johnson: I think we can make up some time in development.
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**Example (with timestamps):**
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
$ granola meeting transcript a1b2c3d4 --timestamps
|
|
258
|
+
|
|
259
|
+
[00:00:12] You
|
|
260
|
+
Let's start with the timeline.
|
|
261
|
+
|
|
262
|
+
[00:00:18] Sarah Chen
|
|
263
|
+
We're about two weeks behind on the design phase.
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
#### Export meeting
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
granola meeting export <id> [options]
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Exports complete meeting data including metadata, notes, and transcript.
|
|
273
|
+
|
|
274
|
+
**Options:**
|
|
275
|
+
| Option | Description |
|
|
276
|
+
|--------|-------------|
|
|
277
|
+
| `-f, --format <format>` | Output format: `json` (default) or `toon` |
|
|
278
|
+
|
|
279
|
+
**Example:**
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
# Export as JSON (default)
|
|
283
|
+
granola meeting export a1b2c3d4 > meeting.json
|
|
284
|
+
|
|
285
|
+
# Export as Toon (LLM-optimized format)
|
|
286
|
+
granola meeting export a1b2c3d4 --format toon > meeting.toon
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### workspace
|
|
290
|
+
|
|
291
|
+
Work with workspaces.
|
|
292
|
+
|
|
293
|
+
#### List workspaces
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
granola workspace list
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
**Example:**
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
$ granola workspace list
|
|
303
|
+
|
|
304
|
+
ID NAME CREATED
|
|
305
|
+
924ba459 Personal Jan 15, 2024
|
|
306
|
+
abc12345 Product Team Mar 20, 2024
|
|
307
|
+
def67890 Engineering Mar 20, 2024
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
#### View workspace
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
granola workspace view <id>
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**Example:**
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
$ granola workspace view abc12345
|
|
320
|
+
|
|
321
|
+
Product Team
|
|
322
|
+
Created Mar 20, 2024
|
|
323
|
+
|
|
324
|
+
View all meetings: granola meeting list --workspace abc12345
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### folder
|
|
328
|
+
|
|
329
|
+
Work with folders.
|
|
330
|
+
|
|
331
|
+
> **Note:** Folder commands depend on the Granola Document Lists API. If your account or workspace does not expose folders yet, the CLI prints a warning instead of returning empty results.
|
|
332
|
+
|
|
333
|
+
#### List folders
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
granola folder list [options]
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
**Options:**
|
|
340
|
+
| Option | Description |
|
|
341
|
+
|--------|-------------|
|
|
342
|
+
| `-w, --workspace <id>` | Filter by workspace ID |
|
|
343
|
+
|
|
344
|
+
**Example:**
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
$ granola folder list
|
|
348
|
+
|
|
349
|
+
ID NAME WORKSPACE
|
|
350
|
+
9f3d3537 Sales Calls abc12345
|
|
351
|
+
1fb1b706 Planning abc12345
|
|
352
|
+
|
|
353
|
+
# Filter to a single workspace
|
|
354
|
+
granola folder list --workspace abc12345
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
#### View folder
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
granola folder view <id>
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
**Example:**
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
$ granola folder view 9f3d3537
|
|
367
|
+
|
|
368
|
+
Sales Calls
|
|
369
|
+
22 meetings · Workspace abc12345
|
|
370
|
+
|
|
371
|
+
Tip: Use `granola meeting list` (optionally with `--folder 9f3d3537`) to browse the meetings in this workspace.
|
|
372
|
+
|
|
373
|
+
# Export the IDs for scripting
|
|
374
|
+
granola meeting list --folder 9f3d3537 --output json | jq -r '.[].id'
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### config
|
|
378
|
+
|
|
379
|
+
Manage CLI configuration.
|
|
380
|
+
|
|
381
|
+
#### List configuration
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
granola config list
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
#### Get a value
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
granola config get <key>
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
#### Set a value
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
granola config set <key> <value>
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
**Available keys:**
|
|
400
|
+
| Key | Description |
|
|
401
|
+
|-----|-------------|
|
|
402
|
+
| `default_workspace` | Default workspace ID for filtering (used when `--workspace` is omitted) |
|
|
403
|
+
| `pager` | Pager command (e.g., `less -R`). Used when `GRANOLA_PAGER` and `PAGER` are unset. |
|
|
404
|
+
| `aliases` | JSON object mapping alias names to commands (e.g., `{"meet":"meeting list --limit 10"}`) |
|
|
405
|
+
|
|
406
|
+
> Values are validated. Alias updates must be valid JSON objects whose values are string commands.
|
|
407
|
+
|
|
408
|
+
#### Reset configuration
|
|
409
|
+
|
|
410
|
+
```bash
|
|
411
|
+
granola config reset
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### alias
|
|
415
|
+
|
|
416
|
+
Create command shortcuts.
|
|
417
|
+
|
|
418
|
+
#### List aliases
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
granola alias list
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
#### Create alias
|
|
425
|
+
|
|
426
|
+
```bash
|
|
427
|
+
granola alias set <name> <command>
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
**Example:**
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
granola alias set meetings "meeting list"
|
|
434
|
+
granola alias set today "meeting list --limit 10"
|
|
435
|
+
granola alias set notes "meeting notes"
|
|
436
|
+
|
|
437
|
+
Quoted arguments are fully supported (e.g., `granola alias set pod "meeting list --workspace \"Product Team\""`).
|
|
438
|
+
For safety, aliases reject pipelines or shell substitutions—only literal arguments are allowed.
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
Now you can use:
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
granola meetings # runs: granola meeting list
|
|
445
|
+
granola today # runs: granola meeting list --limit 10
|
|
446
|
+
granola notes a1b2c3d4 # runs: granola meeting notes a1b2c3d4
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
#### Delete alias
|
|
450
|
+
|
|
451
|
+
```bash
|
|
452
|
+
granola alias delete <name>
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
## Global Options
|
|
456
|
+
|
|
457
|
+
Available on all commands:
|
|
458
|
+
|
|
459
|
+
| Option | Description |
|
|
460
|
+
| --------------- | ---------------------------- |
|
|
461
|
+
| `--help` | Show help for command |
|
|
462
|
+
| `--no-pager` | Disable pager for long output |
|
|
463
|
+
| `-V, --version` | Show version number |
|
|
464
|
+
|
|
465
|
+
> **Note:** Structured output is configured per command via `-o, --output <format>`. See each command’s help for available formats (JSON, YAML, TOON, etc.).
|
|
466
|
+
|
|
467
|
+
## Output Formats
|
|
468
|
+
|
|
469
|
+
### Human-readable (default)
|
|
470
|
+
|
|
471
|
+
Tables and formatted text optimized for terminal reading:
|
|
472
|
+
|
|
473
|
+
```bash
|
|
474
|
+
granola meeting list
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
### JSON (`--output json`)
|
|
478
|
+
|
|
479
|
+
Machine-readable output for scripting:
|
|
480
|
+
|
|
481
|
+
```bash
|
|
482
|
+
granola meeting list --output json
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
```json
|
|
486
|
+
[
|
|
487
|
+
{
|
|
488
|
+
"id": "a1b2c3d4",
|
|
489
|
+
"title": "Q4 Planning Session",
|
|
490
|
+
"created_at": "2025-12-18T14:00:00Z",
|
|
491
|
+
"workspace_id": "abc12345"
|
|
492
|
+
}
|
|
493
|
+
]
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
The `meeting export` command includes participant data:
|
|
497
|
+
|
|
498
|
+
```bash
|
|
499
|
+
granola meeting export a1b2c3d4 --format json
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
```json
|
|
503
|
+
{
|
|
504
|
+
"id": "a1b2c3d4",
|
|
505
|
+
"title": "Q4 Planning Session",
|
|
506
|
+
"people": {
|
|
507
|
+
"creator": {
|
|
508
|
+
"name": "Sarah Chen",
|
|
509
|
+
"email": "sarah@example.com"
|
|
510
|
+
},
|
|
511
|
+
"attendees": [
|
|
512
|
+
{ "name": "Mike Johnson", "email": "mike@example.com" }
|
|
513
|
+
]
|
|
514
|
+
},
|
|
515
|
+
"notes_markdown": "...",
|
|
516
|
+
"transcript": [...]
|
|
517
|
+
}
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### Toon (`--format toon`)
|
|
521
|
+
|
|
522
|
+
[TOON](https://toonformat.dev/) (Token-Oriented Object Notation) is a compact, LLM-friendly format that uses ~40% fewer tokens than JSON while maintaining the same data structure. Ideal for piping meeting data to AI tools:
|
|
523
|
+
|
|
524
|
+
```bash
|
|
525
|
+
# Export in Toon format for LLM consumption
|
|
526
|
+
granola meeting export a1b2c3d4 --format toon | llm "summarize this meeting"
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
## Configuration
|
|
530
|
+
|
|
531
|
+
Configuration is stored using the [conf](https://www.npmjs.com/package/conf) package at the standard config location for your OS:
|
|
532
|
+
|
|
533
|
+
- **macOS**: `~/Library/Preferences/granola-cli-nodejs/config.json`
|
|
534
|
+
- **Linux**: `~/.config/granola-cli-nodejs/config.json`
|
|
535
|
+
- **Windows**: `%APPDATA%/granola-cli-nodejs/Config/config.json`
|
|
536
|
+
|
|
537
|
+
### Configuration Options
|
|
538
|
+
|
|
539
|
+
| Key | Type | Description |
|
|
540
|
+
| ------------------- | ------ | -------------------- |
|
|
541
|
+
| `default_workspace` | string | Default workspace ID |
|
|
542
|
+
| `pager` | string | Pager command |
|
|
543
|
+
| `aliases` | object | Command aliases |
|
|
544
|
+
|
|
545
|
+
## Environment Variables
|
|
546
|
+
|
|
547
|
+
| Variable | Description |
|
|
548
|
+
| --------------- | ---------------------------------------- |
|
|
549
|
+
| `DEBUG` | Enable debug logging (e.g., `granola:*`) |
|
|
550
|
+
| `GRANOLA_PAGER` | Override pager command |
|
|
551
|
+
| `PAGER` | System pager (fallback) |
|
|
552
|
+
| `NO_COLOR` | Disable colored output |
|
|
553
|
+
|
|
554
|
+
## Debug Logging
|
|
555
|
+
|
|
556
|
+
The CLI includes comprehensive debug logging for troubleshooting. Enable it with the `DEBUG` environment variable.
|
|
557
|
+
|
|
558
|
+
### Enable All Debug Output
|
|
559
|
+
|
|
560
|
+
```bash
|
|
561
|
+
DEBUG=granola:* granola meeting list
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
### Selective Debug Output
|
|
565
|
+
|
|
566
|
+
```bash
|
|
567
|
+
# Authentication and API client only
|
|
568
|
+
DEBUG=granola:lib:auth,granola:service:client granola meeting list
|
|
569
|
+
|
|
570
|
+
# All service layer logs
|
|
571
|
+
DEBUG=granola:service:* granola meeting list
|
|
572
|
+
|
|
573
|
+
# Specific command debugging
|
|
574
|
+
DEBUG=granola:cmd:meeting:list granola meeting list
|
|
575
|
+
|
|
576
|
+
# CLI startup and alias expansion
|
|
577
|
+
DEBUG=granola:cli:* granola meetings
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
### Available Namespaces
|
|
581
|
+
|
|
582
|
+
| Namespace | Description |
|
|
583
|
+
| ------------------- | ---------------------------- |
|
|
584
|
+
| `granola:cli` | CLI entry point, startup |
|
|
585
|
+
| `granola:cli:alias` | Alias expansion |
|
|
586
|
+
| `granola:cli:subcommand` | External subcommand discovery |
|
|
587
|
+
| `granola:service:*` | All service layer operations |
|
|
588
|
+
| `granola:lib:*` | All library utilities |
|
|
589
|
+
| `granola:cmd:*` | All command handlers |
|
|
590
|
+
|
|
591
|
+
## Exit Codes
|
|
592
|
+
|
|
593
|
+
| Code | Description |
|
|
594
|
+
| ---- | ----------------------- |
|
|
595
|
+
| `0` | Success |
|
|
596
|
+
| `1` | General error |
|
|
597
|
+
| `2` | Authentication required |
|
|
598
|
+
| `4` | Resource not found |
|
|
599
|
+
|
|
600
|
+
## Examples
|
|
601
|
+
|
|
602
|
+
### Daily Workflow
|
|
603
|
+
|
|
604
|
+
```bash
|
|
605
|
+
# See today's meetings
|
|
606
|
+
granola meeting list --limit 5
|
|
607
|
+
|
|
608
|
+
# Review AI-enhanced summary from a meeting
|
|
609
|
+
granola meeting enhanced a1b2c3d4
|
|
610
|
+
|
|
611
|
+
# Check your manual notes
|
|
612
|
+
granola meeting notes a1b2c3d4
|
|
613
|
+
|
|
614
|
+
# Search transcript for a topic
|
|
615
|
+
granola meeting transcript a1b2c3d4 | grep -i "budget"
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
### Export for Sharing
|
|
619
|
+
|
|
620
|
+
```bash
|
|
621
|
+
# Save AI summary as markdown
|
|
622
|
+
granola meeting enhanced a1b2c3d4 > meeting-summary.md
|
|
623
|
+
|
|
624
|
+
# Save manual notes
|
|
625
|
+
granola meeting notes a1b2c3d4 > my-notes.md
|
|
626
|
+
|
|
627
|
+
# Full export for archival
|
|
628
|
+
granola meeting export a1b2c3d4 > meeting-archive.json
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
### Scripting
|
|
632
|
+
|
|
633
|
+
```bash
|
|
634
|
+
# Get all meeting IDs from a folder
|
|
635
|
+
granola meeting list --folder 9f3d3537 --output json | jq -r '.[].id'
|
|
636
|
+
|
|
637
|
+
# Export all meetings from a workspace
|
|
638
|
+
for id in $(granola meeting list --workspace abc12345 --output json | jq -r '.[].id'); do
|
|
639
|
+
granola meeting export "$id" > "meetings/${id}.json"
|
|
640
|
+
done
|
|
641
|
+
|
|
642
|
+
# Find meetings mentioning a keyword
|
|
643
|
+
granola meeting list --output json | jq '.[] | select(.title | test("planning"; "i"))'
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
### Integration with Other Tools
|
|
647
|
+
|
|
648
|
+
```bash
|
|
649
|
+
# Pipe AI summary to another LLM for further analysis
|
|
650
|
+
granola meeting enhanced a1b2c3d4 | llm "extract action items from this"
|
|
651
|
+
|
|
652
|
+
# Pipe transcript to an LLM summarizer
|
|
653
|
+
granola meeting transcript a1b2c3d4 | llm "summarize this meeting"
|
|
654
|
+
|
|
655
|
+
# Search across multiple transcripts
|
|
656
|
+
granola meeting list --output json | jq -r '.[].id' | while read id; do
|
|
657
|
+
echo "=== $id ==="
|
|
658
|
+
granola meeting transcript "$id" 2>/dev/null | grep -i "deadline" || true
|
|
659
|
+
done
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
## Development
|
|
663
|
+
|
|
664
|
+
### Prerequisites
|
|
665
|
+
|
|
666
|
+
- Node.js 20+
|
|
667
|
+
- npm or yarn
|
|
668
|
+
|
|
669
|
+
### Setup
|
|
670
|
+
|
|
671
|
+
```bash
|
|
672
|
+
git clone https://github.com/your-username/granola-cli.git
|
|
673
|
+
cd granola-cli
|
|
674
|
+
npm install
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
### Scripts
|
|
678
|
+
|
|
679
|
+
| Command | Description |
|
|
680
|
+
| ----------------------- | ------------------------------ |
|
|
681
|
+
| `npm run build` | Build the project |
|
|
682
|
+
| `npm run dev` | Build in watch mode |
|
|
683
|
+
| `npm test` | Run tests |
|
|
684
|
+
| `npm run test:watch` | Run tests in watch mode |
|
|
685
|
+
| `npm run test:coverage` | Run tests with coverage report |
|
|
686
|
+
| `npm run typecheck` | Type-check without emitting |
|
|
687
|
+
|
|
688
|
+
### Testing
|
|
689
|
+
|
|
690
|
+
The project uses [Vitest](https://vitest.dev/) for testing with 100% code coverage.
|
|
691
|
+
|
|
692
|
+
```bash
|
|
693
|
+
# Run tests
|
|
694
|
+
npm test
|
|
695
|
+
|
|
696
|
+
# Run tests with coverage
|
|
697
|
+
npm run test:coverage
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
### Project Structure
|
|
701
|
+
|
|
702
|
+
```
|
|
703
|
+
granola-cli/
|
|
704
|
+
├── src/
|
|
705
|
+
│ ├── main.ts # CLI entry point
|
|
706
|
+
│ ├── types.ts # Type definitions
|
|
707
|
+
│ ├── commands/ # Command implementations
|
|
708
|
+
│ │ ├── auth/ # login, auth logout/status
|
|
709
|
+
│ │ ├── meeting/ # meeting list/view/notes/enhanced/transcript/export
|
|
710
|
+
│ │ ├── workspace/ # workspace list/view
|
|
711
|
+
│ │ ├── folder/ # folder list/view
|
|
712
|
+
│ │ ├── config.ts # config list/get/set/reset
|
|
713
|
+
│ │ └── alias.ts # alias list/set/delete
|
|
714
|
+
│ ├── services/ # API service layer
|
|
715
|
+
│ │ ├── client.ts # API client singleton
|
|
716
|
+
│ │ ├── meetings.ts # Meeting operations
|
|
717
|
+
│ │ ├── workspaces.ts # Workspace operations
|
|
718
|
+
│ │ └── folders.ts # Folder operations
|
|
719
|
+
│ └── lib/ # Utility libraries
|
|
720
|
+
│ ├── api.ts # Granola API client
|
|
721
|
+
│ ├── auth.ts # Credential management
|
|
722
|
+
│ ├── config.ts # Configuration management
|
|
723
|
+
│ ├── debug.ts # Debug logging utilities
|
|
724
|
+
│ ├── http.ts # HTTP client with retry
|
|
725
|
+
│ ├── output.ts # Table formatting
|
|
726
|
+
│ ├── pager.ts # Pager integration
|
|
727
|
+
│ ├── prosemirror.ts # ProseMirror to Markdown
|
|
728
|
+
│ └── transcript.ts # Transcript formatting
|
|
729
|
+
├── tests/ # Test files (mirrors src/)
|
|
730
|
+
├── dist/ # Build output
|
|
731
|
+
├── package.json
|
|
732
|
+
├── tsconfig.json
|
|
733
|
+
├── tsup.config.ts
|
|
734
|
+
└── vitest.config.ts
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
### Dependencies
|
|
738
|
+
|
|
739
|
+
**Runtime:**
|
|
740
|
+
|
|
741
|
+
- [commander](https://www.npmjs.com/package/commander) - CLI framework
|
|
742
|
+
- [chalk](https://www.npmjs.com/package/chalk) - Terminal colors
|
|
743
|
+
- [cli-table3](https://www.npmjs.com/package/cli-table3) - Table formatting
|
|
744
|
+
- [conf](https://www.npmjs.com/package/conf) - Configuration storage
|
|
745
|
+
- [cross-keychain](https://www.npmjs.com/package/cross-keychain) - Secure credential storage
|
|
746
|
+
- [debug](https://www.npmjs.com/package/debug) - Debug logging
|
|
747
|
+
- [open](https://www.npmjs.com/package/open) - Open URLs in browser
|
|
748
|
+
- [@toon-format/toon](https://www.npmjs.com/package/@toon-format/toon) - TOON format encoder
|
|
749
|
+
|
|
750
|
+
**Development:**
|
|
751
|
+
|
|
752
|
+
- [typescript](https://www.typescriptlang.org/) - TypeScript compiler
|
|
753
|
+
- [tsup](https://tsup.egoist.dev/) - Fast bundler
|
|
754
|
+
- [vitest](https://vitest.dev/) - Test runner
|
|
755
|
+
|
|
756
|
+
## About Granola.ai
|
|
757
|
+
|
|
758
|
+
[Granola](https://www.granola.ai/) is an AI-powered meeting notes application developed by Granola Labs, Inc. The app runs in your menu bar and automatically transcribes meetings, generating concise summaries without requiring bots to join your calls.
|
|
759
|
+
|
|
760
|
+
Key features include:
|
|
761
|
+
|
|
762
|
+
- Automatic recording and transcription
|
|
763
|
+
- AI-powered meeting summaries
|
|
764
|
+
- Action item detection
|
|
765
|
+
- Searchable meeting archive
|
|
766
|
+
- Team workspaces and shared folders (Granola 2.0)
|
|
767
|
+
|
|
768
|
+
**This CLI is an unofficial community project and is not developed or maintained by Granola Labs, Inc.**
|
|
769
|
+
|
|
770
|
+
## Related
|
|
771
|
+
|
|
772
|
+
- [Granola](https://www.granola.ai/) - The official AI notepad for meetings
|
|
773
|
+
|
|
774
|
+
## License
|
|
775
|
+
|
|
776
|
+
MIT
|