All notable changes to this project will be documented in this file.
The format follows Keep a Changelog and this project adheres to Semantic Versioning.
restore(PostgreSQL plain, MySQL): SQL files produced bypg_dump -C, pgAdmin, ormysqldump --databasesembed\connect,CREATE DATABASE, andUSEdirectives that redirected the client to the source database, ignoring--db. The plain SQL content is now filtered to strip these directives before being piped to the database client, so the restore always targets the database specified via--db.
- MongoDB engine support (
--engine mongodb). Requiresmongosh,mongodump, andmongorestorebinaries. - Backup format: archive (
mongodump --archive --gzip) producing.mongodumpfiles. Plain format is not supported by MongoDB and will exit with a clear error. hdx inspect <file>.mongodump: inspect MongoDB archive dumps offline viamongorestore --dryRun.- MongoDB added to
hdx cloud uploadandhdx restore s3://workflows (engine-agnostic path, no changes required). mongodbadded to npm keywords.
hdx cloud list [path]now defaults to directory mode: shows only immediate children (files and subdirectories) at the given level, similar tols. Pass--recursiveto list all objects regardless of depth.hdx cloud upload <file> [--prefix PREFIX]command: upload an existing local file to the configured S3 bucket.hdx backup --no-keepflag: delete the local backup file after a successful upload (requires--upload).hdx cloud deletenow verifies the key exists before attempting deletion. Exits with an error if the key is not found or is a directory prefix.
hdx cloud list <path>now accepts path as a positional argument. Previously, passing a path without--prefixwas silently ignored.hdx cloud downloadnow saves files to~/.herdux/backups/by default, creating the directory if needed. Previously, files were saved to the current working directory.
hdx cloud listno longer crashes with a stack overflow when the bucket contains a very large number of objects. Display is now capped at 200 items with a truncation notice.
hdx cloud configcommand: configure cloud storage settings (bucket, region, access-key, secret-key, endpoint). Credentials stored in~/.herdux/config.json; env varsAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYtake priority.hdx cloud list [--prefix PREFIX]command: list backup files in the configured S3 bucket. Displays key, size, and last modified date in a table.hdx cloud download <key> [-o DIR]command: download a backup file from the configured S3 bucket to a local directory.hdx cloud delete <key> [-y]command: delete a backup file from the configured S3 bucket. Requires confirmation unless--yesis passed.hdx backup --upload [prefix]flag: after a successful backup, upload the file to the configured S3 bucket. Accepts an optional key prefix (e.g.backups/).hdx restore s3://bucket/key --db mydb: restore directly from an S3 URL. Downloads to a temp file, restores, then cleans up automatically.- Support for any S3-compatible provider (Cloudflare R2, MinIO, DigitalOcean Spaces) via
hdx cloud config endpoint URL.
hdx docker listcommand: lists running postgres, mysql, and mariadb containers. Displays name, engine type, mapped host port, and status in a table. Accepts--allto include stopped containers.hdx docker start <name>command: starts a stopped database container.hdx docker stop <name>command: stops a running container. Accepts--removeto also remove it after stopping.
hdx inspect <file>command: inspects the contents of a backup file without connecting to a database. Supports.dump(PostgreSQL custom, viapg_restore --list),.sql(any engine, extracts CREATE statements), and.db/.sqlite(SQLite, viasqlite3 .schema). Completely offline.
- MySQL engine now rejects
--format customwith a clear error message. Previously, passing--format customfor a MySQL backup was silently ignored and produced a plain SQL file regardless. MySQL only supports plain SQL format viamysqldump.
- SQLite engine support (
--engine sqlite). File-based, no server required. Databases stored at~/.herdux/sqlite/by default; override with--host <dir>. test:e2e:sqlitenpm script ande2e-sqliteCI job. No Docker required; SQLite is installed viaapt-getin CI.- SQLite E2E workflow test covering the full lifecycle: doctor, version, config, create, list, backup (custom and plain), drop, restore, cleanup.
sqliteadded to npm keywords.
- Connection resolver now skips port-based auto-discovery for portless engines. Previously, running any command with
--engine sqlitewithout a port would incorrectly trigger server scanning and exit with "No running SQLite servers found". sqliteadded to the valid engines list insrc/index.ts. Previously, passing--engine sqlitewas rejected with "Unknown engine".
- Help examples via
.addHelpTextfor all 9 commands, visible withhdx <command> --help. - Input validation for database names: rejects names containing spaces and special shell characters.
- Improved command descriptions for clarity across all commands.
- CLI integration test harness (
CliRunner) with isolated temp directories. Tests run the compiled CLI as a subprocess. - AI agent workflow guides in
.agents/workflows/:pre-commit.md,testing.md,new-engine.md,new-command.md,refactoring.md. - Coverage thresholds enforced in CI: 95% statements, functions, lines, and branches for
src/commands/.
- All unit tests parametrized with
describe.each(engines)to run against both PostgreSQL and MySQL simultaneously. - Extracted
promptServerSelectionandresolveEngineTypefromresolve-connection.tsinto private helpers, reducing function size and improving testability.
--engineflag now correctly filters the server profile selection prompt. Previously, passing--engine mysqlwould still show PostgreSQL profiles in the interactive list.
- MySQL engine support (
--engine mysql). Requiresmysqlandmysqldumpbinaries. - Multi-engine architecture: all commands are now engine-agnostic behind the
IDatabaseEngineinterface. --engineglobal flag accepted by all commands.- Engine type saved per server profile and in global config (
herdux config set engine mysql). - GitHub Actions CI, Dependabot config, and Husky pre-commit hooks.
- PostgreSQL restore now ignores ownership and ACL assignments (
--no-owner,--no-acl), preventing errors when restoring production dumps to a local environment where production roles do not exist. - Non-fatal
pg_restorewarnings (e.g. missing roles) are now reported informatively instead of causing the command to fail.
- Full architecture refactor: decoupled all CLI commands from PostgreSQL internals and introduced the abstract
IDatabaseEnginecontract (src/core/interfaces/). - Engine implementations moved to
src/infra/engines/, commands moved tosrc/commands/. - Added comprehensive E2E test suite using Docker Compose.
- Added comprehensive unit test suite with Jest and
ts-jest.
- Minor documentation and badge updates.
hdxshort alias for theherduxbinary.- CLI version now reads dynamically from
package.jsonat runtime.
- Renamed application to
herdux(from previous internal name). - Published as
herdux-clion npm.
- Initial release. PostgreSQL-only CLI.
- Commands:
version,list,create,drop,backup,restore,clean,doctor,config. - Named server profiles with
herdux config add. - Global defaults with
herdux config set. - Auto-discovery of running PostgreSQL servers on common ports.
- Backup in
custom(pg_dump-Fc) andplain(SQL) formats. - Restore with automatic format detection and database auto-creation.
- Interactive multi-select bulk cleanup (
herdux clean) with optional safety backup.