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

@mejazbese21/agent-database-cli

v1.3.0

Published

Unified database CLI with read-only mode and a command blocklist; each command opens a direct connection.

Readme

agent-database-cli

Local multi-database CLI for agents. One command opens a connection, runs, disconnects. Supports MySQL · PostgreSQL · Redis · Oracle · MongoDB, with read-only mode and a command blocklist. Built in Rust, shipped via npm.

Install

npm install -g @mejazbese21/agent-database-cli
agent-database-cli --help     # also available as: db-cli

Requires Node >= 20. On install, the matching native binary (macOS x64/arm64, Linux x64/arm64, Windows x64) is downloaded from GitHub Releases into the package.

Prefer no npm? Download the binary for your OS straight from the Releases page, put it on your PATH, and run it — it's self-contained.

Update / uninstall:

npm install -g @mejazbese21/agent-database-cli@latest
npm uninstall -g @mejazbese21/agent-database-cli && rm -rf ~/.agent-database-cli

Usage

agent-database-cli list                                  # types + configured connections
agent-database-cli test --db local-mysql                 # test a connection
agent-database-cli exec --db local-mysql --command "select 1"
agent-database-cli meta --db local-mysql --type tables   # tables/columns/collections/keys
agent-database-cli --format table exec --db local-mysql --command "select 1"

For many queries in a row, reuse one connection:

printf 'select 1\nselect count(*) from accounts\n' | agent-database-cli repl --db local-mysql

MCP server (agent-database-cli-mcp) — stateful session for agents. use_database sets the active db, then query / describe:

claude mcp add agent-db -- agent-database-cli-mcp

Configuration

File: ~/.agent-database-cli/config.json (override with AGENT_DATABASE_CLI_CONFIG).

{
  "databases": {
    "local-mysql": {
      "type": "mysql",
      "url": "mysql://user:password@localhost:3306/app",
      "readonly": true,
      "blacklist": ["drop", "truncate", "delete"]
    },
    "remote-mysql": {
      "type": "mysql",
      "url": "mysql://user:[email protected]:3306/app",
      "sshTunnel": { "host": "jump.example.com", "username": "deploy", "privateKeyPath": "~/.ssh/id_rsa" },
      "readonly": true
    }
  }
}

Per-connection fields:

  • typemysql | postgres | redis | oracle | mongodb
  • url — connection string. Postgres TLS via ?sslmode= (prefer default, require, verify-full, disable). For managed DBs with a private CA (e.g. RDS) use require.
  • readonly — default true; only set false when writes are truly needed.
  • blacklist — case-insensitive command blocklist, checked before read-only.
  • sshTunnelhost, port (22), username, and password or privateKeyPath/privateKey (+ optional passphrase).
  • redisCluster.nodes — array of cluster node URLs (cluster mode needs both url and nodes).
  • Oracle: oracleDriver (sqlcl default | oracle | oracledb), sqlclPath, javaHome.

Passwords/passphrases are encrypted on first use (stored as *Ref in the config dir); plaintext is cleared automatically.

Permissions

Use readonly and blacklist together. Order: blacklist is checked first (reject on match), then read-only (reject writes). Read-only also blocks write-semantic reads like Postgres SELECT INTO and Mongo $out / $merge.

High-risk commands to blocklist:

  • SQL: drop, truncate, delete, update, insert, merge, alter, create, grant, revoke
  • Redis: flushall, flushdb, del, set, expire, rename, keys
  • Mongo: insertMany, updateMany, deleteMany, drop, dropDatabase, $out, $merge

Oracle (SQLcl)

Oracle uses SQLcl by default (no Instant Client needed, works with old versions like Oracle 11). The connect script is passed via stdin so the password is never in process args; blocklist and read-only still apply.

License

MIT