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

@scriptdb/cli

v1.1.2

Published

CLI tool to start and manage ScriptDB server

Downloads

515

Readme

ScriptDB CLI

Command-line interface for ScriptDB - Database management with TypeScript scripting.

Installation

Install from npm:

npm install -g @scriptdb/cli
# or
bun add -g @scriptdb/cli

Install from source:

git clone <repo>
cd scriptdb
bun install
bun run build
npm link

Usage

Server Management

Start the server in daemon mode (background):

scriptdb start -d

Start the server in foreground:

scriptdb start

Stop the server:

scriptdb stop

Restart the server:

scriptdb restart -d

Check server status:

scriptdb status

View server logs:

scriptdb logs

Interactive Shell

Start the interactive shell (requires server to be running):

scriptdb shell

Shell commands:

  • .exit, .quit - Exit the shell
  • .help - Show help
  • .dbs - List all databases
  • .use <name> - Switch to a database
  • .create <name> - Create a new database

Execute TypeScript code:

> const x = 1 + 1
> x
2
> [1,2,3].map(n => n * 2)
[2, 4, 6]

Configuration

Configuration file: ~/.scriptdb/config.json

Example:

{
  "host": "localhost",
  "port": 1234,
  "users": [
    {
      "username": "admin",
      "password": "your-password",
      "hash": false
    }
  ],
  "folder": "databases",
  "secure": false
}

Package Management

Install packages to ScriptDB:

# Install to ~/.scriptdb/packages
scriptdb add lodash
scriptdb add axios express

# Install to current directory
scriptdb add --local lodash

Remove packages:

# Remove from ~/.scriptdb/packages
scriptdb remove lodash

# Remove from current directory
scriptdb remove --local lodash

Monitoring

View real-time logs:

scriptdb logs

Monitor performance (CPU, memory, uptime):

scriptdb monit

Commands

| Command | Description | |---------|-------------| | scriptdb start [-d] | Start server (-d for daemon/PM2 mode) | | scriptdb stop | Stop the running server | | scriptdb restart [-d] | Restart the server | | scriptdb status | Check server status and view metrics | | scriptdb logs | View real-time logs | | scriptdb monit | Monitor performance (CPU, memory, uptime) | | scriptdb shell | Start interactive shell | | scriptdb add <pkg> | Install packages to ~/.scriptdb | | scriptdb add --local <pkg> | Install packages to current directory | | scriptdb remove <pkg> | Remove packages from ~/.scriptdb | | scriptdb remove --local <pkg> | Remove packages from current directory |

Building

Build for all platforms (local)

bun run build:binary

Build using Docker (recommended for cross-platform)

bun run build:docker

This will build binaries for all platforms inside a Docker container.

Build for specific platform

bun run build:linux-x64
bun run build:linux-arm64
bun run build:windows-x64
bun run build:darwin-x64
bun run build:darwin-arm64
bun run build:linux-x64-musl
bun run build:linux-arm64-musl

Development

bun run dev

Files

  • Config file: ~/.scriptdb/config.json
  • Ecosystem config: ~/.scriptdb/ecosystem.config.js (PM2)
  • PM2 logs: ~/.scriptdb/pm2-*.log
  • Databases: ~/.scriptdb/databases/
  • Packages: ~/.scriptdb/packages/

Changelog

1.1.2 (2025-01-16)

Added

  • Native scriptdb logs command to view real-time logs
  • Native scriptdb monit command to monitor performance
  • Native scriptdb restart command to restart the server
  • Native scriptdb stop command to stop the server
  • Dynamic version reading from package.json
  • ESLint configuration for TypeScript linting

Fixed

  • Fixed TypeScript module resolution errors
  • Fixed test command to continue gracefully when packages have no tests
  • Improved error handling and Windows compatibility

License

MIT