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

@joseftmson/notion-sync

v1.2.0

Published

Daily Codex and terminal log sync to Notion with encrypted local state.

Downloads

110

Readme

notion-sync

notion-sync is a local-first CLI for turning Codex sessions, terminal logs, and shell history into structured Notion documentation.

It is designed for people who want:

  • private local collection
  • secret masking before upload
  • encrypted local sync state
  • direct sync to Notion or remote delivery into a hosted intake API

Highlights

  • Local-first: reads logs from your machine instead of from a browser upload
  • Safe-by-default: masks common tokens and stores sync state encrypted
  • Flexible delivery: send directly to Notion or to a remote API
  • Automation-friendly: works with cron, CI, and hosted intake workflows

Install

npm install -g @joseftmson/notion-sync

Package:

  • https://www.npmjs.com/package/@joseftmson/notion-sync

Repository:

  • https://github.com/jozrftamson/notion-sync

Setup

  1. Create a working folder:
mkdir notion-sync-workspace
cd notion-sync-workspace
  1. Generate a starter config:
notion-sync init
  1. Edit .env and fill in:
  • NOTION_TOKEN
  • NOTION_DATABASE_ID
  • ENCRYPTION_KEY
  1. Validate the environment:
notion-sync doctor
  1. Preview and sync:
notion-sync dry-run
notion-sync run

Default input paths:

  • Codex sessions: ~/.codex/sessions
  • Terminal logs: ~/terminal-logs
  • Shell history: auto-detected from the current shell

Override them with:

  • CODEX_SESSIONS_DIR
  • TERMINAL_LOG_DIR
  • SHELL_HISTORY_FILE
  • NOTION_SYNC_STATE_FILE
  • NOTION_SYNC_API_URL
  • NOTION_SYNC_USER_LABEL
  • NOTION_SYNC_SOURCE

Scheduling

Example cron entry:

55 23 * * * /usr/bin/env notion-sync run >> "$HOME/.local/state/notion-sync/upload.log" 2>&1

Security model

  • Local sync state is encrypted with AES-256-GCM using ENCRYPTION_KEY.
  • Uploads to Notion use HTTPS/TLS.
  • Common secrets are masked before upload.
  • Raw source logs are never modified.

Quickstart

npm install -g @joseftmson/notion-sync
mkdir notion-sync-workspace
cd notion-sync-workspace
notion-sync init
notion-sync doctor
notion-sync report
notion-sync run

Commands

notion-sync init
notion-sync doctor
notion-sync help
notion-sync status
notion-sync report
notion-sync open
notion-sync dry-run
notion-sync run
notion-sync remote
notion-sync export-codex ~/.codex/sessions/2026/03/09/session.jsonl --output ./exports/session.md
notion-sync export-codex-latest --output ./exports/latest-session.md
notion-sync export-codex-latest --latest 5 --output-dir ./exports
notion-sync export-codex-latest --send-to-notion
notion-sync export-codex-latest --send-remote

Codex session export

Convert a raw Codex jsonl session into readable Markdown or text:

notion-sync export-codex ~/.codex/sessions/2026/03/08/session.jsonl
notion-sync export-codex session.jsonl --format text --output ./session.txt
notion-sync export-codex session.jsonl --output-dir ./exports
notion-sync export-codex-latest --output ./latest-session.md
notion-sync export-codex-latest --latest 5 --output-dir ./exports
notion-sync export-codex-latest --send-to-notion
notion-sync export-codex-latest --send-remote

This is useful when you want a human-readable chronology before sending the content to Notion.

Remote upload mode

If you want users to send their local logs into your hosted Vercel app instead of writing directly to Notion from the CLI:

export NOTION_SYNC_API_URL="https://your-app.vercel.app/api/sync"
export NOTION_SYNC_USER_LABEL="alice"
notion-sync remote

This sends the current collected report to the remote API. The Vercel app can then create the Notion page centrally.

Screenshots

Suggested screenshots for the repository:

  • CLI doctor output
  • CLI report preview
  • successful remote upload response

Recommended asset paths:

  • docs/screenshots/cli-doctor.png
  • docs/screenshots/cli-report.png
  • docs/screenshots/cli-remote.png