dbx

module
v0.0.0-...-dac6614 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2026 License: AGPL-3.0

README

dbx

Multi-database lifecycle management framework — CLI, REST API, MCP adapters, and Web UI for Oracle, PostgreSQL, Host/OS, and Engineered Systems.

Architecture

Layer 0: dbx Go framework (dbxcli + dbxctl + REST API + Go library)
Layer 1: MCP adapters (TypeScript npm wrappers calling dbxcli)
Layer 2: AI skills (Claude Code skills, IDE integrations)

Layer 0 works standalone — MCP and AI are optional.

Engines

Engine Tools Status
Oracle Database 350+ Active
PostgreSQL 124 Active
Host / OS 80+ Active
Engineered Systems 120+ Active
SQL Server Roadmap
MySQL / MongoDB Roadmap

Quick Start

# Build
make build

# Run CLI
./bin/dbxcli version
./bin/dbxcli target list

# Run service controller
./bin/dbxctl serve

Interfaces

Interface Binary Description
CLI dbxcli Interactive terminal, scripts, cron
Service dbxctl Long-running daemon, health, scheduling
REST API dbxctl serve HTTP/JSON for integrations
MCP Layer 1 adapters AI model integration
Web UI dbxctl ui Browser-based operations

Documentation Generation

dbx auto-generates LLM-friendly CLI documentation from the Cobra command tree using cobra/doc.

# Generate docs/cli/*.md + llms.txt
make docs

# Or with custom paths
go run ./cmd/docgen -out docs/cli -llms llms.txt

Output:

  • docs/cli/*.md — One Markdown file per command (Cobra doc format, 70+ files)
  • llms.txt — Single flat file with all commands, flags, and examples for LLM ingestion

The generated llms.txt enables any LLM to understand the complete command surface in a single read. MCP adapters (Layer 1) use these generated descriptions as their tool definitions.

Run make docs after adding or modifying commands to keep documentation in sync.

License

AGPL-3.0 — see LICENSE.

Directories

Path Synopsis
api
v1
Package v1 provides the REST API skeleton for dbx.
Package v1 provides the REST API skeleton for dbx.
cmd
dbxcli command
dbxcli is the interactive CLI for the dbx database lifecycle management framework.
dbxcli is the interactive CLI for the dbx database lifecycle management framework.
dbxcli/root
Package root provides the exported Cobra root command constructor.
Package root provides the exported Cobra root command constructor.
dbxctl command
dbxctl is the service controller for the dbx database lifecycle management framework.
dbxctl is the service controller for the dbx database lifecycle management framework.
docgen command
Command docgen generates LLM-friendly documentation from the Cobra command tree.
Command docgen generates LLM-friendly documentation from the Cobra command tree.
internal
format
Package format provides output formatting for CLI, REST, and MCP interfaces.
Package format provides output formatting for CLI, REST, and MCP interfaces.
version
Package version holds the build version, injected at compile time via ldflags.
Package version holds the build version, injected at compile time via ldflags.
Package mcp provides the MCP JSON-RPC adapter skeleton for dbx.
Package mcp provides the MCP JSON-RPC adapter skeleton for dbx.
pkg
core/audit
Package audit provides a multi-sink audit trail for all tool invocations.
Package audit provides a multi-sink audit trail for all tool invocations.
core/config
Package config provides YAML + env var configuration loading with sensible defaults.
Package config provides YAML + env var configuration loading with sensible defaults.
core/confirm
Package confirm provides confirmation gates for destructive operations.
Package confirm provides confirmation gates for destructive operations.
core/connection
Package connection provides database connection management interfaces.
Package connection provides database connection management interfaces.
core/license
Package license provides Ed25519 license validation with grace period support.
Package license provides Ed25519 license validation with grace period support.
core/oemgate
Package oemgate enforces OEM Management Pack declarations.
Package oemgate enforces OEM Management Pack declarations.
core/oraclegate
Package oraclegate enforces Oracle edition/option license declarations.
Package oraclegate enforces Oracle edition/option license declarations.
core/ssh
Package ssh provides SSH command execution with an allowlist-based security model.
Package ssh provides SSH command execution with an allowlist-based security model.
core/target
Package target defines the unified target model for all database engines.
Package target defines the unified target model for all database engines.
core/transport
Package transport provides MCP streamable HTTP transport with JWT authentication.
Package transport provides MCP streamable HTTP transport with JWT authentication.
core/vault
Package vault provides credential resolution via HashiCorp Vault with caching.
Package vault provides credential resolution via HashiCorp Vault with caching.
db/advisor
Package advisor provides read-only Oracle advisor operations.
Package advisor provides read-only Oracle advisor operations.
db/internal
Package internal provides shared query helpers for all pkg/db/ packages.
Package internal provides shared query helpers for all pkg/db/ packages.
db/parameter
Package parameter provides read-only Oracle init parameter operations.
Package parameter provides read-only Oracle init parameter operations.
db/redo
Package redo provides read-only Oracle redo log operations.
Package redo provides read-only Oracle redo log operations.
db/schema
Package schema provides read-only Oracle schema/object browser operations.
Package schema provides read-only Oracle schema/object browser operations.
db/session
Package session provides read-only Oracle session operations.
Package session provides read-only Oracle session operations.
db/sql
Package sql provides read-only SQL execution with a SELECT-only guard.
Package sql provides read-only SQL execution with a SELECT-only guard.
db/tablespace
Package tablespace provides read-only Oracle tablespace operations.
Package tablespace provides read-only Oracle tablespace operations.
db/undo
Package undo provides read-only Oracle undo/rollback operations.
Package undo provides read-only Oracle undo/rollback operations.
db/user
Package user provides read-only Oracle user/role operations.
Package user provides read-only Oracle user/role operations.
host
Package host defines the Executor interface used by install primitives to run shell commands on remote hosts.
Package host defines the Executor interface used by install primitives to run shell commands on remote hosts.
host/distro
Package distro provides a distro-agnostic abstraction layer for Linux host management.
Package distro provides a distro-agnostic abstraction layer for Linux host management.
host/filesystem
Package filesystem provides mount point, LVM, and inode parsing.
Package filesystem provides mount point, LVM, and inode parsing.
host/hosttest
Package hosttest provides test helpers for the host.Executor interface.
Package hosttest provides test helpers for the host.Executor interface.
host/kernel
Package kernel provides kernel parameter, module, and hugepage parsing.
Package kernel provides kernel parameter, module, and hugepage parsing.
host/log
Package log provides journald and auth log analysis.
Package log provides journald and auth log analysis.
host/metrics
Package metrics provides system metric collectors for CPU, memory, disk, network, and processes.
Package metrics provides system metric collectors for CPU, memory, disk, network, and processes.
host/network
Package network provides network interface, route, DNS, and NTP configuration parsing.
Package network provides network interface, route, DNS, and NTP configuration parsing.
host/package
Package hostpkg provides distro-agnostic package management parsing (apt/dnf/zypper).
Package hostpkg provides distro-agnostic package management parsing (apt/dnf/zypper).
host/patch
Package patch provides OS patch status and ksplice assessment.
Package patch provides OS patch status and ksplice assessment.
host/security
Package security provides security posture assessment — SELinux, AppArmor, SSH, compliance checks.
Package security provides security posture assessment — SELinux, AppArmor, SSH, compliance checks.
host/service
Package service provides systemd service management parsing.
Package service provides systemd service management parsing.
host/user
Package user provides user account auditing — who logged in, when, from where.
Package user provides user account auditing — who logged in, when, from where.
license
Package license provides a tier-gated license facade for the dbxcli.
Package license provides a tier-gated license facade for the dbxcli.
linux/kernel
Package kernel provides Oracle Linux kernel parameter management over SSH.
Package kernel provides Oracle Linux kernel parameter management over SSH.
linux/network
Package network provides Oracle Linux network diagnostics over SSH.
Package network provides Oracle Linux network diagnostics over SSH.
linux/package
Package linuxpkg provides Oracle Linux package management (RPM/DNF) over SSH.
Package linuxpkg provides Oracle Linux package management (RPM/DNF) over SSH.
linux/security
Package security provides Oracle Linux security status checks over SSH.
Package security provides Oracle Linux security status checks over SSH.
linux/storage
Package storage provides Oracle Linux storage/LVM management over SSH.
Package storage provides Oracle Linux storage/LVM management over SSH.
oracle/sql
Package sql provides Oracle SQL execution primitives that run via SSH-wrapped sqlplus on a managed Oracle host.
Package sql provides Oracle SQL execution primitives that run via SSH-wrapped sqlplus on a managed Oracle host.
otel
Package otel provides OpenTelemetry span emission helpers for dbx and downstream tools (proxctl, linuxctl, mcp-oracle-*).
Package otel provides OpenTelemetry span emission helpers for dbx and downstream tools (proxctl, linuxctl, mcp-oracle-*).
pg/audit
Package audit provides PostgreSQL audit trail tools.
Package audit provides PostgreSQL audit trail tools.
pg/backup
Package backup provides PostgreSQL backup, restore, and PITR tools.
Package backup provides PostgreSQL backup, restore, and PITR tools.
pg/capacity
Package capacity provides PostgreSQL capacity planning tools.
Package capacity provides PostgreSQL capacity planning tools.
pg/cnpg
Package cnpg provides CloudNativePG cluster management tools.
Package cnpg provides CloudNativePG cluster management tools.
pg/cnpg_dr
Package cnpg_dr provides CNPG cross-cluster disaster recovery tools.
Package cnpg_dr provides CNPG cross-cluster disaster recovery tools.
pg/compliance
Package compliance provides PostgreSQL compliance scanning tools.
Package compliance provides PostgreSQL compliance scanning tools.
pg/connection
Package connection provides a multi-profile PostgreSQL connection registry.
Package connection provides a multi-profile PostgreSQL connection registry.
pg/crud
Package crud provides confirm-gated CRUD operations for PostgreSQL.
Package crud provides confirm-gated CRUD operations for PostgreSQL.
pg/dba
Package dba provides DBA daily operations for PostgreSQL.
Package dba provides DBA daily operations for PostgreSQL.
pg/dba_advanced
Package dba_advanced provides advanced DBA operations for PostgreSQL.
Package dba_advanced provides advanced DBA operations for PostgreSQL.
pg/ha
Package ha provides PostgreSQL high availability operations.
Package ha provides PostgreSQL high availability operations.
pg/health
Package health provides PostgreSQL health monitoring tools.
Package health provides PostgreSQL health monitoring tools.
pg/migration
Package migration provides PostgreSQL schema migration and upgrade tools.
Package migration provides PostgreSQL schema migration and upgrade tools.
pg/observability
Package observability provides PostgreSQL monitoring and observability tools.
Package observability provides PostgreSQL monitoring and observability tools.
pg/performance
Package performance provides PostgreSQL performance analysis tools.
Package performance provides PostgreSQL performance analysis tools.
pg/policy
Package policy provides markdown policy file management.
Package policy provides markdown policy file management.
pg/query
Package query provides SQL execution with row limiting and query plan analysis.
Package query provides SQL execution with row limiting and query plan analysis.
pg/rag
Package rag provides PostgreSQL RAG (Retrieval-Augmented Generation) tools.
Package rag provides PostgreSQL RAG (Retrieval-Augmented Generation) tools.
pg/rbac
Package rbac provides PostgreSQL role-based access control tools.
Package rbac provides PostgreSQL role-based access control tools.
pg/replication
Package replication provides PostgreSQL replication monitoring tools.
Package replication provides PostgreSQL replication monitoring tools.
pg/schema
Package schema provides PostgreSQL schema introspection tools.
Package schema provides PostgreSQL schema introspection tools.
pg/security
Package security provides PostgreSQL security audit tools.
Package security provides PostgreSQL security audit tools.
pg/tenant
Package tenant provides PostgreSQL multi-tenant management tools.
Package tenant provides PostgreSQL multi-tenant management tools.
pg/vault_pg
Package vault_pg provides Vault-backed PostgreSQL credential management.
Package vault_pg provides Vault-backed PostgreSQL credential management.
pg/wal
Package wal provides PostgreSQL WAL monitoring tools.
Package wal provides PostgreSQL WAL monitoring tools.
pipeline
Package pipeline implements the 9-stage execution pipeline for all dbx operations.
Package pipeline implements the 9-stage execution pipeline for all dbx operations.
policy
Package policy provides the unified compliance policy engine for CIS, STIG, and custom policies.
Package policy provides the unified compliance policy engine for CIS, STIG, and custom policies.
policy/oracle
Package oracle provides SQL-based policy check executors for Oracle Database.
Package oracle provides SQL-based policy check executors for Oracle Database.
policy/os
Package os provides OS-level policy check executors for CIS Linux, DISA STIG, and custom policies.
Package os provides OS-level policy check executors for CIS Linux, DISA STIG, and custom policies.
policy/pg
Package pg provides SQL-based policy check executors for PostgreSQL.
Package pg provides SQL-based policy check executors for PostgreSQL.
provision/install
Package install ships Oracle install primitives — runInstaller, root.sh, asmca, netca, oracleasm/afd disk labeling — invoked by /lab-up Phase D skills via dbxcli provision install <action>.
Package install ships Oracle install primitives — runInstaller, root.sh, asmca, netca, oracleasm/afd disk labeling — invoked by /lab-up Phase D skills via dbxcli provision install <action>.
rag
Package rag provides retrieval-augmented generation for AI-assisted database management.
Package rag provides retrieval-augmented generation for AI-assisted database management.
rag/sources
Package sources provides document source implementations for the RAG indexer.
Package sources provides document source implementations for the RAG indexer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL