git clone https://github.com/richhaase/plonk.git
cd plonk
just dev-setup
go test ./...
just installRequirements: Go 1.23+, Homebrew, Git, just (brew install just)
plonk/
├── cmd/plonk/ # Entry point
├── internal/
│ ├── commands/ # CLI commands
│ ├── packages/ # Package manager implementations
│ ├── dotfiles/ # Dotfile management
│ ├── orchestrator/ # Coordination
│ ├── config/ # Configuration
│ ├── lock/ # Lock file handling
│ ├── gitops/ # Git automation (auto-commit, push, pull)
│ ├── clone/ # Repository cloning
│ ├── diagnostics/ # Health checks
│ └── output/ # Output formatting
├── docs/ # Documentation
└── tests/bats/ # Integration tests
See docs/internals.md for architecture details.
just build # Build to bin/plonk
just install # Install to system
just test # Run tests
just lint # Run lintersgo test ./...
go test -v ./internal/packages/...BATS tests exercise the real CLI with real package managers.
bats tests/bats/behavioral/Test packages are defined in tests/bats/config/safe-packages.list.
Plonk supports 5 package managers: brew, cargo, go, pnpm, uv.
To add a new one:
-
Create
internal/packages/newmanager.goimplementing theManagerinterface:type Manager interface { IsInstalled(ctx context.Context, name string) (bool, error) Install(ctx context.Context, name string) error }
-
Register in
internal/packages/registry.go -
Add to
SupportedManagersininternal/packages/manager.go -
Add BATS tests in
tests/bats/behavioral/03-package-managers.bats -
Update docs: README.md and docs/reference.md
- Create
internal/commands/newcmd.go - Register with root command in
init() - Add output format support if displaying data
- Add tests
- Update docs/reference.md
- Follow Effective Go
- Use
gofmt - Return structured results with per-item status
- Pass context through all layers
- Support table/JSON/YAML output formats
- Fork and create a feature branch
- Make changes with tests
- Run
go test ./...andjust lint - Submit PR with clear description
feat: add support for X
fix: handle edge case in Y
docs: update Z documentation
test: add tests for W
When changing functionality, update:
- README.md (if user-facing)
- docs/reference.md (CLI/config changes)
- docs/internals.md (architecture changes)