npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@goudzillaa/notion-context

v0.1.1

Published

A CLI tool to fetch Notion data and generate local context files for AI assistants

Readme

notion-context

A CLI tool to fetch Notion data and generate local context files for AI assistants.

Overview

notion-context is a deterministic, local developer tool that:

  • Fetches data from your Notion workspace
  • Normalizes it into a clean format
  • Generates context files on disk for use with AI coding assistants

🧠 How Classification Works

notion-context uses a smart, 3-tier detection system to categorize content as Tasks or Notes. It doesn't just look at the page title; it analyzes the content structure.

1. Structural Splitting

A single Notion page can generate multiple context items. The tool splits pages based on:

  • Columns: If you use a 2-column layout (e.g., Tasks on left, Notes on right), they are split into separate items.
  • Headers: H2 headings (e.g., ## Tasks, ## Resources) act as dividers.
  • Toggles/Callout Blocks: These are treated as independent sections.

2. Detection Logic (Priority Order)

Once split, each section is analyzed to determine if it's a Task or a Note:

  1. Page Properties (High Priority)

    • If a database page has a Status property (e.g., "In Progress", "Done"), the entire page is treated as a Task.
  2. Explicit Headlines (Medium Priority)

    • The tool checks section headers for keywords:
      • Task Keywords: task, todo, action, checklist
      • Note Keywords: note, info, reference, context
  3. Content Analysis (High Priority)

    • It scans the distinct blocks within the section.
    • If it finds checkboxes (Todo blocks), it classifies the section as a Task.
  4. Fallback

    • If none of the above match, it defaults to a Note.

Example

Input (Notion Page):

# Project Alpha
(2-column layout)
[Column 1]          [Column 2]
## Action Items     ## References
[ ] Fix Login       - API Docs
[ ] Ship v1         - Design Spec

Output:

  • tasks.json: Contains "Action Items" (Classified by header keyword + checkboxes)
  • notes.json: Contains "References" (Classified by header keyword)

Installation

# Install dependencies
npm install

# Link the package so you can use the 'notion-context' command globally
npm link

# Development mode (run without linking)
npm run dev -- --help
npm run dev sync

Usage

First-time Setup

Initialize the tool with your Notion integration token:

notion-context init

You'll need:

  1. A Notion integration token (get it from https://www.notion.so/my-integrations)
  2. Share your Notion pages/databases with the integration

Commands

init - Initialize configuration

notion-context init

sync - Fetch Notion data and generate context files (coming in Step 4-7)

notion-context sync

status - Show current configuration and sync status

notion-context status

doctor - Run health checks on your setup

notion-context doctor

reset - Delete configuration

notion-context reset

--help - Show help information

notion-context --help

--version - Show version

notion-context --version

Configuration

Configuration is stored at ~/.notion-context/config.json

{
  "notionToken": "your-token-here",
  "trackedPages": [],
  "trackedDatabases": [],
  "lastSync": null
}

Development Roadmap

  • Step 1: CLI scaffolding
  • Step 2: Config management
  • Step 3: Init command
  • Step 4: Notion client integration
  • Step 5: Normalization engine
  • Step 6: Context generation
  • Step 7: Sync command

License

MIT