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

@aditya-borkar/utils

v0.6.3

Published

Utilities for daily developer work.

Readme

Developer productivity utilities for your terminal

Features

┌─────────────────┬─────────────────────────────────────────┐ │ 🗄️ Databases │ CockroachDB, Postgres, Redis via Docker │ │ 🌐 Tunnels │ Cloudflare Tunnel management │ │ 🔐 Secrets │ Infisical-based secret management │ │ 📁 Repos │ Scan, create git repositories │ │ ⚙️ Config │ Manage your CLI configuration │ │ 📦 SDK │ Exportable SDK for Infisical │ └─────────────────┴─────────────────────────────────────────┘

Installation

# Via JSR
bunx jsr add @aditya-borkar/utils

# Via npm
npm install -g @aditya-borkar/utils

Usage

lab              # Show help (or 'utils' if installed locally)

Database Management 🗄️

lab db start cockroach    # Start CockroachDB container
lab db stop postgres      # Stop Postgres container
lab db list               # List all databases
lab db create postgres mydb   # Create new Postgres database
lab db delete redis test  # Delete database

Supported Databases:

  • cockroach — CockroachDB (ports: 26257, 8080)
  • postgres — PostgreSQL (ports: 5432)
  • redis — Redis (ports: 6379)

Cloudflare Tunnel Management 🌐

lab tunnel list           # List all tunnel routes
lab tunnel create         # Create a new route (interactive)
lab tunnel delete         # Delete routes (interactive)

Tunnel commands automatically manage DNS records via Cloudflare API. See Cloudflare Setup below for configuration.

Secret Management 🔐

lab secrets list          # List all secrets
lab secrets set KEY=VALUE # Set secret values
lab secrets show KEY      # Show a secret value
lab secrets remove KEY    # Remove a secret
lab secrets clear         # Clear all secrets

Secrets are managed via an Infisical Docker container.

Repository Management 📁

lab repo                  # Scan current dir for git repos
lab repo ~/code           # Scan specific folder
lab repo create myapp     # Create new repository

The scanner shows:

  • Git status (🟢 clean, 🟡 dirty, 🔴 no remote)
  • Remote sync status (ahead/behind)
  • Repository size
  • Staleness indicator (repos not updated in 7+ days)

Configuration ⚙️

lab config show           # Display current configuration
lab config open           # Open config in default editor

Configuration location: ~/.config/aditya-borkar.utils/config.json

Cloudflare Tunnel Setup

To use tunnel management, you need to configure Cloudflare credentials:

1. Create a Tunnel

  1. Go to Cloudflare Zero Trust Dashboard
  2. Navigate to Access > Tunnels
  3. Click "Create a tunnel"
  4. Choose your tunnel name (e.g., ablab-tunnel)
  5. Copy the Tunnel ID from the installation command

2. Get API Token

  1. Go to Cloudflare API Tokens
  2. Click "Create Token"
  3. Use the "Edit Cloudflare Tunnels" template or create a custom token with:
    • Account > Cloudflare Tunnel > Edit
    • Zone > DNS > Edit
  4. Copy the API token

3. Get Account ID

Found in the right sidebar of your Cloudflare dashboard, or in the URL when viewing your account.

4. Configure in lab

lab config open

Add to your config:

{
  "cloudflare": {
    "api_token": "your_api_token_here",
    "account_id": "your_account_id_here",
    "tunnel_id": "your_tunnel_id_here"
  }
}

5. Use Tunnel Commands

lab tunnel create    # Prompts for hostname (e.g., app.example.com)
                     # and service (e.g., http://localhost:3000)

lab tunnel delete    # Interactive selection of routes to delete

lab tunnel list      # Shows all configured routes

What happens:

  • create adds a route and creates a CNAME DNS record automatically
  • delete removes routes and their associated DNS records
  • list shows all hostname → service mappings

SDK

The package exports an SDK for Infisical integration:

import { loadEnv } from "@aditya-borkar/utils/sdk"

// Load secrets from Infisical into process.env
await loadEnv()

Requires .env with:

  • ABLAB_PROJECT_ID — Your Infisical project ID
  • ABLAB_ENV — Environment name (e.g., "dev", "prod")

Tech Stack

  • Runtime: Bun
  • Language: TypeScript (strict mode)
  • CLI: Commander.js
  • Validation: Zod
  • Containers: Docker (dockerode)
  • Cloudflare: cloudflare npm package
  • Secrets: Infisical SDK

Development

bun install              # Install dependencies
bun run dev              # Run CLI in development
bun run lint             # Lint with Biome (auto-fix)
bun run type-check       # TypeScript type checking

Project Structure

src/
├── index.ts          # CLI entry point (shebang)
├── commands/         # Command implementations
│   ├── db.*.ts      # Database commands
│   ├── repo.*.ts    # Repository management
│   ├── secrets.*.ts # Secret management
│   ├── tunnel.*.ts  # Tunnel management
│   ├── config.*.ts  # Configuration commands
│   └── start.ts     # Start all services
├── logic/            # Business logic
│   └── cloudflare.ts # Cloudflare API integration
├── lib/              # Core utilities
│   ├── console.ts    # Styled console output
│   ├── config.ts    # Configuration system
│   ├── docker.ts    # Docker container management
│   ├── logger.ts    # Logging utilities
│   └── state.ts     # Runtime state
├── services/         # Docker service definitions
│   ├── cockroach.ts # CockroachDB service
│   ├── postgres.ts  # Postgres service
│   ├── redis.ts     # Redis service
│   └── infisical.ts # Infisical service
└── sdk/              # Exportable SDK
    └── index.ts     # Infisical env loader

License

MIT © Aditya Borkar