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 🙏

© 2025 – Pkg Stats / Ryan Hefner

cx-switch

v0.1.17

Published

A beautiful web UI for managing and switching Codex API provider configurations

Readme

CX Switch

A beautiful web UI for managing and switching Codex API provider configurations.

CX Switch Screenshot

Features

  • 🪟 Windows/WSL Sync: Optional toggle keeps Windows and WSL configs in sync when switching
  • 🎨 Modern Interface: Beautiful, intuitive web UI with glass-morphism design
  • 🔐 Secure Storage: Keys stored safely in ~/.cx-switch/ (not affected by npm updates)
  • 🔑 Key Masking: Sensitive information hidden by default with toggle visibility
  • 🌍 Multi-language: Support for English, 中文, and Español
  • Fast Switching: One-click switching between providers
  • 📦 Easy Management: Add, edit, and delete configurations effortlessly
  • 🔄 Export: Export to ~/.codex directory or clipboard
  • 🎯 Project Trust: Manage project-specific trust levels
  • 🚀 Quick Start: Simple CLI command to launch

Installation

Global Installation (Recommended)

npm install -g cx-switch

Run Directly with npx

npx cx-switch

Local Development

git clone https://github.com/mahaoyang/cx-switch.git
cd cx-switch
npm install
npm run dev

Usage

After installation, simply run:

cx-switch
# or use the shorter command
cx

This will:

  1. Start the local server on port 3000
  2. Automatically open your browser
  3. You can start managing your Codex configurations!

Adding a Provider

  1. Click "Add New" button
  2. Fill in your API details:
    • API Base URL: e.g., https://api.openai.com/v1
    • API Key: Your OpenAI API key (sk-...)
    • Model: e.g., gpt-5.1-codex-max, claude-3-opus
    • Reasoning Effort: low, medium, high, or xhigh (optional)
  3. Configure advanced options (optional):
    • Custom provider settings
    • Additional auth fields
    • Project trust levels
  4. Click "Save"

Switching Providers

  1. Select a provider from the left sidebar
  2. Click "Switch to this provider" button
  3. The active provider will be marked with "Current"

Switching automatically writes auth.json and config.toml into your ~/.codex directory under the current user. When running on Windows or inside WSL, a tooltip-enabled toggle appears next to the button so you can also sync the other side (Windows ↔ WSL) in one go.

Exporting Configuration

Go to the "Export Configuration" tab and choose:

  1. Export to ~/.codex directory: Directly writes files to your Codex directory
  2. Copy auth.json: Copies auth.json content to clipboard
  3. Copy config.toml: Copies config.toml content to clipboard

Data Storage

Your configurations are stored in ~/.cx-switch/:

~/.cx-switch/
├── providers.json         # Your provider configurations
├── active-provider.json   # Currently active provider
└── global-config.json     # Global settings

Important Notes:

  • ✅ This directory is separate from the npm package
  • ✅ Your data is safe during npm updates
  • ✅ API keys stored locally, never sent to any server
  • 📦 You can backup this directory to preserve your configurations

Configuration Examples

auth.json

{
  "OPENAI_API_KEY": "sk-your-api-key-here"
}

config.toml

model = "gpt-5.1-codex-max"
model_reasoning_effort = "xhigh"

# Custom provider configuration
model_provider = "azure"

[model_providers.azure]
base_url = "https://your-resource.openai.azure.com/v1"
wire_api = "responses"
requires_openai_auth = true

# Project trust levels
[projects."/home/user/workspace/my-project"]
trust_level = "trusted"

Tech Stack

  • Vue 3: Progressive JavaScript framework
  • Vite: Next generation frontend tooling
  • Tailwind CSS 4: Utility-first CSS framework
  • Lucide Icons: Beautiful icon set
  • vue-i18n: Internationalization

Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Run CLI locally
npm start

Browser Support

  • Modern browsers (Chrome, Firefox, Safari, Edge)
  • File System Access API support (for directory export)
  • Clipboard API support (for copy functions)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License

Author

hy