Thanks for considering a contribution to pgcopycat.
This project is intended to stay practical, readable, and safe for local PostgreSQL refresh workflows. Contributions that improve correctness, safety, usability, documentation, and test coverage are especially welcome.
- Read the current README.md
- Check whether the change fits the project scope
- Prefer opening an issue first for large features or behavior changes
- For security-sensitive issues, follow SECURITY.md instead of creating a public issue immediately
Requirements:
- Go 1.25+
- PostgreSQL client tools in
PATHpg_dumppg_restorepsql
Build locally:
go build -o pgcopycat ./cmd/pgcopycatRun tests:
go test ./...cmd/pgcopycat/: CLI entrypointinternal/config/: config parsing and validationinternal/discovery/: profile discoveryinternal/planner/: execution plan constructioninternal/checks/: pre-flight checksinternal/postgres/: PostgreSQL inspection and SQL helpersinternal/runner/: dump and restore orchestrationinternal/report/: final report renderinginternal/ui/: interactive prompt flows
- Keep changes focused and easy to review
- Add or update tests when behavior changes
- Update documentation when commands, config, prompts, or safety behavior change
- Preserve the project’s guard rails around destructive operations
- Avoid introducing role or ACL restoration behavior unless it is intentionally discussed and approved
Please include in your pull request:
- A short summary of the problem
- The approach you chose
- Any tradeoffs or limitations
- Test coverage or manual validation notes
- Prefer clear, maintainable code over clever shortcuts
- Keep user-facing messages explicit and actionable
- Preserve interactive and non-interactive behavior where relevant
- Be careful around passwords, config persistence, and anything destructive on the destination database
If your change affects any of the following, update the docs in the same pull request:
- Commands or flags
- Config structure
- Interactive prompts
- Safety defaults
- Extension or sequence behavior
- Open-source contribution guidance
If you are unsure whether an idea belongs in pgcopycat, open an issue or draft pull request and explain the use case before investing heavily in implementation.