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

@vforsh/bnn

v0.1.1

Published

CLI for generating and editing images with Gemini API

Readme

bnn

CLI for generating and editing images with Google Gemini models.

Default model: gemini-3.1-flash-image-preview (Nano Banana 2).

Run Without Install

bunx @vforsh/bnn --help
bunx @vforsh/bnn gen "a cat astronaut on mars"

Auth

bnn does not accept secrets via CLI flags. Set API key via env or config (stdin for secrets):

# env
export BNN_API_KEY="..."

# config (recommended for local machine)
printf '%s' "$GOOGLE_API_KEY" | bunx @vforsh/bnn cfg set api.key -

Quick start

bunx @vforsh/bnn gen "a cat astronaut on mars"
bunx @vforsh/bnn edit "remove the background" --image photo.jpg
bunx @vforsh/bnn edit "make it more vibrant" --session <session-id>
bunx @vforsh/bnn gen "complex scene composition" --thinking high

All command snippets below use bnn. Without local install, replace bnn with bunx @vforsh/bnn.

Dev install

bun install
bun link

Commands

bnn generate|gen|run|do <prompt>
bnn edit <prompt>
bnn session list|show|delete|clear
bnn config|cfg <subcommand>
bnn doctor|check
bnn skill

Config command

bnn cfg list|ls [--json|--plain]
bnn cfg path
bnn cfg init [--global]

# set one key
bnn cfg set model.default gemini-3.1-flash-image-preview

# set many keys
bnn cfg set api.endpoint=https://generativelanguage.googleapis.com output.resolution=1k output.aspect_ratio=1:1

# configure thinking level
bnn cfg set model.thinking high

# set secret from stdin only
printf '%s' "$GOOGLE_API_KEY" | bnn cfg set api.key -

# multi-key read/update
bnn cfg get model.default output.resolution
bnn cfg unset output.directory output.aspect_ratio

# machine round-trip
bnn cfg export --json > /tmp/bnn-config.json
cat /tmp/bnn-config.json | bnn cfg import --json

Doctor

Read-only readiness checks (runtime/config/auth/network/filesystem):

bnn doctor
bnn doctor --json
bnn doctor --plain

Exit codes:

  • 0: ready
  • 1: one or more checks failed
  • 2: invalid usage

Skill URL

bnn skill

Prints: https://github.com/vforsh/bnn/tree/main/skill/bnn

Global flags

--json, --plain, -q, -v, --timeout, --retries, --endpoint, --region, --config

Models

  • gemini-3.1-flash-image-preview (default, Nano Banana 2)
  • gemini-3-pro-image-preview
  • Official model selection guide: https://ai.google.dev/gemini-api/docs/image-generation#model-selection
  • Official pricing: https://ai.google.dev/gemini-api/docs/pricing

Supported resolutions: 512px, 1k, 2k, 4k. Supported thinking levels: minimal, high, dynamic (dynamic = let model decide).

Config precedence

  1. Environment variables (BNN_*)
  2. Project config (.config/bnn.toml)
  3. Global config ($XDG_CONFIG_HOME/bnn/config.toml, fallback ~/.config/bnn/config.toml)
  4. Built-in defaults