Registry / database / tengits-dbm

tengits-dbm

JSON →
library1.0.12jsnpmunverified

tengits-dbm (Database Manager CLI) is a command-line tool for MySQL connection management, migration, and data comparison. Current version is 1.0.12, released with moderate cadence, no changelog available. Key features: SSH tunnel support, AES-256-GCM encrypted password storage, connection pooling, schema/data comparison with multiple modes, and cross-server migration. Requires Node.js >=18.0.0, ships TypeScript types. Primarily aimed at developers and DevOps needing a scriptable, secure MySQL CLI with migration capabilities, differentiating by built-in SSH tunneling and encrypted credential storage.

npm install tengits-dbm
INSTALL
IMPORT
SIG · TENGITS-DBM
T
tengits-dbm
databasejavascriptv1.0.12
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DBM CLI
import { DBM } from 'tengits-dbm'
const dbm = require('tengits-dbm'); const DBM = require('tengits-dbm').DBM;
ESM-only package; TypeScript types included. Import the DBM class for programmatic use. CJS require() will fail because package is type module.
ConnectionPoolManager
import { ConnectionPoolManager } from 'tengits-dbm'
const ConnectionPoolManager = require('tengits-dbm').ConnectionPoolManager;
ESM import for connection pool manager class; used for managing database connection pools. Not exported in CommonJS.
encryptPassword
import { encryptPassword } from 'tengits-dbm'
const encryptPassword = require('tengits-dbm').encryptPassword;
Utility function for encrypting passwords using AES-256-GCM. Only available via named ESM import.
decryptPassword
import { decryptPassword } from 'tengits-dbm'
const decryptPassword = require('tengits-dbm').decryptPassword;
Utility function for decrypting passwords. Must be used with the same master password as encryption.

Programmatic usage of DBM CLI: add connection, list, test, query databases, and remove connection with proper ESM imports.

// Set master password (required for encrypted storage) process.env.DBM_MASTER_PASSWORD = 'your-secure-master-password'; import { DBM } from 'tengits-dbm'; const dbm = new DBM(); // Add a direct connection await dbm.addConnection('mydb', { host: '192.168.1.100', port: 3306, user: 'root', password: 'mypassword' }); // List all connections const connections = await dbm.listConnections(); console.log(connections); // Test connection const testResult = await dbm.testConnection('mydb'); console.log(testResult ? 'Connection OK' : 'Connection failed'); // List databases const databases = await dbm.listDatabases('mydb'); console.log(databases); // Execute SQL const result = await dbm.executeSQL('mydb', { database: 'mydatabase', sql: 'SELECT * FROM users LIMIT 10' }); console.log(result); // Remove connection await dbm.removeConnection('mydb');
dbm --version
Debug
Known issues
gotchaMaster password must be set via environment variable DBM_MASTER_PASSWORD before any operation; otherwise encryption/decryption fails silently or throws.
fix
export DBM_MASTER_PASSWORD='your-master-password' or set process.env.DBM_MASTER_PASSWORD in code before importing dbm.
affects: >=1.0.0
deprecatedCommonJS require is not supported; package is type: module. Using require will throw ERR_REQUIRE_ESM.
fix
Use ESM import syntax: import { DBM } from 'tengits-dbm'
affects: >=1.0.0
gotchaSSH password authentication may expose credentials in process list (e.g., via ps aux). Use SSH key authentication whenever possible.
fix
Prefer --ssh-key-file over --ssh-password for SSH connections.
affects: >=1.0.0
breakingConnection pool timeout default is 5 minutes; long-running queries may cause pool exhaustion if connections are not released properly.
fix
Use the ConnectionPoolManager to configure shorter timeout or increase max connections.
affects: >=1.0.0
gotchaDatabase migration using --force overwrites target without confirmation; accidental data loss possible.
fix
Always backup target database before forced migration; use --backup flag.
affects: >=1.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module /path/to/tengits-dbm/index.js not supported
Using CommonJS require() on an ESM-only package.
fix
Change to ESM import: import { DBM } from 'tengits-dbm'; or set type: module in package.json.
Error: Master password not set. Set DBM_MASTER_PASSWORD environment variable.
Missing environment variable DBM_MASTER_PASSWORD before calling encryption-related functions.
fix
Set process.env.DBM_MASTER_PASSWORD = 'your-pass'; before using dbm.
TypeError: dbm.addConnection is not a function
Using wrong import or not initializing DBM instance properly.
fix
Use import { DBM } from 'tengits-dbm'; then const dbm = new DBM(); and call dbm.addConnection(...).
Upgrade
Version history
1.0.12latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
20
Meta
1
Amazon
1
OpenAI (training)
1
Resources
tengits-dbm — npm install tengits-dbm · libregistry