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

v0.2.1

Published

Switch Codex CLI auth contexts without wrapping the codex command.

Readme

codex-ctx

Switch Codex CLI auth contexts without wrapping the codex command.

codex-ctx switches only ~/.codex/auth.json. Your Codex sessions, config, logs, caches, and history stay shared in ~/.codex.

Install

npm install -g codex-ctx

Usage

Initialize codex-ctx from your current Codex login:

codex-ctx init

Add another account:

codex-ctx create work
codex login
codex-ctx add work

create starts a blank context for the next login. add saves the currently active Codex login into a named context.

Switch accounts before starting Codex:

codex-ctx use default
codex

codex-ctx use work
codex

List and inspect contexts:

codex-ctx list
codex-ctx current
codex-ctx doctor

Remove a context:

codex-ctx remove work

Rename a context:

codex-ctx rename work company

Commands

codex-ctx init             # save current ~/.codex/auth.json as default
codex-ctx add <name>       # save current ~/.codex/auth.json as a context
codex-ctx create <name>    # create an empty context and clear active auth
codex-ctx use <name>       # restore a saved context to ~/.codex/auth.json
codex-ctx rename <old> <new>
codex-ctx list             # list saved contexts
codex-ctx current          # show current context
codex-ctx remove <name>    # remove a saved context
codex-ctx doctor           # show storage and auth status

Aliases:

init --force overwrites the saved default context with the current active auth.

save   -> add
new    -> create
switch -> use
mv     -> rename
ls     -> list
status -> current
rm     -> remove
delete -> remove

Storage

Shared Codex home:

~/.codex/
  auth.json
  config.toml
  sessions/
  log/
  cache/

Auth contexts:

~/.codex-auth-contexts/
  personal/auth.json
  work/auth.json

State:

~/.codex-ctx/
  current

Notes

codex-ctx does not install a codex wrapper and does not modify your shell PATH. Run codex-ctx use <name> before codex.

If you previously used the experimental codex ctx wrapper, remove it manually if needed:

rm ~/.local/bin/codex
hash -r 2>/dev/null || rehash

Only remove that file if it is the codex-ctx wrapper.

Security

codex-ctx copies Codex auth files on your local machine. It does not upload credentials or talk to a network service. Treat ~/.codex-auth-contexts with the same care as ~/.codex/auth.json.