Skip to content

Commit 66a5d07

Browse files
authored
Feat/implement phase c (#2)
1 parent fe535f1 commit 66a5d07

22 files changed

Lines changed: 1360 additions & 74 deletions

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ A single binary that turns the painful, error-prone sprawl of `pg_dump` → `pg_
1717
---
1818

1919
> [!WARNING]
20-
> **Pre-1.0 — active development.** Postgres backup/restore/sync/verify/inspect work end-to-end today (Phase B). MySQL/MariaDB, the interactive dashboard, incremental backups, and ops features are on the [roadmap](#roadmap). APIs, flags, and the on-disk dump format may change before 1.0. Track progress via the milestone tags (`phase-a`, `phase-b`, …).
20+
> **Pre-1.0 — active development.** Postgres backup/restore/sync/verify/inspect work end-to-end today (Phase B), and bare `siphon` opens an interactive multi-panel dashboard (Phase C). MySQL/MariaDB, incremental backups, and ops features are on the [roadmap](#roadmap). APIs, flags, and the on-disk dump format may change before 1.0. Track progress via the milestone tags (`phase-a`, `phase-b`, `phase-c`, …).
2121
2222
## Table of contents
2323

@@ -41,7 +41,7 @@ A single binary that turns the painful, error-prone sprawl of `pg_dump` → `pg_
4141
- **One CLI, many databases.** Postgres works today; MySQL and MariaDB land in v1.0 (sharing a common backend). The driver interface is engine-agnostic, so SQLite, MongoDB, SQL Server, and ClickHouse can follow.
4242
- **Native, not reimplemented.** siphon shells out to `pg_dump`/`pg_restore` (and `mysqldump`/`mariadb-dump` in v1.0) for the actual data movement — you inherit 20+ years of correctness from the official tools, wrapped in a consistent UX.
4343
- **Integrity by default.** Every dump is checksummed (SHA-256) and recorded in a sidecar metadata file. `siphon verify` re-hashes the dump and flags corruption or tampering — and fails with a distinct exit code so CI can catch it.
44-
- **Built for scripts and humans.** A Cobra command tree with predictable flags and POSIX exit codes for automation; a Bubble Tea dashboard (Phase C) when you invoke `siphon` bare.
44+
- **Built for scripts and humans.** A Cobra command tree with predictable flags and POSIX exit codes for automation; an interactive Bubble Tea dashboard when you invoke `siphon` bare.
4545
- **Named profiles + secret refs.** Store connection details once; reference secrets as `env:VAR` today, with OS keychain / Vault / 1Password / AWS Secrets Manager backends on the roadmap. Plaintext passwords never have to live in your config.
4646
- **Streaming sync.** `siphon sync src dst` pipes a backup straight into a restore with no intermediate file on disk.
4747

@@ -51,7 +51,7 @@ A single binary that turns the painful, error-prone sprawl of `pg_dump` → `pg_
5151
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
5252
| **A** — Skeleton | Go module, Cobra CLI, TUI placeholder, `Driver` interface + registry, `errs`/`config`/`secrets`/`profile` packages, golangci-lint + depguard, cross-platform CI | ✅ Complete |
5353
| **B** — Postgres walking skeleton | `backup`, `restore`, `sync`, `verify`, `inspect`, `dumps`, `config`, `profile` working end-to-end against PostgreSQL | ✅ Complete |
54-
| **C** — TUI dashboard | Multi-panel Bubble Tea dashboard with live job progress | ⏳ Planned |
54+
| **C** — TUI dashboard | Multi-panel Bubble Tea dashboard (profiles · dumps · jobs) with live job progress, backup/restore modal forms, and snapshot tests | ✅ Complete |
5555
| **D** — Driver hardening | Shared cross-driver test harness, capability gating, retry policy | ⏳ Planned |
5656
| **E** — MySQL + MariaDB | Both drivers via a shared `_mysqlcommon` package | ⏳ Planned |
5757
| **F** — Advanced transfer | Incremental backups, bounded-buffer streaming, cross-engine sync, CDC | ⏳ Planned |
@@ -133,7 +133,7 @@ Exit codes follow a POSIX-friendly taxonomy (`0` ok, `1` user error, `2` system
133133
| `siphon config path\|edit` | Show or edit the config file |
134134
| `siphon schedule` | Cron-managed recurring backups _(Phase G)_ |
135135
| `siphon tunnel` | SSH tunnel helper _(Phase G)_ |
136-
| `siphon` _(bare)_ | Launch the interactive dashboard _(real dashboard in Phase C)_ |
136+
| `siphon` _(bare)_ | Launch the interactive multi-panel dashboard |
137137

138138
Run `siphon <command> --help` for full flags.
139139

go.mod

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ module github.com/nixrajput/siphon
33
go 1.26.3
44

55
require (
6+
github.com/charmbracelet/bubbles v1.0.0
67
github.com/charmbracelet/bubbletea v1.3.10
8+
github.com/charmbracelet/huh v1.0.0
79
github.com/charmbracelet/lipgloss v1.1.0
10+
github.com/charmbracelet/x/exp/teatest v0.0.0-20260527151214-009e6338d40d
811
github.com/jackc/pgx/v5 v5.9.2
12+
github.com/muesli/termenv v0.16.0
913
github.com/oklog/ulid/v2 v2.1.1
1014
github.com/spf13/cobra v1.10.2
1115
github.com/testcontainers/testcontainers-go/modules/postgres v0.42.0
@@ -16,13 +20,22 @@ require (
1620
dario.cat/mergo v1.0.2 // indirect
1721
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
1822
github.com/Microsoft/go-winio v0.6.2 // indirect
23+
github.com/atotto/clipboard v0.1.4 // indirect
1924
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
25+
github.com/aymanbagabas/go-udiff v0.3.1 // indirect
26+
github.com/catppuccin/go v0.3.0 // indirect
2027
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
2128
github.com/cespare/xxhash/v2 v2.3.0 // indirect
22-
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
23-
github.com/charmbracelet/x/ansi v0.10.1 // indirect
24-
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
25-
github.com/charmbracelet/x/term v0.2.1 // indirect
29+
github.com/charmbracelet/colorprofile v0.4.1 // indirect
30+
github.com/charmbracelet/harmonica v0.2.0 // indirect
31+
github.com/charmbracelet/x/ansi v0.11.6 // indirect
32+
github.com/charmbracelet/x/cellbuf v0.0.15 // indirect
33+
github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 // indirect
34+
github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 // indirect
35+
github.com/charmbracelet/x/term v0.2.2 // indirect
36+
github.com/clipperhouse/displaywidth v0.9.0 // indirect
37+
github.com/clipperhouse/stringish v0.1.1 // indirect
38+
github.com/clipperhouse/uax29/v2 v2.5.0 // indirect
2639
github.com/containerd/errdefs v1.0.0 // indirect
2740
github.com/containerd/errdefs/pkg v0.3.0 // indirect
2841
github.com/containerd/log v0.1.0 // indirect
@@ -32,6 +45,7 @@ require (
3245
github.com/distribution/reference v0.6.0 // indirect
3346
github.com/docker/go-connections v0.6.0 // indirect
3447
github.com/docker/go-units v0.5.0 // indirect
48+
github.com/dustin/go-humanize v1.0.1 // indirect
3549
github.com/ebitengine/purego v0.10.0 // indirect
3650
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
3751
github.com/felixge/httpsnoop v1.0.4 // indirect
@@ -44,12 +58,13 @@ require (
4458
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
4559
github.com/jackc/puddle/v2 v2.2.2 // indirect
4660
github.com/klauspost/compress v1.18.5 // indirect
47-
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
61+
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
4862
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
4963
github.com/magiconair/properties v1.8.10 // indirect
5064
github.com/mattn/go-isatty v0.0.20 // indirect
5165
github.com/mattn/go-localereader v0.0.1 // indirect
52-
github.com/mattn/go-runewidth v0.0.16 // indirect
66+
github.com/mattn/go-runewidth v0.0.19 // indirect
67+
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
5368
github.com/moby/docker-image-spec v1.3.1 // indirect
5469
github.com/moby/go-archive v0.2.0 // indirect
5570
github.com/moby/moby/api v1.54.1 // indirect
@@ -61,13 +76,13 @@ require (
6176
github.com/moby/term v0.5.2 // indirect
6277
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
6378
github.com/muesli/cancelreader v0.2.2 // indirect
64-
github.com/muesli/termenv v0.16.0 // indirect
6579
github.com/opencontainers/go-digest v1.0.0 // indirect
6680
github.com/opencontainers/image-spec v1.1.1 // indirect
6781
github.com/pmezard/go-difflib v1.0.0 // indirect
6882
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
6983
github.com/rivo/uniseg v0.4.7 // indirect
7084
github.com/rogpeppe/go-internal v1.15.0 // indirect
85+
github.com/sahilm/fuzzy v0.1.1 // indirect
7186
github.com/shirou/gopsutil/v4 v4.26.3 // indirect
7287
github.com/sirupsen/logrus v1.9.4 // indirect
7388
github.com/spf13/pflag v1.0.9 // indirect

0 commit comments

Comments
 (0)