Package Exports
- granola-toolkit
- granola-toolkit/dist/cli.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (granola-toolkit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
granola-toolkit
General toolkit to do more with Granola notes and transcripts.
Install
From npm:
npm install -g granola-toolkit
granola --helpWithout a global install:
npx granola-toolkit --helpFor local development:
curl -fsSL https://vite.plus | bash
vp help
vp installRun
Installed CLI:
granola --help
granola notes --help
granola transcripts --helpLocal build:
vp pack
node dist/cli.js --help
node dist/cli.js notes --help
node dist/cli.js transcripts --helpYou can also use the package scripts:
npm run build
npm run notes -- --help
npm run transcripts -- --helpExamples
Export notes:
node dist/cli.js notes --supabase "$HOME/Library/Application Support/Granola/supabase.json"Export transcripts:
node dist/cli.js transcripts --cache "$HOME/Library/Application Support/Granola/cache-v3.json"How It Works
Notes
notes exports Granola's generated meeting notes, not the raw transcript.
The flow is:
- read your local
supabase.json - extract the WorkOS access token from it
- call Granola's paginated documents API
- choose the best available note content for each document
- convert ProseMirror content into Markdown
- write one Markdown file per document into the output directory
Content is chosen in this order:
noteslast_viewed_panel.contentlast_viewed_panel.original_content- raw
content
Each note file includes:
- YAML frontmatter with the document id, created timestamp, updated timestamp, and tags
- a top-level heading from the note title
- converted note body content
Transcripts
transcripts exports Granola's locally cached transcript segments.
The flow is:
- read Granola's cache JSON from disk
- parse the cache payload, whether it is double-encoded or already an object
- match transcript segments to documents by document id
- format segments as
[HH:MM:SS] Speaker: Text - write one
.txtfile per document into the output directory
Speaker labels are currently normalised to:
YouformicrophoneSystemfor everything else
Incremental Writes
Both commands are incremental. They only rewrite an export file when the source document appears newer than the file already on disk.
That means repeated runs are cheap, and you can safely point the CLI at the same output directory over time.
Config
The CLI reads configuration in this order:
- command-line flags
- environment variables
.granola.toml- platform defaults
Supported config keys:
debug = true
supabase = "/Users/yourname/Library/Application Support/Granola/supabase.json"
output = "./notes"
timeout = "2m"
cache-file = "/Users/yourname/Library/Application Support/Granola/cache-v3.json"
transcript-output = "./transcripts"Supported environment variables:
DEBUG_MODESUPABASE_FILEOUTPUTTIMEOUTCACHE_FILETRANSCRIPT_OUTPUT
Development Checks
Before pushing changes, run:
vp check
vp test
vp pack
npm pack --dry-runWhat those do:
vp check: formatting, linting, and type checksvp test: unit testsvp pack: builds the CLI bundle intodist/cli.jsnpm pack --dry-run: shows the exact npm package contents without publishing
vp build is for web apps. This repo is a CLI package, so the build step here is vp pack.