Contributing
The following kind of contributions are welcome:
- New Issues (bug reports, questions, ideas, …)
- Pull Requests (documentation improvements, code improvements, new features, …)
Setup
Setup Nix and direnv for your shell:
git clone https://github.com/cmdoret/sshwarm && cd sshwarm
direnv allow # or: nix develop
The dev shell has Go and all the tooling to work in the repo.
Tasks
We use just as a task runner:
just test | tests |
just lint | golangci-lint, shellcheck, nix flake check |
just format | format everything |
just build | binary and Nix package, into .output/ |
just update | Go dependencies, flake lock, vendor hash |
just docs::serve | this documentation, live |
just | every recipe |
The git hooks format, lint, and update the Nix vendor hash when go.mod changes:
the commit then fails; stage the new hash and commit again.
Tests
- No real ssh:
testutil.FakeBinputs a fakesshfirst onPATH. - The probe fixtures in
internal/swarm/testdatacome from real machines:sshwarm probe <machine>. - The browser’s tests type keys and read the screen:
internal/ui/tui_test.go.
Code
See architecture. Style: Google’s Go style guide. Comments say why, not what.
Release
just release::bump minor # or patch, major, x.y.z: commits the version, tags it
git push --follow-tags
Then publish a GitHub release of the tag. CI uploads the binaries and pushes the
images: x.y.z, and latest unless it’s a pre-release.
AI contributions
AI contributions are welcome, as long as:
- the code passes all checks and follows the quality standards in place.
- They are not unnecessarily verbose or overengineered
- The PR descriptions issues and discussions are humen written
The use of samber/cc-skills-golang is recommended.