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

codex-export

v0.1.0

Published

Export OpenAI Codex CLI sessions into human-readable Markdown, HTML, and JSON documents.

Readme

codex-export

codex-export exports OpenAI Codex CLI sessions from ~/.codex/sessions into readable Markdown, HTML, or JSON.

It is designed for engineering worklogs, retrospectives, GitHub discussions, Notion or Feishu docs, internal reports, and long-term archives of AI-assisted development.

Features

  • Interactive terminal UI with fuzzy session search, arrow navigation, pagination, and latest-first sorting
  • Command mode for scripts and CI workflows
  • Markdown, HTML, and JSON output
  • Clean conversation, full conversation, tool-call, and tool-result scopes
  • Automatic session discovery from ~/.codex/sessions/**/*.jsonl
  • Secret redaction for API keys, bearer tokens, authorization headers, AWS credentials, and common .env values
  • Session statistics and heuristic AI-worklog summary
  • Batch exports, daily reports, weekly reports, and timeline reports

Install

npm install
npm run build
npm link

Node.js 20 or newer is required.

Interactive Usage

codex-export

The interactive flow asks for:

  1. Session
  2. Export format
  3. Content scope
  4. Output location

Command Usage

codex-export --list
codex-export --last --output report.md
codex-export --id SESSION_ID --format html --output report.html
codex-export --file session.jsonl --format json --with-tool-results
codex-export --last --full --output full-session.md
codex-export --all --output exports
codex-export --daily --output daily.md
codex-export --weekly --with-tools --output weekly.md
codex-export --timeline --output timeline.md

Content Scopes

  • --clean: user and assistant conversation with internal metadata and noisy output removed
  • default command mode: same as --clean
  • --full: fuller user and assistant conversation with secrets redacted
  • --with-tools: conversation plus tool calls and commands
  • --with-tool-results: conversation plus tool calls and sanitized tool results

Interactive mode also exposes "Full Conversation"; the current parser still excludes system and developer instructions from exports to avoid leaking internal prompt context.

Output Formats

Markdown is the default:

codex-export --last --format md --output docs/codex-session.md

HTML:

codex-export --last --format html --output docs/codex-session.html

JSON:

codex-export --last --format json --with-tool-results --output docs/codex-session.json

Development

npm install
npm run typecheck
npm test

The tests use Node's built-in test runner and import the compiled ESM output from dist.

Publish to npm

  1. Create an npm access token with publish permission.
  2. In GitHub repo settings, add NPM_TOKEN in Settings → Secrets and variables → Actions.
  3. Bump package.json version (npm version patch|minor|major) before each release.
  4. Publish from local:
npm run prepublishOnly
npm publish
  1. Or publish from GitHub by creating and publishing a Release (triggers .github/workflows/publish-npm.yml via release.published).
  2. If needed, manually trigger the same workflow from Actions → Publish to npm → Run workflow (workflow_dispatch).

The publish workflow validates that package.json version is not already on npm before running npm publish.

Example

See examples/session.sample.jsonl for a minimal Codex session fixture.