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

@alexlikespie/agentswitch

v1.0.0

Published

Switch between CLI agents while saving chat history

Readme

AgentSwitch

Offline session migration for LLM command-line tools.

AgentSwitch converts local session history between supported providers without uploading data to a cloud service or requiring an MCP server. It bundles a source session into a portable session.tar.gz archive, then restores it in the target provider's session format.

Supported Providers

  • claude-code
  • codex
  • antigravity

Features

  • Converts sessions locally and offline.
  • Preserves messages, tool calls, files, and session metadata where supported.
  • Automatically selects the most recent source session when no session ID is provided.
  • Prints a resume command for the converted target session.

Requirements

  • Node.js 18 or newer
  • npm

Installation

With npm:

npm install -g @alexlikespie/agentswitch

By cloning this repo and compiling yourself:

git clone <repository-url>
cd agentswitch
npm install
npm run build

The compiled CLI is written to dist/.

Usage

node ./dist/cli/convert.js -s <source> -t <target> [options]

You can also run the package binary after installation:

npx local-converter -s <source> -t <target> [options]

Required Options

  • -s, --source <id>: source provider identifier. Supported values are claude-code, codex, and antigravity.
  • -t, --target <id>: target provider identifier. Supported values are claude-code, codex, and antigravity.

Optional Options

  • -c, --cwd <dir>: directory that contains the source session files. Defaults to the current working directory.
  • -i, --session <id>: specific session ID to convert. If omitted, AgentSwitch selects the most recent session for the source provider.
  • -o, --bundle <file>: path for the temporary bundle file. Defaults to session.tar.gz inside the working directory.

Examples

Convert the most recent Antigravity session in the current project to Codex:

node ./dist/cli/convert.js -s antigravity -t codex

Convert a Codex session from another project directory to Claude Code:

node ./dist/cli/convert.js -s codex -t claude-code -c /path/to/project

Convert a specific session and write the temporary bundle to a custom location:

node ./dist/cli/convert.js \
  -s codex \
  -t antigravity \
  -i <session-id> \
  -o /path/to/session.tar.gz

How It Works

  1. AgentSwitch scans the source provider's local session storage for sessions associated with the selected working directory.
  2. The selected session is bundled into a gzipped tar archive.
  3. The bundle is restored into the target provider's local session layout.
  4. Paths and provider-specific metadata are rewritten for the target environment where possible.
  5. A resume command is printed so the converted session can be opened in the target CLI.

Project Structure

agentswitch/
├── package.json
├── tsconfig.json
├── README.md
└── src/
    ├── cli/
    │   └── convert.ts
    ├── core/
    └── shared/

Development

npm install
npm run build

Run a local sanity check after building:

node ./dist/cli/convert.js -s codex -t antigravity -c /path/to/project

Privacy

AgentSwitch is designed for local conversion. Session data is read from disk, written to a local bundle, and restored locally for the target provider. Review generated bundles before sharing them, because they may contain conversation history, file contents, and metadata from the converted session.

License

This project includes code derived from CodeTeleport, which is MIT licensed. AgentSwitch maintains the same license.