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

@blinkdotnew/cli

v0.3.7

Published

Blink platform CLI — deploy apps, manage databases, generate AI content

Downloads

2,376

Readme

@blinkdotnew/cli

The Blink platform CLI. Deploy apps, query databases, generate AI content, manage storage, and control Blink Claw agents — all from your terminal or agent scripts.

npm install -g @blinkdotnew/cli
blink --help

Quick Start

# Install
npm install -g @blinkdotnew/cli

# Authenticate (enter your blnk_ak_... API key from blink.new → Settings → API Keys)
blink login --interactive

# See full context: agent + project + auth
blink status

# Manage Claw agents
blink agent list
eval $(blink agent use clw_xxx --export)
blink secrets set GITHUB_TOKEN ghp_xxx
blink secrets list

# Deploy an app
npm run build && blink deploy ./dist --prod

# Query your database
blink db query "SELECT count(*) FROM users"

# Generate AI content
blink ai image "a glowing blink logo on dark background"
blink ai text "Summarize this article: ..."

# Scrape websites
blink scrape https://lovable.dev --extract "pricing tiers and costs"
blink scrape https://example.com --text

Authentication

The CLI resolves credentials in this order (highest priority first):

| Source | How | |---|---| | --token <key> flag | One-off override per command | | BLINK_API_KEY env var | CI/CD and Claw agents (set automatically) | | ~/.config/blink/config.toml | Stored after blink login |

# Interactive login (saves to ~/.config/blink/config.toml)
blink login --interactive

# One-off with token flag
blink deploy --token blnk_ak_xxx ./dist

# CI / GitHub Actions
BLINK_API_KEY=blnk_ak_xxx blink deploy ./dist --prod

Your API key lives at blink.new → Settings → API Keys (blnk_ak_...).

Multiple accounts

# ~/.config/blink/config.toml
[default]
api_key = "blnk_ak_personal"

[work]
api_key = "blnk_ak_work"
blink --profile work deploy ./dist

Commands

blink deploy — Deploy to Blink hosting

blink deploy                          # Deploy CWD, use linked project
blink deploy ./dist                   # Deploy specific build dir
blink deploy proj_xxx ./dist          # Explicit project + dir
blink deploy ./dist --prod            # Production (live domain)
blink deploy ./dist --preview         # Preview URL (default)
blink deploy ./dist --name "v2 beta"  # Label this deployment

blink deployments                     # List deployments
blink rollback                        # Rollback production to previous deploy

The CLI packages your pre-built output directory and uploads it. Run your build first:

npm run build && blink deploy ./dist --prod

Preview deploys get a URL like preview-a1b2c3d4.sites.blink.new.
Production deploys go to your custom domain or {id}.sites.blink.new.


blink project — Project management

blink project list                    # List all workspace projects
blink project create "My App"         # Create a new project
blink project delete proj_xxx         # Delete a project (confirms first)

blink link                            # Link current dir to a project (interactive picker)
blink link proj_xxx                   # Link to specific project
blink unlink                          # Remove .blink/project.json
blink status                          # Show linked project + auth source

Once linked, commands that need a project ID use .blink/project.json automatically.


blink use — Set active project for a shell session

blink use proj_xxx                           # Prints the export command
eval $(blink use proj_xxx --export)          # Actually sets it in your shell
export BLINK_ACTIVE_PROJECT=proj_xxx         # Or set manually

After this, omit proj_xxx from any command — it's inferred from the env var.


blink db — Database (Turso/SQLite per project)

# Query (two forms)
blink db query "SELECT * FROM users LIMIT 10"
blink db query proj_xxx "SELECT * FROM users LIMIT 10"

# Execute a SQL file
blink db exec schema.sql
blink db exec proj_xxx migrations/001.sql

# List tables
blink db list

# List rows in a table
blink db list users
blink db list proj_xxx users --limit 50

# Machine-readable output
blink db query "SELECT id, email FROM users" --json

blink storage — File storage

# Upload
blink storage upload ./logo.png
blink storage upload proj_xxx ./logo.png --path images/logo.png

# List
blink storage list
blink storage list images/

# Download
blink storage download images/logo.png ./local-logo.png

# Get public URL
blink storage url images/logo.png

# Delete
blink storage delete images/old-logo.png

blink ai — AI generation

# Text
blink ai text "Summarize this in 3 bullets: ..."
blink ai text "Write a product description" --model anthropic/claude-sonnet-4.5

# Image
blink ai image "a futuristic city at sunset"
blink ai image "a futuristic city" --model fal-ai/nano-banana-pro --n 4
blink ai image "a city at sunset" --output ./city.jpg

# Image editing
blink ai image-edit "make it night time" https://example.com/city.jpg

# Video (text-to-video)
blink ai video "a drone flyover of a neon city"
blink ai video "timelapse of clouds" --model fal-ai/veo3.1 --duration 10s --aspect 9:16

# Video (image-to-video) — local file or URL
blink ai animate "make it come alive" ./photo.jpg
blink ai animate "pan slowly to the right" https://example.com/photo.jpg

# Speech (text-to-speech)
blink ai speech "Hello, welcome to Blink."
blink ai speech "Hello world" --voice nova --output ./greeting.mp3
# Voices: alloy, echo, fable, onyx, nova, shimmer

# Transcription
blink ai transcribe ./meeting.mp3
blink ai transcribe https://example.com/audio.mp3 --language en

blink fetch, blink search, blink scrape — Web & data

# Fetch any URL via Blink proxy (handles CORS, auth headers)
blink fetch https://api.github.com/users/octocat
blink fetch https://api.example.com/data --method POST --body '{"key":"val"}'
blink fetch https://api.example.com --header "X-API-Key: secret"

# Web search
blink search "latest AI news"
blink search "React Server Components" --count 10 --json

# Scrape web pages
blink scrape https://example.com                              # Raw response
blink scrape https://example.com --text                      # Clean text (strips HTML)
blink scrape https://example.com --extract "all prices"      # AI-extract specific data
blink scrape https://news.ycombinator.com --extract "top 10 story titles and URLs"
blink scrape https://example.com --extract "contact email" --json

No project key needed — blink scrape uses your workspace key only.

  • --text — strips all HTML tags, returns readable text
  • --extract <instructions> — uses AI (Gemini Flash) to extract exactly what you ask for
  • Combine with --json for { url, content } or { url, extracted } output

blink realtime — Pub/sub

# Publish an event to a channel
blink realtime publish updates '{"type":"refresh"}'
blink realtime publish proj_xxx updates '{"type":"refresh","data":{"count":42}}'

blink rag — Knowledge base / RAG

# Search
blink rag search "how does billing work"
blink rag search "billing" --ai            # AI-enhanced search
blink rag search proj_xxx "billing" --limit 10

# Upload a document
blink rag upload ./docs/faq.md
blink rag upload proj_xxx ./docs/faq.md --collection coll_xxx

# List collections
blink rag collections

blink notify — Email

blink notify email [email protected] "Welcome!" "Thanks for signing up."
blink notify email [email protected] "Newsletter" --file ./email.html
blink notify email proj_xxx [email protected] "Subject" "Body"

blink connector — OAuth connectors

# Execute a connector action (Notion, Google, Slack, HubSpot, etc.)
blink connector exec notion search_pages '{"query":"meeting notes"}'
blink connector exec google_calendar list_events '{}'
blink connector exec slack post_message '{"channel":"C123","text":"Hello"}' --method POST
blink connector exec notion create_page '{"title":"New Page"}' --account acct_xxx

Global Flags

Available on every command:

| Flag | Description | |---|---| | --token <key> | Override API key for this command only | | --json | Output raw JSON (no colors, no spinners — great for scripting) | | --yes | Skip confirmation prompts | | --profile <name> | Use a named profile from config.toml | | --debug | Print full request/response details | | --version | Print CLI version | | --help | Show help for any command |


Scripting & CI/CD

The --json flag makes every command machine-readable:

# Get deployment URL from a deploy
URL=$(blink deploy ./dist --prod --json | jq -r '.url')
echo "Deployed to: $URL"

# Query database and pipe to jq
blink db query "SELECT id, email FROM users" --json | jq '.[].email'

# Generate image and get URL
IMG=$(blink ai image "a logo" --json | jq -r '.url')
blink storage upload ./banner.png --json | jq -r '.url'

GitHub Actions example

- name: Deploy to Blink
  env:
    BLINK_API_KEY: ${{ secrets.BLINK_API_KEY }}
  run: |
    npm install -g @blinkdotnew/cli
    blink deploy ./dist --prod --json

Config Files

| File | Purpose | |---|---| | ~/.config/blink/config.toml | Auth tokens, workspace ID, named profiles | | .blink/project.json | Per-directory project link (like .vercel/project.json) |

.blink/project.json is created by blink link — add it to .gitignore.


Blink Claw Agents

The CLI is pre-installed in every Blink Claw agent (Fly.io Firecracker VM). These env vars are already injected — no login needed:

BLINK_API_KEY    auth token (workspace-scoped)
BLINK_AGENT_ID   this agent's ID — auto-used by blink agent/secrets commands
BLINK_APIS_URL   https://core.blink.new
BLINK_APP_URL    https://blink.new

Agents use the CLI directly in skill scripts:

# In openclaw/skills/blink-image/scripts/generate.sh
blink ai image "$PROMPT" --model "$MODEL" --json

blink agent — Manage agents

blink agent list                           # List all agents in workspace
blink agent use clw_xxx                    # Show how to set active agent
eval $(blink agent use clw_xxx --export)   # Set active agent for this session
blink agent status                         # Show current agent details
blink agent status clw_xxx                 # Show specific agent details

On Claw machines, BLINK_AGENT_ID is already set — blink agent status works with zero config.

blink secrets — Agent encrypted vault

# All commands auto-use BLINK_AGENT_ID on Claw machines
blink secrets list                         # List secret key names (values never shown)
blink secrets set GITHUB_TOKEN ghp_xxx     # Add or update a secret
blink secrets delete OLD_KEY               # Remove a secret (--yes to skip prompt)

# Cross-agent management (agent manager pattern)
blink secrets list --agent clw_other       # Another agent's keys
blink secrets set --agent clw_other OPENAI_KEY sk-xxx   # Set on another agent

Secrets are stored encrypted and available as $KEY_NAME in all agent shell commands.

Agent ID resolution for blink agent and blink secrets:

  1. --agent <id> flag
  2. BLINK_AGENT_ID env var ← always set on Claw Fly machines
  3. BLINK_ACTIVE_AGENT env var ← from eval $(blink agent use clw_xxx --export)

blink status — Full context at a glance

$ BLINK_AGENT_ID=clw_xxx blink status

Agent    clw_xxx           (BLINK_AGENT_ID env)
Project  proj_yyy          (.blink/project.json)
Auth     ~/.config/blink/config.toml

Links

  • npm: https://www.npmjs.com/package/@blinkdotnew/cli
  • Blink platform: https://blink.new
  • Docs: https://blink.new/docs
  • Source: blink-sdk/packages/cli/ in the blink-new/blink-sdk repo