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

opencode-codex-oauth-manager

v1.0.2

Published

OpenCode OpenAI account manager, quota checker, and sidebar plugin installer

Readme

🌐 English | Türkçe

🚀 opencode-codex-oauth-manager

npm version

Dashboard Preview

"Built to make the OpenCode experience even more practical and seamless."

I originally developed opencode-codex-oauth-manager to streamline my own workflow while managing multiple OpenAI Plus, Team, or Business accounts within OpenCode. I decided to share it with the community, hoping it might be useful for others who deal with similar setups.


⚡ At a Glance: Why It’s Critical

Managing several high-tier accounts manually is a productivity killer. Here’s why this tool is your new unfair advantage:

  • 🔥 Zero-Friction Switching: Swap active accounts in under 2 seconds. No config file editing, no logout/login loops.
  • ⚡ Instant Apply: No restart required! Changes apply to OpenCode in real-time. Just switch and keep working.
  • 📊 Real-Time Quota Intel: Don't guess. On every startup, it pings OpenAI to show you exactly how many messages you have left and the precise reset time.
  • 🧠 Smart Auto-Sync: It automatically detects your active OpenCode account and securely clones it into your local database.
  • 🛡️ Use Responsibly: This tool is built for productivity. Please do not abuse the system.
  • 💎 Pro Support: Perfect for Pro account users too. (And if you actually manage to finish your Pro quota, hats off to you! 😄)

🔥 Why It's a Game Changer

If you're an OpenCode power user, this is your new unfair advantage:

  • 🚀 Speed: Switch between personal and business accounts faster than you can type a message.
  • 📉 Transparency: See your 5-hour and weekly limits in color-coded ASCII bars.
  • 📈 Insights: Track usage statistics to see which accounts are providing the most value.
  • 💾 Portability: Easily backup your entire account repository and move it to another machine.
  • 🌍 Universal: Native, high-performance support for Windows, Linux, and macOS.

🛠️ Features That Actually Matter

  • Interactive Command Center: A sleek, intuitive menu for renames, health checks, and switching.
  • Auto-Health Check: Optional automatic refresh on startup so you're always working with fresh data.
  • Account Labeling: Give your accounts human names like Company-Business or Backup-Plus-2.
  • i18n Ready: Dynamic auto-detection for English and Turkish languages.
  • Local-First Security: Your tokens stay on your machine. We never touch your secrets.
  • OpenCode Sidebar Plugin (NEW): Includes an optional TUI sidebar panel with quick account switching, compact quota view, refresh control, auto-refresh toggle, and saved UI preferences.

🚀 Quick Start & Installation

Prerequisites

Setup

  1. Install from npm:
    npm install -g opencode-codex-oauth-manager
  2. Launch: Type oc-hesap in any terminal.
  3. Optional sidebar plugin:
    oc-hesap install-plugin
    Restart OpenCode after installing the sidebar plugin.

Update

npm update -g opencode-codex-oauth-manager

🎮 Interactive Commands

Forget about complex flags. Manage everything with single keystrokes:

  • [Number]: Instantly switch to that account.
  • 0: Force a manual refresh of all account health/quotas.
  • r [N] [Name]: Rename account number N to a custom name.
  • l: Toggle interface language (English/Turkish).
  • b: Create a timestamped backup of your account database.
  • i: Import an existing backup file.
  • q: Exit the manager.

🧩 Optional Sidebar Plugin

This repository now includes an OpenCode TUI sidebar plugin at plugin/oc-hesap-sidebar.

What it provides:

  • Compact quota panel with status badge (OK, MID, LOW, ERR)
  • Manual refresh with cooldown indicator
  • Auto-refresh toggle
  • Accordion account list with one-click account switching
  • Preferences persistence (panel, accounts, auto refresh) via OpenCode KV

Quick setup:

oc-hesap install-plugin

This updates ~/.config/opencode/tui.json automatically. Restart OpenCode after installing the sidebar plugin.


📦 npm Package & Releases

The package is published on npm as opencode-codex-oauth-manager.

Release flow for maintainers:

npm version patch
git push origin master --tags

GitHub Actions publishes tagged releases to npm automatically. The repository must define an Actions secret named NPM_TOKEN with npm publish permissions.

For future AI-assisted maintenance, see AI_CONTEXT.md.


➕ How to Add New Accounts

Adding accounts is 100% automated and friction-free:

  1. Open OpenCode.
  2. Type /connect and select OpenAI.
  3. Log in to your new account.
  4. Run oc-hesap.
  5. Boom! The new account is detected and added to your list automatically.

🗺️ 2026 Roadmap

Phase 1: Foundations (Completed) ✅

  • [x] Modular Architecture: Professional code structure for high stability.
  • [x] Cross-Platform Support: Native installers for all OS.
  • [x] Auto-Sync: Automatic detection of new OpenCode logins.
  • [x] Usage Statistics: Tracking account usage counts.
  • [x] i18n Support: Dynamic English/Turkish toggle.
  • [x] Backup System: Export/Import functionality.

Phase 2: Power & Security (In Progress) 🏗️

  • [ ] Master Password: AES-256 encryption for stored tokens.
  • [ ] Parallel Checks: Refresh all account statuses simultaneously.
  • [ ] Manual Management: Add/Remove accounts via CLI directly.

Phase 3: The Future (Coming Soon) 🌟

  • [ ] TUI Dashboard: A fully graphical terminal interface.
  • [ ] Desktop Notifications: Alerts when your quota resets.
  • [ ] Cloud Sync: Securely sync across multiple devices.

🤝 Acknowledgments & Community

Special thanks to the OpenCode team for building such an incredible ecosystem.

Stay Connected

Follow the journey and get the latest updates on Twitter: 👉 @FitzGPT


📄 License

Licensed under the MIT License.