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

agent-convert

v0.1.1

Published

Convert Claude Code, Codex CLI, Hermes, Google AI Studio, and pi JSONL session files into Claude Code, Codex CLI, Cursor, or pi JSONL.

Readme

agent-convert

Convert coding-agent sessions from one format to another. Claude Code to Codex CLI. Codex to Claude Code. Google AI Studio or Hermes exports into the same portable session format, then onward into the harness you want to use next. One local CLI turns agent transcripts into files you can resume, inspect, or move between tools.

agent-convert: claude session converted and installed, codex resume ready

npm i -g agent-convert

# Claude Code session -> Codex, installed so `codex resume` sees it
agent-convert ~/.claude/projects/<project>/<session-id>.jsonl --to codex

# Codex rollout -> Claude Code session file
agent-convert ~/.codex/sessions/2026/07/02/rollout-<ts>-<id>.jsonl --to claude out.jsonl

# Google AI Studio export -> Cursor standalone sqlite database
agent-convert chat.json --from google-ai-studio --to cursor out.vscdb

# Any supported file export -> the pi JSONL pivot format
agent-convert chat.json --from google-ai-studio --to pi

Source format is auto-detected (--from auto is the default). With no output path, the codex target installs (opt out with --no-install); every other target writes a sibling file like session.pi.jsonl. Everything runs locally — no network calls, no telemetry, your transcripts never leave your machine. (Install note: npm may print deprecation warnings from the optional native sqlite3 chain — they're upstream noise, and only Cursor support needs sqlite3 at all.)

Support matrix

Direct file conversions through agent-convert:

| from \ to | pi | claude | codex | cursor | |---|---|---|---|---| | claude (Claude Code) | ✓ | — | ✓ | ✓ | | codex (Codex CLI) | ✓ | ✓ | — | ✓ | | hermes | ✓ | ✓ | ✓ | ✓ | | google-ai-studio | ✓ | ✓ | ✓ | ✓ | | pi | — | ✓ | ✓ | ✓ |

Every conversion pivots through the pi JSONL session format; any direct file source can become any target in one command.

Cursor IDE sessions live in a sqlite store, not files. Use the plumbing command to discover/extract one, then convert onward:

agent-convert-to-pi cursor --list
agent-convert-to-pi cursor --chat-id <composerId> cursor.pi.jsonl
agent-convert cursor.pi.jsonl --from pi --to codex out.codex.jsonl

Conversion examples

# Claude Code -> Codex CLI
agent-convert claude-session.jsonl --to codex

# Codex CLI -> Claude Code
agent-convert rollout.jsonl --to claude claude-session.jsonl

# Hermes -> Google-independent pivot archive
agent-convert hermes-session.json --to pi archive.pi.jsonl

# Google AI Studio -> Codex CLI
agent-convert gais-export.json --from google-ai-studio --to codex out.codex.jsonl

# Claude Code -> Cursor standalone database
agent-convert claude-session.jsonl --to cursor out.vscdb

# Machine-readable summary for agents and scripts
agent-convert claude-session.jsonl --to codex --json

Commands

  • agent-convert — one-shot <input> [output] --from auto --to <fmt> (this is the one you want).
  • agent-convert-to-pi — plumbing: per-source import into pi JSONL, with every knob (--drop-thinking, --keep-pre-compaction-history, cursor chat discovery, --install into ~/.pi/agent/sessions/…).
  • agent-convert-from-pi — plumbing: pi JSONL → target format, with per-target knobs (session ids, models, --keep-thinking, install behavior…).

The plumbing commands are namespaced so global npm installs do not collide with other tools that already own generic names like convert-to-pi.

Harness-specific install semantics worth knowing:

  • codex is the only target with registration bookkeeping: --install (the default when no output path is given) writes ~/.codex/sessions/YYYY/MM/DD/rollout-….jsonl and appends ~/.codex/session_index.jsonl — without the index entry, codex resume won't list the session.
  • claude discovers sessions by directory scan: --install just drops the file into ~/.claude/projects/<encoded-cwd>/.
  • cursor --install merges into the live state.vscdb (quit Cursor first; a timestamped backup of the db is made).

Agent-native by construction

These CLIs are built to be driven by agents, not just people:

  • <bin> agent-context emits a versioned JSON schema of the full command surface — flags, args, subcommands — so an agent can discover capabilities without parsing --help.
  • <bin> feedback "<note>" records friction reports to ~/.<bin>/feedback.jsonl (and POSTs upstream if <BIN>_FEEDBACK_ENDPOINT is set), so agent users have a channel back to the maintainers.
  • --json on conversions emits machine-readable results.

Library

The format layer is importable — parse/serialize any supported session format:

import { parseSession, getActivePath } from "agent-convert/session-core";
import { importCodexToPi } from "agent-convert/codex";
import { exportPiToClaudeJsonl } from "agent-convert/claude-code";
import { detectSource } from "agent-convert/detect";

Fidelity notes

Conversion is structure-preserving but not always lossless — formats disagree about what a session even is. The honest details (thinking blocks, tool-id sanitization rules, codex compaction history, cursor tool-bubble mapping) live in docs/formats.md, field notes on each harness's session format.

Platform: macOS and Linux (CI-tested). Windows: untested — reports welcome. Reading Cursor sessions needs the native sqlite3 module (an optional dependency; everything else works without it).

Release checks

Before tagging or publishing:

npm test
npm run leakscan
npm pack --dry-run

The tag release workflow repeats the test and leak-scan gates before publishing to npm with provenance. See RELEASE_CHECKLIST.md for the full checklist.

Known issues

  • No --dry-run yet; to inspect before installing, pass an explicit output path (or --no-install for codex) and look at the file.
  • A wrong manual --from surfaces the underlying parser error rather than "this looks like a claude session" — prefer --from auto (the default), whose detection is reliable.
  • Rare known edge cases inherited from the source toolkit: a Cursor double-wrap on one exotic bubble shape, and two latent id-handling corners (codex compaction orphans, hermes ids) that we've never hit in practice. Tracked in issues.
  • npm i -g prints deprecation warnings from the optional native sqlite3 dependency chain (upstream; harmless; only Cursor support uses sqlite3).

Status

Pre-1.0: extracted from the internal toolkit we use daily at Theoric (an applied AI lab focused on the intersection of formal methods and agentic AI) to run a multi-harness agent org. v1.0 lands shortly, with the launch write-up.

MIT © Theoric Labs