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

@switchbot/codex-plugin

v0.1.5

Published

SwitchBot Codex plugin — wires Codex to the SwitchBot CLI MCP server (24 tools, zero Node.js dependencies)

Downloads

1,004

Readme

SwitchBot Codex Plugin

Codex plugin for SwitchBot smart-home control through the authoritative switchbot CLI MCP server.

What it installs

  • A Codex skill at skills/switchbot/SKILL.md
  • An MCP server definition that runs switchbot mcp serve --tools all
  • A best-effort onInstall hook that runs non-interactive setup when the CLI is present
  • Legacy helper binaries: switchbot-codex-auth and switchbot-codex-install

Requirements

  • Node.js >=18
  • @switchbot/openapi-cli >=3.7.1
  • Codex with plugin marketplace support

Install

Recommended

npx @switchbot/openapi-cli codex setup

switchbot codex setup installs or upgrades the CLI and Codex plugin packages if needed, registers the plugin with Codex, prompts for credentials when needed, then verifies the integration.

Direct Codex install

If you install the plugin from Codex itself, enable plugin hooks for automatic best-effort setup:

[features]
plugin_hooks = true

The hook never blocks plugin installation. If setup needs credentials or the SwitchBot CLI is missing, finish with:

npx @switchbot/openapi-cli codex setup

Verify

Run:

switchbot --version
switchbot doctor
switchbot devices list

Then restart Codex and ask:

List my SwitchBot devices and tell me which ones are currently on.

If install succeeds but you are not logged in

This usually means the plugin installed, but the browser auth step did not run or did not complete.

Run:

switchbot-codex-auth

If you prefer the CLI directly:

switchbot auth login
switchbot doctor

Do not paste your token or secret into Codex chat. The login flow stores credentials in your OS keychain.

Re-login

Use this when switchbot doctor reports auth failures, the token was rotated, or Codex says credentials exist but are rejected.

switchbot auth logout
switchbot auth login
switchbot doctor
switchbot devices list

After re-login, restart Codex and retry:

List my SwitchBot devices and tell me which ones are currently on.

Verify End-To-End

For a full release-style verification, run:

switchbot --version
switchbot doctor
switchbot devices list

Expected result:

  • switchbot --version is 3.7.1 or newer
  • switchbot doctor completes without credential failures
  • switchbot devices list returns your devices
  • Codex can answer the device prompt without asking for secrets

Uninstall

Remove the plugin entry:

codex plugin remove switchbot@codex-plugin

Older prerelease installs may have used switchbot@switchbot-skill; removing that id is harmless if Codex reports it is not installed.

If you installed the npm package globally and also want to remove the helper commands:

npm uninstall -g @switchbot/codex-plugin

Full Uninstall

To remove the plugin, local policy files, and stored login state:

codex plugin remove switchbot@codex-plugin
switchbot auth logout

Optional cleanup:

npm uninstall -g @switchbot/codex-plugin
npm uninstall -g @switchbot/openapi-cli

Key detail: deleting local files under ~/.switchbot does not automatically remove credentials from the OS keychain. Use switchbot auth logout when you want a true logout.