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

@enokas/pb_cli

v1.1.3

Published

PocketBase admin CLI tool

Readme

@enokas/pb_cli

A command-line interface tool for managing PocketBase collections and profiles.

Installation

# Using npm
npm install -g @enokas/pb_cli

# Using pnpm
pnpm add -g @enokas/pb_cli

# Using yarn
yarn global add @enokas/pb_cli

Usage

# Add a profile
pb_cli profile add myapp http://localhost:8090 [email protected] mypassword

# List records from a collection
pb_cli list users --filter "created >= '2023-01-01'"

# Update records
pb_cli modify update users -f "active = false" -d '{"active": true}'

# Delete records
pb_cli modify delete logs -f "created < '2023-01-01'" --dry-run

# Create a new record
pb_cli create users -d '{"name": "John Doe", "email": "[email protected]"}'

# Send a custom request
pb_cli send POST http://localhost:8090/api/endpoint -h '{"Content-Type": "application/json"}' -d '{"key": "value"}'

Features

  • Profile Management: Create and manage multiple PocketBase profiles
  • List Records: Query and display records from any collection
  • Modify Records: Update or delete records in bulk with filters
  • Create Records: Add new records to any collection
  • Send Custom Requests: Make custom requests with method, custom header (including token), and custom data
  • Dry Run: Preview changes before applying them

Commands

Profile Management

  • profile add <name> <url> <email> <password>: Add a new profile
  • profile list: List all profiles
  • profile use <name>: Switch to a profile
  • profile remove <name>: Remove a profile

List Records

  • list <collection> [options]: List records from a collection
    • -f, --filter <filter>: Filter expression
    • -s, --sort <sort>: Sort expression
    • --fields <fields>: Comma-separated list of fields to display
    • --page <page>: Page number
    • --per-page <count>: Records per page

Modify Records

  • modify update <collection> [options]: Update records

    • -f, --filter <filter>: Filter expression
    • -d, --data <json>: JSON data for update
    • --dry-run: Preview changes without applying them
  • modify delete <collection> [options]: Delete records

    • -f, --filter <filter>: Filter expression
    • --dry-run: Preview deletions without applying them

Create Records

  • create <collection> [options]: Create a new record
    • -d, --data <json>: JSON data for the new record

Send Custom Requests

  • send <method> <url> [options]: Send a custom request
    • -h, --headers <headers>: Custom headers as JSON string
    • -d, --data <data>: Request data as JSON string

Script Execution

  • script <path>: Execute a JSON script containing multiple PocketBase operations
    • The script file should be a JSON file with the following structure:
    {
      "run": [
        {
          "create": [
            {
              "collection": "users",
              "data": { "name": "John Doe", "email": "[email protected]" }
            }
          ],
          "list": [
            {
              "collection": "users",
              "options": {
                "filter": "created >= '2023-01-01'",
                "sort": "-created"
              }
            }
          ],
          "modify": [
            {
              "type": "update",
              "collection": "users",
              "filter": "active = false",
              "data": { "active": true }
            }
          ],
          "send": [
            {
              "method": "POST",
              "url": "http://localhost:8090/api/endpoint",
              "headers": { "Content-Type": "application/json" },
              "data": { "key": "value" }
            }
          ]
        }
      ]
    }

License

MIT