PHPackages                             laranail/db-console - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. laranail/db-console

ActiveLibrary[Database &amp; ORM](/categories/database)

laranail/db-console
===================

Self-hosted, multi-server database, user, and privilege management for Laravel: guided flows, engines for MySQL/MariaDB/PostgreSQL/SQL Server/SQLite, scoped RBAC, encrypted catalog, CLI, and an optional REST API with webhooks.

v0.2.0(1mo ago)036↑1233.3%1MITPHPPHP ^8.4.1 || ^8.5CI passing

Since Jul 8Pushed 1mo agoCompare

[ Source](https://github.com/laranail/db-console)[ Packagist](https://packagist.org/packages/laranail/db-console)[ Docs](https://opensource.simtabi.com/products/laranail/db-console)[ RSS](/packages/laranail-db-console/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (27)Versions (3)Used By (1)

laranail/db-console
===================

[](#laranaildb-console)

[![Packagist Version](https://camo.githubusercontent.com/6f7e7c6f0cd56fdaaa5dd7928bd1b28174f99bb8bc5dd3afea1c47fe852af2b8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6172616e61696c2f64622d636f6e736f6c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laranail/db-console)[![Tests](https://camo.githubusercontent.com/61593dfc0e3ff794c87574cd0a5b2a599b747693eeb67e7c21632cc3233c6d13/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6172616e61696c2f64622d636f6e736f6c652f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/laranail/db-console/actions/workflows/tests.yml)[![Static analysis](https://camo.githubusercontent.com/4e08529635dc2786f15f9023bcfe607c5150664cf321619abc9bf8bfb9786988/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6172616e61696c2f64622d636f6e736f6c652f7374617469632d616e616c797369732e796d6c3f6272616e63683d6d61696e266c6162656c3d737461746963253230616e616c79736973267374796c653d666c61742d737175617265)](https://github.com/laranail/db-console/actions/workflows/static-analysis.yml)[![License MIT](https://camo.githubusercontent.com/a3695e3a139ff4e3a417b0a0fefb755df80669121be616dd12a4227516399190/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6172616e61696c2f64622d636f6e736f6c652e7376673f7374796c653d666c61742d737175617265)](LICENSE)

> Self-hosted, multi-server database, account, and privilege management for Laravel — guided, auditable flows over MySQL, MariaDB, PostgreSQL, SQL Server, and SQLite, with scoped RBAC, an encrypted catalog, a full CLI, and an optional REST API and webhooks.

Requires PHP `^8.4.1 || ^8.5` and Laravel `^13.0`. Headless by design: all logic, no UI (the [`laranail/db-console-webui`](https://github.com/laranail/db-console-webui) package is the thin Livewire/Flux front end). It uses your app's existing database connections — no separate infrastructure to stand up.

`db-console` is the safe way to run the operations a DBA does by hand — create a database, mint a least-privilege account, grant exactly the rights an app needs, rotate a credential, move a user to a new host — from Laravel, over any number of servers, without ever handing the tool a root account. Every input is allow-list validated, only the engine layer builds SQL (so injection has nowhere to land), secrets redact themselves, privileges are capped below server-wide, and every action lands in a tamper-evident audit trail.

Install
-------

[](#install)

```
composer require laranail/db-console
php artisan db-console:install
```

The installer publishes the config, runs the catalog migrations, seeds the shipped console roles, assigns the bootstrap Owner (set `DB_CONSOLE_OWNER_USER_ID`), and runs `doctor` to health-check your servers.

Point it at a **minimal** admin account, never root:

```
CREATE USER 'db_console_admin'@'%' IDENTIFIED BY '…';
GRANT CREATE, DROP, ALTER, INDEX, REFERENCES, CREATE USER, RELOAD ON *.* TO 'db_console_admin'@'%';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, EXECUTE, CREATE VIEW, SHOW VIEW
  ON *.* TO 'db_console_admin'@'%' WITH GRANT OPTION;
```

`doctor` fails loudly if you point it at a root-like account.

Quick start
-----------

[](#quick-start)

Provision a database, a least-privilege account, and its grant in one rollback-safe flow:

```
php artisan laranail::db-console.wizard \
  --server=primary --db=shop_prod --user=shop_app --host=% \
  --preset=app_standard --generate
```

Or drive the services directly from your own code — the same services the CLI, the REST API, and the web UI all call:

```
use Simtabi\Laranail\DBConsole\Services\DatabaseManager;
use Simtabi\Laranail\DBConsole\Domain\{DbName, Charset};

app(DatabaseManager::class)->create('primary', new DbName('shop_prod'), new Charset('utf8mb4'));
```

Mental model
------------

[](#mental-model)

ConceptWhat it is**Server**A registered target (config- or catalog-backed) with an engine and a dedicated admin connection. Admin work never rides the app's default connection.**Engine**The only layer that builds SQL. Per-dialect (MySQL/MariaDB/Postgres/SQL Server/SQLite), it turns validated value objects into exact statements and declares its honest capabilities.**Catalog**A dedicated, optionally-encrypted store of what DBConsole manages. Reads are live from the server; the catalog is history, never the source of truth.**Service**`DatabaseManager` / `AccountManager` / `PrivilegeManager` / wizard — authorize → resolve → check capability → ask the engine → run → audit. Every consumer calls these.**Secret vault**Four drivers (app-key, KMS, HashiCorp Vault, reference) behind one seam. Secrets redact themselves everywhere.**RBAC**Deny-by-default, scope-aware (global ⊇ server ⊇ database), builtin or Spatie-backed.Documentation
------------------------------------------------------

[](#documentation)

Full documentation is hosted at ****.

### Guides

[](#guides)

- [Installation](docs/installation.md) — requirements, install, the minimal admin account, catalog setup.
- [Getting started](docs/getting-started.md) — register a server, run the wizard, read the audit trail.
- [Configuration](docs/configuration.md) — every `laranail.db-console.*` key.
- [Architecture](docs/architecture.md) — the layers, the invariants, and why they are shaped this way.
- [Release](docs/release.md) — versioning and the release process.
- [Comparison](docs/comparison.md) — why this exists and how it differs from a raw admin GUI.

### Reference

[](#reference)

- [Engines](docs/tools/engines.md) · [Servers &amp; connections](docs/tools/servers.md) · [Secret vault](docs/tools/secret-vault.md) · [Catalog encryption](docs/tools/catalog-encryption.md)
- [RBAC](docs/tools/rbac.md) · [Audit trail](docs/tools/audit.md) · [Wizard &amp; rollback](docs/tools/wizard-executor.md) · [Attach / detach](docs/tools/attach-detach.md) · [Reconcile](docs/tools/reconcile.md)
- [doctor](docs/tools/doctor.md) · [Commands](docs/tools/commands.md) · [REST API](docs/tools/api.md) · [Webhooks](docs/tools/webhooks.md) · [Events &amp; notifications](docs/tools/events-notifications.md)

### Recipes

[](#recipes)

- [Provision a minimal admin per engine](docs/recipes/provision-minimal-admin.md)
- [Configure a KMS / Vault / reference secret driver](docs/recipes/configure-secret-driver.md)
- [Issue an API token](docs/recipes/issue-api-token.md)
- [Verify a webhook signature](docs/recipes/verify-webhook-signature.md)
- [Use the Spatie RBAC driver](docs/recipes/spatie-rbac.md)

Stability
---------

[](#stability)

Pre-1.0. The public surface — services, value objects, the shared validation layer, events, and CLI names — is settling toward a stable 1.0. Breaking changes are called out in [UPGRADING.md](UPGRADING.md) and the [CHANGELOG](CHANGELOG.md).

Local development
-----------------

[](#local-development)

```
composer install
composer test                                 # Pest — runs entirely on SQLite, no external servers
composer lint                                 # Pint, PHPStan (level 8), Rector
```

The suite is self-contained (in-memory SQLite). Live multi-engine integration against MySQL/MariaDB/PostgreSQL — and a full demo UI — live in [`laranail/db-console-boilerplate`](https://github.com/laranail/db-console-boilerplate). See [CONTRIBUTING.md](CONTRIBUTING.md) for conventions.

Sister packages
---------------

[](#sister-packages)

- [`laranail/console`](https://github.com/laranail/console) — the command base, formatter, and prompter.
- [`laranail/package-tools`](https://github.com/laranail/package-tools) — the service-provider builder and install flow.
- [`laranail/enumerator`](https://github.com/laranail/enumerator) — the translatable enum toolkit.
- [`laranail/db-tools`](https://github.com/laranail/db-tools) — optional backup, inspection, and audit helpers.
- [`laranail/db-console-webui`](https://github.com/laranail/db-console-webui) — the thin Livewire + Flux front end for this package.

Community
---------

[](#community)

Questions and ideas are welcome in [GitHub Discussions](https://github.com/laranail/db-console/discussions); bugs in [Issues](https://github.com/laranail/db-console/issues).

Contributing &amp; security
---------------------------

[](#contributing--security)

See [CONTRIBUTING.md](CONTRIBUTING.md). Report vulnerabilities per [SECURITY.md](SECURITY.md) (disclosure to `opensource@simtabi.com`), never in a public issue.

License
-------

[](#license)

MIT — see [LICENSE](LICENSE). Copyright (c) 2026 Simtabi LLC.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance91

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

46d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3108393?v=4)[Simtabi](/maintainers/simtabi)[@simtabi](https://github.com/simtabi)

---

Top Contributors

[![imanimanyara](https://avatars.githubusercontent.com/u/19682005?v=4)](https://github.com/imanimanyara "imanimanyara (1 commits)")

---

Tags

databasedbalaravelossphplaraveldatabasemysqlsqlitepostgresqlmariadbsqlserverrbacprivilegesdbagrantsdatabase-managementlaranail

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/laranail-db-console/health.svg)

```
[![Health](https://phpackages.com/badges/laranail-db-console/health.svg)](https://phpackages.com/packages/laranail-db-console)
```

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k31.8M163](/packages/laravel-cashier)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9922.4M147](/packages/roots-acorn)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80427.1M249](/packages/laravel-mcp)[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M341](/packages/laravel-ai)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
