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-mirror

v0.1.8

Published

Local multi-account manager for Codex CLI with isolated runtime/auth state and TUI clone management.

Readme

codex-mirror

codex-mirror is a local multi-account manager for Codex.
It creates centrally stored clones, each with isolated runtime and isolated auth/session/config state.

This project currently targets official Codex only (Phase 1). Multi-provider support is planned for Phase 2.

Unofficial community tool. Not affiliated with OpenAI.

What you get

  • Screen-based TUI (codex-mirror) with clone lifecycle management
  • Centralized clone storage under one global home
  • Per-clone runtime pinning (copied from currently installed Codex)
  • Per-clone isolated HOME and XDG directories
  • Wrapper command per clone name
  • Built-in diagnostics (doctor) for runtime/wrapper/writable/auth checks
  • Safety protections:
    • Strict clone-name validation
    • Wrapper path confinement (no path traversal)
    • Registry lock + atomic writes
    • Transactional clone create/update/remove with rollback

Requirements

  • macOS/Linux (Node.js 20+)
  • codex available on PATH

Quick start

Direct run (no install):

npx codex-mirror@latest

Global install:

npm install -g codex-mirror
codex-mirror

Local development:

npm install
npm run build
node dist/cli.js

Demo

codex-mirror demo

npx codex-mirror@latest

GIF source path: docs/assets/demo.gif Direct link (for npm): https://raw.githubusercontent.com/Mohit-Patil/codex-mirror/main/docs/assets/demo.gif

From the TUI main menu:

  1. Choose Quick Clone.
  2. Optionally run login for that clone.
  3. Use Manage Clones to run, update, remove.
  4. Use Diagnostics for health checks.
  5. Use Shell PATH Setup to auto-configure wrapper discovery.
  6. Use Star on GitHub to open the repository page.
  7. Choose Exit for a final Star and Exit / Skip and Exit prompt.

CLI usage

Examples below use the installed command. For local development from source, replace codex-mirror with node dist/cli.js.

# Create clone (default root: ~/.codex-mirror/clones/<name>)
codex-mirror create --name work

# List clones
codex-mirror list
codex-mirror list --full
codex-mirror list --json

# Run clone
codex-mirror run work
codex-mirror run work -- --model o3

# Login/logout
codex-mirror login work
codex-mirror logout work

# Health checks
codex-mirror doctor
codex-mirror doctor work --json

# Updates
codex-mirror update work
codex-mirror update --all

# Remove clone
codex-mirror remove work

# Reinstall wrappers
codex-mirror wrapper install

# Check/setup PATH for wrapper commands
codex-mirror path status
codex-mirror path setup

Data layout

Default locations:

  • Mirror home: ~/.codex-mirror
  • Registry: ~/.codex-mirror/registry.json
  • Clone root: ~/.codex-mirror/clones/<clone-name>
  • Wrapper binaries: ~/.local/bin/<clone-name>

Per clone:

<clone-root>/
  .codex-mirror/
    clone.json
    runtime/
    home/
      .codex/
      .config/
      .local/share/
      .cache/
    logs/

Path overrides:

  • CODEX_MIRROR_HOME (changes global root)
  • CODEX_MIRROR_BIN_DIR (changes wrapper output dir)

After adding clones, if wrappers are not found by name:

codex-mirror path setup

Then reload shell (example for bash):

. ~/.bashrc

Safety model

  • Clone names are validated and must be filesystem-safe.
  • Wrapper paths are forced to remain inside configured wrapper directory.
  • Registry updates are lock-protected and written atomically.
  • Create/update/remove operations include rollback to avoid partial state.
  • Health checks use bounded concurrency and auth timeouts.

Detailed docs:

  • docs/ARCHITECTURE.md
  • docs/SECURITY.md
  • docs/OPERATIONS.md
  • docs/TROUBLESHOOTING.md
  • docs/ROADMAP.md
  • docs/RELEASE.md

Development

npm run check

Community

  • Contributing guide: CONTRIBUTING.md
  • Code of Conduct: CODE_OF_CONDUCT.md
  • Security policy: SECURITY.md
  • Support info: SUPPORT.md

Maintainer release flow

  1. Ensure main is green in CI.
  2. Update version:
    npm version patch
  3. Push commit + tag:
    git push origin main --follow-tags
  4. Tag trigger v* runs .github/workflows/release.yml and publishes to npm.
  5. Release workflow enforces tag version == package.json version (for example: v0.1.5 requires "version": "0.1.5").