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

claude-mimo

v0.1.0

Published

One-shot CLI that points Claude Code at a Xiaomi MiMo endpoint, with per-account profile switching.

Readme

claude-mimo

One-shot CLI that installs Claude Code and points it at the Xiaomi MiMo Anthropic-compatible endpoint — with per-account profile switching.

node License: MIT GitHub

Setting up Claude Code against a MiMo endpoint takes 4 manual steps: install the CLI, find the right env vars, locate ~/.claude/settings.json, edit two JSON files. If you have multiple MiMo accounts (one per project) you do this dance every time you switch.

claude-mimo collapses all of that into a single command — and remembers each account as a named profile you can switch between in one line.

Install

Install directly from GitHub (no npm registry account needed):

npm install -g github:FlipZ3ro/claude-mimo

Or run it once without installing:

npx github:FlipZ3ro/claude-mimo setup

Or clone manually:

git clone https://github.com/FlipZ3ro/claude-mimo
cd claude-mimo
node bin/claude-mimo.mjs setup

Requires Node.js 18+.

Quick start

# interactive (prompts for missing values)
claude-mimo setup

# one-shot
claude-mimo setup \
  --key tp-xxxxxxxxxxxxxxxxxxxx \
  --profile mimo-swe \
  --model mimo-v2.5-pro

That single command:

  1. installs @anthropic-ai/claude-code globally (skipped if already present),
  2. writes ~/.claude/settings.json with the MiMo env block,
  3. writes ~/.claude.json with hasCompletedOnboarding: true,
  4. saves the config as a named profile under ~/.claude/mimo-profiles/<name>.json,
  5. backs up any pre-existing settings to *.bak-<timestamp>,
  6. warns you if conflicting ANTHROPIC_* env vars are already set in your shell.

Reopen your terminal, then run claude from any project directory.

Multi-account workflow

If you have multiple MiMo accounts (e.g. one per side project), set them up once:

claude-mimo setup --profile swe       --key tp-aaa
claude-mimo setup --profile synth     --key tp-bbb
claude-mimo setup --profile mmeval    --key tp-ccc

Switch between them in a second:

claude-mimo use swe
claude-mimo use synth

List all saved profiles (active one is marked):

$ claude-mimo list
Profiles:
  ● active  swe       mimo-v2.5-pro · tp-aaaaa…aaaa
            synth     mimo-v2.5-pro · tp-bbbbb…bbbb
            mmeval    mimo-v2.5-pro · tp-ccccc…cccc

Subcommands

| Cmd | What it does | |------------------------|--------------------------------------------------------------------| | setup | install Claude Code, write configs, save profile | | list | list saved profiles, mark which one is currently active | | use <name> | switch active profile (atomically re-writes settings.json) | | status | print current settings.json env + installed Claude Code version | | unset | remove the MiMo env block, restore the official Anthropic default | | --help | print full help |

Setup flags

| Flag | Default | |-------------------|------------------------------------------------------| | --key <tp-...> | (required) — also read from MIMO_API_KEY env | | --base-url <u> | https://token-plan-sgp.xiaomimimo.com/anthropic | | --model <id> | mimo-v2.5-pro | | --profile <n> | default | | --skip-install | assume claude is already on PATH | | --dry-run | show what would change, write nothing |

For MiMo's 1M-context variant, append [1m] to the model id:

claude-mimo setup --key tp-xxx --model 'mimo-v2.5-pro[1m]'

Run /context inside Claude Code to verify long context kicks in.

What gets written where

| File | What | |--------------------------------------------|-------------------------------------------------------| | ~/.claude/settings.json | env.ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL (+ Sonnet/Opus/Haiku defaults) | | ~/.claude.json | hasCompletedOnboarding: true | | ~/.claude/mimo-profiles/<profile>.json | per-profile snapshot for use <name> | | <file>.bak-<timestamp> | automatic backup before any write |

Existing JSON keys are preserved — claude-mimo does a deep merge, it does not overwrite unrelated settings.

After running setup

  1. Reopen your terminal so the new settings.json takes effect.
  2. If your shell has lingering ANTHROPIC_AUTH_TOKEN or ANTHROPIC_BASE_URL env vars, unset them — they win over settings.json. claude-mimo warns you and prints the exact command for your OS.
  3. cd into a project, run claude, then /status to verify the model.

Troubleshooting

claude --version is not found. Reopen your terminal — npm install -g adds the binary to your PATH, but only new shells see it.

Calls 401 / Unauthorized. Your shell still has an ANTHROPIC_AUTH_TOKEN from a previous setup. Run unset ANTHROPIC_AUTH_TOKEN ANTHROPIC_BASE_URL (POSIX) or setx ANTHROPIC_AUTH_TOKEN "" (Windows) and reopen the terminal.

Wrong base URL. Different MiMo deployments use different paths. Common variants:

  • https://token-plan-sgp.xiaomimimo.com/anthropic
  • https://token-plan-sgp.xiaomimimo.com/v1

Override with --base-url. The CLI never validates the URL — that's intentional so you can use it against any Anthropic-compatible gateway.

Privacy

The CLI talks to npm and claude locally on your machine. It writes only to files under ~/.claude/ and ~/.claude.json. No telemetry, no remote calls of its own.

License

MIT — see LICENSE.