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

solid-notion

v0.1.0

Published

CLI to read and edit Notion pages as Markdown with reversible changesets.

Readme

solid-notion

For Chinese documentation, see README_CN.md.

solid-notion is a CLI that lets humans and AI assistants work with Notion pages in a safer, more practical way.

Instead of treating Notion as a raw JSON API, this tool focuses on three principles:

  • Revertable
  • Observable
  • Auditable

What It Is

solid-notion is a TypeScript CLI for reading, editing, and writing Notion pages with local history.

It supports two core workflows:

  • Markdown workflow (pull -> edit -> write -> history -> restore)
  • Patch workflow (edit (JSON patch) -> submit -> history -> restore)

The goal is simple: make AI-assisted Notion operations safer and easier to understand.

Why Not Just Call Notion API Directly?

Direct Notion API usage works, but it has real limitations for AI workflows:

  • Raw JSON is noisy and token-heavy, especially for large pages
  • It is harder to inspect what changed and why
  • Rollback is often custom, incomplete, or missing

solid-notion improves this by design.

1) Revertable

Changes are designed to be undone.

  • write produces local changesets
  • submit produces local version records
  • restore can move back to a historical hash by reversing later submit operations
  • Restoring to a version also removes local version files after that target hash

This is similar to Git-style safety for content operations.

2) Observable

You can see state clearly, locally, and quickly.

  • ls shows pulled pages in local storage
  • history shows timeline hashes (changeset, submit, new)
  • show page --format markdown gives high-signal content for review

For LLMs, markdown output has much better signal-to-noise ratio than Notion JSON.

3) Auditable

Actions leave local evidence.

  • Edit logs
  • Version records
  • Changesets

This makes it easier to debug, review, and explain what happened after automation runs.

Why It Is Better for LLM-Based Automation

  • Lower token cost: markdown is compact compared to Notion block JSON
  • Better comprehension: less structural noise, more actual content
  • Safer execution: rollback-oriented workflow by default
  • Better postmortems: local audit trail for every significant operation

In short: less noise, more control, better safety.

How It Works (High-Level)

  1. Pull page content to local files (pull page)
  2. Read/edit in markdown or patch form
  3. Apply changes (write or submit)
  4. Inspect history (history)
  5. Restore by hash when needed (restore)

When you run pull page without --outdir, output goes to:

$SOLID_NOTION_HOME/<normalized_page_id>

If a page is already pulled, pulling again fetches the latest content from Notion and overwrites local files.

Key Commands

solid-notion ls [--json]
solid-notion pages
solid-notion search <query>
solid-notion show page <page_id_or_name> [--format markdown|json]
solid-notion pull page <page_id_or_name> [--format json|markdown] [--outdir <dir>]
solid-notion edit <notion_id_or_markdown_path>
solid-notion submit <page_id> -m "message"
solid-notion write <page_id>
solid-notion history <page_id>
solid-notion restore <page_id_or_hash> [changeset_or_commit_id]

Install

For normal usage (after publish to npm):

npm install -g solid-notion
solid-notion --version

Build From Source

pnpm install
pnpm build

Dev validation:

pnpm lint
pnpm typecheck
pnpm test:utils

Who This Is For

  • Teams building AI assistants that operate on Notion
  • Engineers who need safe, traceable content automation
  • Anyone who wants Git-like confidence for Notion edits