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

codelean

v1.0.0

Published

Faster, cheaper, safer Codex-like coding agent with multi-provider model routing

Readme

codelean

codelean is a faster, cheaper, safer Codex-like coding agent with a multi-provider model boundary. It keeps the provider layer small so you can switch cloud model backends without changing caller code.

Current Scope

  • Use a Codex fork as the future execution base.
  • Optimize for lower cost, lower latency, and safer execution.
  • Keep Codex-like file/shell/approval/diff/test capabilities as the product direction.
  • Provide a unified ModelProvider boundary for model calls, streaming, tool-call events, usage, and errors.
  • Support anthropic directly and OpenAI-compatible providers including openai, qwen, and mimo.
  • Keep gemini planned but not implemented yet.

Install

npm install
npm run build

Usage

MiMo

MiMo is OpenAI-compatible. The default MiMo base URL is https://api.xiaomimimo.com/v1, and the default model is mimo-v2.5-pro.

export MIMO_API_KEY="sk-..."
node dist/cli/index.js --provider mimo --prompt "Explain this repo"

You can also set defaults:

export CODELEAN_PROVIDER="mimo"
export CODELEAN_MODEL="mimo-v2.5-pro"
export MIMO_API_KEY="sk-..."
node dist/cli/index.js --prompt "Write a TypeScript function"

For Token Plan usage, override the base URL:

export MIMO_BASE_URL="https://token-plan-cn.xiaomimimo.com/v1"

Anthropic

export ANTHROPIC_API_KEY="sk-ant-..."
node dist/cli/index.js --provider anthropic --model claude-sonnet-4-5 --prompt "Explain this repo"

OpenAI-compatible providers

export OPENAI_API_KEY="sk-..."
node dist/cli/index.js --provider openai --model gpt-4o --prompt "Explain this repo"

export QWEN_API_KEY="sk-..."
node dist/cli/index.js --provider qwen --model qwen-plus --prompt "Explain this repo"

Environment

| Variable | Description | |----------|-------------| | CODELEAN_PROVIDER | Default provider: anthropic, openai, qwen, or mimo | | CODELEAN_MODEL | Default model for the selected provider | | CODELEAN_API_KEY | Generic API key override for the selected provider | | CODELEAN_BASE_URL | Generic base URL override for OpenAI-compatible providers | | ANTHROPIC_API_KEY | Anthropic API key | | OPENAI_API_KEY | OpenAI API key | | QWEN_API_KEY | Qwen API key | | MIMO_API_KEY | MiMo API key | | MIMO_BASE_URL | MiMo base URL, default https://api.xiaomimimo.com/v1 | | CODELEAN_MAX_OUTPUT_TOKENS | Max output tokens, default 4096 |

Code Structure

src/
  cli/index.ts                          # Minimal CLI
  client.ts                             # CodeleanClient
  config.ts                             # Multi-provider config
  providers/anthropic-provider.ts       # Anthropic Messages API adapter
  providers/openai-compatible-provider.ts # OpenAI-compatible adapter base
  providers/mimo-provider.ts            # MiMo adapter
  providers/provider-factory.ts         # Provider selection
  types.ts                              # Shared request/response/event types

Next Steps

  1. Add provider-specific tests with mocked HTTP responses.
  2. Add a real GeminiProvider implementation.
  3. Add fallback routing between primary and secondary providers.
  4. Map Codex internal tool calls into the unified provider boundary.
  5. Integrate this provider layer into a Codex fork while preserving Codex approval and sandbox behavior.