It basically works by using a Flask test client that interacts with the Schema Diff endpoints.
It's a single isolated file, I haven't patched any of the existing modules.
For a quickstart, there's also a docker image that can be used like:
docker run supabase/pgadmin-schema-diff \ 'postgres://postgres@host/diff_source' \ 'postgres://postgres@host/diff_target' \ > diff.sql
## the stderr output shows the same messages as the Schema Diff GUI:
That's an interesting approach! Obviously the code is just a proof of concept at the moment (redirecting stdout is masking errors for example), but is this something you'd be interested in working on to become a more fully featured and production quality CLI?