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

dbnexus

v0.5.4

Published

Database management tool with web UI

Readme

DB Nexus

A local-first database management tool with a modern web UI, CLI, and production safety guardrails for PostgreSQL, MySQL, and SQLite.

npm version License Node.js Version

DocumentationInstallationFeaturesCLI Usage


  • Visual Schema Diagrams - Interactive ER diagrams with drag-and-drop editing
  • Schema & Data Sync - Compare and synchronize schemas and data between databases
  • Data Import/Export - Import CSV/JSON files with column mapping, export query results
  • Backup & Restore - Full database backups with compression and one-click restore
  • Production Safety - Blocks dangerous queries (UPDATE/DELETE without WHERE) on production
  • Foreign Key Navigation - Click FK values to instantly jump to referenced rows
  • Auto-Discovery - Scan for databases via Docker, ports, env files, and SQLite files
  • Inline Data Editing - Edit table rows directly in the results grid

📸 Screenshots

Query Editor

Query Page

Schema Diagram

Schema Diagram

Compare & Sync

Compare Data

Connection Management

Connection Management

Activity Logs

Logs Page

Database Scanner

Scan Databases

Settings

Settings

✨ Features

Core

  • 🖥️ Modern Web UI - Beautiful, dark-themed interface with glassmorphism design
  • 🔌 Multiple Connections - Manage and switch between multiple database connections
  • 🔒 Encrypted Credentials - Passwords stored securely with AES-256-GCM encryption
  • 🛡️ Safety Guardrails - Blocks dangerous queries (UPDATE/DELETE without WHERE) on production databases
  • 🔐 Identity Verification - Password confirmation required before viewing sensitive server credentials

Query & Data

  • Query Editor - Execute SQL with syntax highlighting and results table
  • 🔗 Foreign Key Navigation - Click FK values to instantly query referenced rows
  • 📜 Query History - Track and replay previous queries
  • ✏️ Inline Editing - Edit table data directly in the results grid

Schema Tools

  • 📊 Schema Browser - Explore tables, columns, indexes, and relationships
  • 🗺️ Schema Diagram - Visual database schema editor with drag-and-drop
  • 🔄 Schema Sync - Compare and sync database schemas between connections
  • 🎯 Per-Table Migration - Apply schema changes table-by-table with copy/apply actions

Data Management

  • 📦 Data Sync - Sync table data between databases with conflict resolution
  • 🔎 Connection Scanning - Auto-discover databases via ports, Docker, env files, and SQLite
  • 💾 Backup & Restore - Full database backups with optional compression and restore capability

Server Management

  • 🖧 Server Configuration - Manage PostgreSQL and MySQL servers with admin credentials
  • 📊 Server Monitoring - View server version, uptime, and active connections
  • 🗄️ Database Operations - Create, drop, and import databases directly on servers

Organization

  • 🏷️ Connection Tags - Organize connections with customizable tags (dev, staging, prod)
  • 📁 Projects & Groups - Group related connections together
  • 🎨 Customizable Theme - Configure colors and styles in Settings

🚀 Quick Start

Installation

Install DB Nexus globally using npm:

npm install -g dbnexus

Or run directly with npx (no installation required):

npx dbnexus

Usage

Start DB Nexus:

dbnexus

This will:

  • Start the server on http://localhost:3001
  • Automatically open your browser
  • Store metadata in ~/.dbnexus/metadata.db

Options

dbnexus --port 8080           # Custom port
dbnexus --data-dir /path      # Custom data directory
dbnexus --no-open             # Don't open browser
dbnexus --help                # Show all options

Supported Databases

  • PostgreSQL
  • MySQL
  • SQLite

🛠️ Development Setup

Prerequisites

  • Node.js 18+
  • pnpm
  • PostgreSQL/MySQL (for target databases)

Installation

# Clone the repository
git clone https://github.com/akademskig/dbnexus.git
cd dbnexus

# Install dependencies
pnpm install

# Build all packages
pnpm build

Running in Development

# Start development servers (API + Web UI)
pnpm dev

💻 CLI Usage

Start the UI (default command)

# Start DB Nexus (default)
dbnexus

# Custom port
dbnexus --port 4000

# Don't open browser
dbnexus --no-open

# Custom data directory
dbnexus --data-dir ~/my-data

Connection Management

# Add a new connection
dbnexus connect add \
  --name prod-db \
  --host db.example.com \
  --port 5432 \
  --database myapp \
  --user admin \
  --password secret \
  --ssl \
  --tags prod,main

# List all connections
dbnexus connect list

# Test a connection
dbnexus connect test prod-db

# Remove a connection
dbnexus connect remove prod-db

Query Execution

# Run a query
dbnexus query --conn prod-db --sql "SELECT * FROM users LIMIT 10"

# Execute from file
dbnexus query --conn prod-db --file ./query.sql

# Dangerous queries require --confirm
dbnexus query --conn prod-db --sql "DROP TABLE temp" --confirm

Database Scanning

# Scan for databases (ports, Docker, .env files, SQLite)
dbnexus scan

# Auto-add discovered connections
dbnexus scan --add

# Scan specific directories for .env files
dbnexus scan --env-dirs ~/projects,/var/www

Data Export

# Export table to CSV
dbnexus export --conn prod-db --table users --format csv --output users.csv

# Export query results to JSON
dbnexus export --conn prod-db --sql "SELECT * FROM orders" --format json --output orders.json

Schema Tools

# Show schema for a connection
dbnexus schema show --conn prod-db

# Show specific table schema
dbnexus schema show --conn prod-db --table users

# Compare schemas between connections
dbnexus schema compare --source dev-db --target prod-db

# Generate migration SQL
dbnexus schema diff --source dev-db --target prod-db --output migration.sql

🔧 Scripts

| Command | Description | | ------------- | ------------------------------- | | pnpm dev | Start development servers | | pnpm build | Build all packages | | pnpm lint | Run ESLint | | pnpm format | Format code with Prettier | | pnpm check | Run lint + format check + build |

📦 Distribution

Docker

Build and run DB Nexus as a Docker container:

# Build the Docker image
pnpm docker:build

# Run with Docker
pnpm docker:run

# Or use Docker Compose for production
pnpm docker:compose

The application will be available at http://localhost:3001.

Desktop Application (Electron)

Build standalone desktop applications for Windows, macOS, and Linux:

# Build for all platforms
pnpm desktop:build

# Build for specific platforms
pnpm desktop:build:win    # Windows (.exe, portable)
pnpm desktop:build:mac    # macOS (.dmg, .zip)
pnpm desktop:build:linux  # Linux (.AppImage, .deb, .rpm)

Built applications will be in apps/desktop/out/.

Manual Installation

For manual deployment:

# Build all packages
pnpm build

# Start in production mode
NODE_ENV=production node apps/api/dist/main.js

🐳 Docker Compose (Development)

For testing with multiple database instances:

# Start test databases (PostgreSQL, MySQL)
docker-compose up -d

# Stop test databases
docker-compose down

📖 Documentation

🌟 Why DB Nexus?

  • 🏠 Local-First - Your data stays on your machine. No cloud dependencies.
  • 🎨 Modern UI - Beautiful, intuitive interface with dark mode and glassmorphism design
  • 🛡️ Production Safe - Built-in guardrails prevent accidental data loss
  • 🔒 Secure - AES-256-GCM encryption for stored credentials
  • ⚡ Fast - Native performance with direct database connections
  • 🆓 Open Source - AGPL-3.0 licensed, free forever

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

🐛 Bug Reports

Found a bug? Please open an issue with:

  • Steps to reproduce
  • Expected behavior
  • Actual behavior
  • Database type and version
  • DB Nexus version (dbnexus --version)

📄 License

AGPL-3.0 - See LICENSE for details.


Made with ❤️ by the DB Nexus team

⭐ Star us on GitHub📖 Read the docs🐛 Report a bug