KosmoKrator

productivity

Granola CLI for AI Agents

Use the Granola CLI from KosmoKrator to call Granola tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Granola CLI Setup

Granola can be configured headlessly with `kosmokrator integrations:configure granola`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure granola --set api_key="$GRANOLA_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor granola --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
api_key GRANOLA_API_KEY Secret secret yes API Key
url GRANOLA_URL URL url no API Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call granola.granola_list_notes '{"created_before":"example_created_before","created_after":"example_created_after","updated_after":"example_updated_after","cursor":"example_cursor","page_size":1}' --json
Provider shortcut
kosmo integrations:granola granola_list_notes '{"created_before":"example_created_before","created_after":"example_created_after","updated_after":"example_updated_after","cursor":"example_cursor","page_size":1}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs granola --json
kosmo integrations:docs granola.granola_list_notes --json
kosmo integrations:schema granola.granola_list_notes --json
kosmo integrations:search "Granola" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

granola.granola_list_notes

List accessible Granola meeting notes with cursor pagination and date filters.

Read read
Parameters
created_before, created_after, updated_after, cursor, page_size
Generic call
kosmo integrations:call granola.granola_list_notes '{"created_before":"example_created_before","created_after":"example_created_after","updated_after":"example_updated_after","cursor":"example_cursor","page_size":1}' --json
Shortcut
kosmo integrations:granola granola_list_notes '{"created_before":"example_created_before","created_after":"example_created_after","updated_after":"example_updated_after","cursor":"example_cursor","page_size":1}' --json

granola.granola_get_note

Get one Granola meeting note by ID, including transcript, summary, attendees, and calendar event details when available.

Read read
Parameters
note_id
Generic call
kosmo integrations:call granola.granola_get_note '{"note_id":"example_note_id"}' --json
Shortcut
kosmo integrations:granola granola_get_note '{"note_id":"example_note_id"}' --json

granola.granola_list_folders

List accessible Granola folders with cursor pagination.

Read read
Parameters
cursor, page_size
Generic call
kosmo integrations:call granola.granola_list_folders '{"cursor":"example_cursor","page_size":1}' --json
Shortcut
kosmo integrations:granola granola_list_folders '{"cursor":"example_cursor","page_size":1}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

granola.granola_list_notes 5 parameters
Schema command
kosmo integrations:schema granola.granola_list_notes --json
ParameterTypeRequiredDescription
created_before string no Return notes created before this date, such as 2026-01-27.
created_after string no Return notes created after this date, such as 2026-01-27.
updated_after string no Return notes updated after this date, such as 2026-01-27.
cursor string no Cursor from a previous response.
page_size integer no Number of notes to return, from 1 to 30.
granola.granola_get_note 1 parameters
Schema command
kosmo integrations:schema granola.granola_get_note --json
ParameterTypeRequiredDescription
note_id string yes The Granola note ID, such as not_1d3tmYTlCICgjy.
granola.granola_list_folders 2 parameters
Schema command
kosmo integrations:schema granola.granola_list_folders --json
ParameterTypeRequiredDescription
cursor string no Cursor from a previous response.
page_size integer no Number of folders to return, from 1 to 30.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.