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

notionflow

v0.0.6

Published

Agent-agnostic workflow orchestrator for Notion

Readme

NotionFlow

Project-local orchestration CLI and typed library for running TypeScript factories against Notion tasks.

Local-First Model

NotionFlow now runs in a project directory, not a global config directory.

Each project contains:

  • notionflow.config.ts
  • factories/
  • .notionflow/ (runtime DB + logs)

run and tick load factories directly from paths declared in notionflow.config.ts.

Prerequisites

  • Node.js 20+
  • NOTION_API_TOKEN

Quickstart

# 1) Initialize a local NotionFlow project
npx notionflow init

# 2) Scaffold a factory file
npx notionflow factory create --id demo --skip-notion-board

# 3) Declare the factory in notionflow.config.ts
# Edit factories: ["./factories/demo.ts"] into the generated config

# 4) Validate project resolution and auth
npx notionflow doctor

# 5) Run one orchestration tick
npx notionflow tick --factory demo

You can run commands from anywhere inside the project tree; NotionFlow walks up directories to find notionflow.config.ts.

Config Discovery Rules

  • Default: walk up from current working directory to find notionflow.config.ts
  • Override: pass --config <path> on project-scoped commands (doctor, factory create, run, tick, integrations notion sync)
  • Project root is always the directory containing the resolved config file

Config Format

import {defineConfig} from 'notionflow'

export default defineConfig({
  factories: ['./factories/demo.ts', './factories/shared-helper-demo.ts'],
})

Factory declarations are explicit and deterministic:

  • Relative paths resolve from project root
  • Missing paths fail fast with path diagnostics
  • Duplicate factory IDs fail startup with conflict diagnostics

Runtime Artifacts

NotionFlow writes runtime state under .notionflow/:

  • .notionflow/notionflow.db
  • .notionflow/runtime.log
  • .notionflow/errors.log

notionflow init creates .notionflow/ and ensures it is in .gitignore.

Core Commands

notionflow init
notionflow doctor [--config <path>]
notionflow factory create --id <factory-id> [--config <path>] [--skip-notion-board]
notionflow tick [--loop] [--interval-ms <ms>] [--config <path>] [--board <id>] [--factory <id>]
notionflow run --task <notion_page_id> [--config <path>]
notionflow integrations notion provision-board --board <board-id>
notionflow integrations notion create-task --board <board-id> --title "..." [--factory <factory-id>]
notionflow integrations notion sync [--config <path>] [--board <board-id>] [--factory <factory-id>] [--run]

Library API

Use package-root typed APIs to author factories and config:

import {defineConfig, defineFactory, agent} from 'notionflow'

const doWork = agent(async ({ctx}) => ({
  status: 'done',
  data: {...ctx, completed: true},
}))

export const demoFactory = defineFactory({
  id: 'demo',
  start: 'start',
  context: {},
  states: {
    start: {
      type: 'action',
      agent: doWork,
      on: {done: 'done', failed: 'failed'},
    },
    done: {type: 'done'},
    failed: {type: 'failed'},
  },
})

export default defineConfig({
  factories: ['./factories/demo.ts'],
})

Examples

Project-style examples are in example-factories/:

  • explicit notionflow.config.ts
  • factories under factories/
  • shared runtime helper import example
  • setup notes and runnable commands

Docs