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

@leangetic-ai/cli

v0.4.0

Published

Turn your AI agent into a cheaper hybrid: map steps to deterministic code, tune the AI (cache/compaction/routing), judge cheaper+equal-or-better on your traffic, switch over in one command.

Readme

Leangetic CLI

The Leangetic CLI is the local collector and client for the Leangetic cloud compiler. It scans your agent, gathers evidence, ships an optimization job to the Leangetic cloud, and lets you apply and verify the optimized package before you promote it.

Learn more at leangetic.com.

Requirements

  • Node.js 18+ (to run the CLI wrapper via npx).
  • Python 3 on your PATH. The wrapper invokes python3 (or python). If Python lives somewhere non-standard, set LEANGETIC_PYTHON to its full path, e.g. export LEANGETIC_PYTHON=/usr/local/bin/python3.11.

Install / run

No global install needed — run it on demand with npx:

npx @leangetic-ai/cli --help
npx @leangetic-ai/cli --version

Or install it as a project/dev dependency and call leangetic directly:

npm install --save-dev @leangetic-ai/cli
npx leangetic --help

Commands

Run npx @leangetic-ai/cli <command> --help for the full flag list of any command.

Account

# Create an account
npx @leangetic-ai/cli signup --api-url https://api.leangetic.com \
  --email [email protected] --password '<password>'

# Log in (email/password or an existing API key)
npx @leangetic-ai/cli login --api-url https://api.leangetic.com \
  --email [email protected] --password '<password>'

# Check your remaining credits
npx @leangetic-ai/cli credits

Scan and assess

# Scan an agent and build an evidence bundle
npx @leangetic-ai/cli scan ./agents/support-agent \
  --tasks ./leangetic-tasks.json \
  --traces ./leangetic-traces \
  --entrypoint 'python agent.py'

# Check whether the bundle is ready to optimize
npx @leangetic-ai/cli readiness .leangetic/bundle.json

Optimize, apply, verify

# Send the optimization job to the Leangetic cloud compiler
npx @leangetic-ai/cli optimize ./agents/support-agent \
  --tasks ./leangetic-tasks.json \
  --traces ./leangetic-traces \
  --entrypoint 'python agent.py'

# Apply an optimized package onto your agent
npx @leangetic-ai/cli apply .leangetic/artifacts/<package> \
  --target ./agents/support-agent

# Verify the optimized package against the original — and measure real
# original-vs-optimized behavior, cost, latency, and equivalence
npx @leangetic-ai/cli verify \
  --against ./agents/support-agent \
  --package .leangetic/artifacts/<package> \
  --measure --tasks ./leangetic-tasks.json

Always run verify --measure before promoting an optimized package to confirm equivalence and the cost/latency gains.

Optimize at the per-call level (optional, advanced)

The flow above wraps your whole agent with a safe exact-input cache. The per-call engine goes deeper: it intercepts each individual model call, so it can also win on non-repeating inputs (prompt-cache compaction), verified routing to a cheaper model tier, and exact-cache reuse. It defaults to SHADOW (it measures what each optimization would save and never changes your output); ACTIVE applies only the safe, proven-equivalent wins. It fails open — any error or missing SDK falls back to your original call — and a kill switch (LEANGETIC_ENGINE=off) disables it entirely.

Because the wrap package runs your agent as a subprocess, the engine cannot inject itself for you. Adopt it one of two honest ways:

# 1) Python, in-process (one line). Download the engine next to your agent:
curl -fsSL https://leangetic.com/downloads/leangetic_engine.py -o leangetic_engine.py
# then add this as the FIRST line of your agent entrypoint:
#   import leangetic_engine as e; e.install()

# 2) Any language: reverse proxy + ANTHROPIC_BASE_URL (no code change):
curl -fsSL https://leangetic.com/downloads/leangetic_engine.py -o leangetic_engine.py
curl -fsSL https://leangetic.com/downloads/leangetic_proxy.py -o leangetic_proxy.py
python leangetic_proxy.py --port 8788
export ANTHROPIC_BASE_URL=http://127.0.0.1:8788   # then run your agent as usual

Run your agent, then read the honest, measured savings ledger:

npx @leangetic-ai/cli engine-report

The Python one-liner only intercepts calls made through the Anthropic Python SDK; agents that shell out to a subscription CLI are measured-but-not-intercepted in-process — use the proxy for those. See docs/PER_CALL_ENGINE.md for the five phases, SHADOW vs ACTIVE, and the promote ratchet.

License

Proprietary. See LICENSE and the Leangetic terms.