gitmyhub

notion-agent-cache

JavaScript ★ 1 updated 15d ago

A command-line tool that syncs selected Notion pages to local Markdown files so AI assistants can read your documentation without needing live access to Notion.

JavaScriptNode.jssetup: moderatecomplexity 2/5

Notion Agent Cache is a command-line tool that copies selected pages from your Notion workspace into local Markdown files on your computer. The purpose is to let AI coding assistants read your project documentation, runbooks, release checklists, and architecture decisions without needing live access to Notion during every conversation.

The problem it solves: when an AI assistant needs context from your team's documentation, the most common workarounds are either giving it a live Notion API token (which means every lookup makes a network call and exposes the whole workspace) or pasting content manually. This tool offers a middle path. You point it at specific Notion pages you trust, run a sync, and the content lands in a local folder as plain text files. The AI assistant then searches those files using ordinary tools, with no network calls and no access beyond what you explicitly included.

The access model is narrow by design. You create a dedicated read-only Notion integration and share only the pages you consider safe for the agent to see. The tool cannot reach anything you did not explicitly share with that integration. Page titles that look like they might contain secrets can be filtered out with configurable patterns before they ever get written to disk.

Each sync creates a timestamped snapshot. A pointer called "current" always points to the most recent one, and older snapshots are kept up to a configurable limit. There is also a small local search command included if you want to query the cache from the terminal without an AI assistant.

Setup takes a few steps: create a Notion integration, save its token to a local file, add Notion page URLs to the allowlist, and run the sync. A built-in doctor command checks that everything is configured correctly. Syncs can be scheduled to run nightly to keep the cache fresh.

The tool runs on Node.js and has no third-party runtime dependencies.

Where it fits