drixio
v1.1.7
Published
A lightweight interactive TUI database client
Maintainers
Readme
🌟 Drixio - The Ultimate Zero-Dependency Database CLI & TUI
Drixio is a lightning-fast, zero-dependency Database Manager designed entirely for your terminal. It supports SQLite, PostgreSQL, and MySQL.
Say goodbye to heavy GUI tools like DBeaver or TablePlus. Drixio allows you to instantly view, edit, query, backup, and visually diagram your databases right from your CLI!
✨ Features
- 📱 Interactive TUI: A beautiful, mouse-free Terminal User Interface.
- ⚡ Zero Dependencies: Blazing fast, runs instantly via
npx. - 🛠️ Multi-Database Support: Connects seamlessly to SQLite, PostgreSQL, and MySQL.
- 📦 Smart Data Importer & Exporter: Import CSV/JSON safely, or export your tables in seconds.
- 🌱 Intelligent Data Seeder: Automatically generates realistic fake data (emails, phones, dates) to populate your tables for testing.
- 🗺️ ER Diagram Generator: Scans your database and generates a Mermaid ER diagram that can be instantly imported into Draw.io or viewed on GitHub!
- 🧩 TypeScript Types Generator: Instantly generate TypeScript interfaces (
.d.ts) directly from your database schema!
🚀 Quick Start
You don't need to install anything. Just run:
npx drixioDrixio will automatically scan your project for a .env file containing a DATABASE_URL (e.g., DATABASE_URL=postgres://user:pass@localhost:5432/mydb). If it doesn't find one, it will launch a setup wizard to help you connect!
You can also pass a connection string directly:
npx drixio "mysql://user:pass@localhost:3306/mydb"🛠️ Powerful Subcommands
Drixio is not just a TUI; it comes with powerful quick-commands for your CI/CD pipelines or rapid local development.
🔌 1. Initialize a Local Database
Don't have a database yet? Drixio can create one for you!
npx drixio init sqlite
npx drixio init postgres
npx drixio init mysql(For Postgres and MySQL, it connects to your local server and runs CREATE DATABASE, then automatically drops a configured .env file in your workspace!)
🔍 2. Quick Query
Run SQL instantly and get a beautifully formatted ASCII table result.
npx drixio query "SELECT * FROM users WHERE age > 18"📥 3. Import Data
Import massive CSV or JSON files safely. Drixio uses smart chunking to prevent memory overload.
npx drixio import data.csv --table users📤 4. Export Data
Export your tables to CSV or JSON.
npx drixio export users --format csv
npx drixio export * --format json --schema-only🌱 5. Generate Fake Data (Seed)
Need 500 fake users for testing? Easy. Drixio intelligently analyzes your column names and types to generate realistic data.
npx drixio seed users 500🗺️ 6. Generate ER Diagram
Automatically generates a drixio_schema.md containing a Mermaid.js diagram of your database.
npx drixio diagramTip: Paste the output into Draw.io (Arrange > Insert > Advanced > Mermaid) for a stunning visual layout!
🧩 7. Generate TypeScript Interfaces
Tired of manually writing types? Auto-generate them from your schema!
npx drixio generate-types(Outputs drixio-types.d.ts with all your table interfaces)
📜 8. Execute SQL Script
Run entire .sql files instantly. Perfect for database migrations.
npx drixio exec ./migrations/init.sql📦 9. Database Backup
Backup your entire database. For SQLite, it performs a secure binary copy. For Postgres/MySQL, it dumps schema and data into JSON.
npx drixio backup❓ Help
To view all commands and options:
npx drixio --helpBuilt with ❤️ for Developers who love the Terminal.
