Thanks for your interest in contributing! Here's how to get started.
- Fork the repository
- Clone your fork:
git clone https://github.com/<your-username>/ugm-tui.git cd ugm-tui
- Install development tools:
go install mvdan.cc/gofumpt@latest go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
make buildThe binary is built from cmd/ugm/main.go and output as ./ugm.
All code must pass formatting and linting before submission:
make fmt # format with gofumpt
make lint # run golangci-lint
make fix # auto-fix lint issues
make all # fmt + fix + buildmake build depends on make lint — the build will fail if linting doesn't pass.
go test ./...Note: some tests require root privileges since they interact with /etc/passwd and /etc/group.
This project follows the Google Go Style Guide:
- Entry point in
cmd/ugm/; all packages underinternal/ - Return errors from functions — no
log.Fatalin library code - No global mutable state — data is passed, not cached in package vars
- Unexported package-level vars/consts prefixed with
_(e.g._defaultShell) - Import grouping: stdlib → external → internal (separated by blank lines)
- Doc comments on all exported types and functions
- Create a feature branch from
main:git checkout -b feature/my-change
- Make your changes
- Run
make allto ensure formatting, linting, and build pass - Run
go test ./...to ensure tests pass - Commit with a clear message:
feat: add user deletion support fix: handle empty group members docs: update keybinding table - Push and open a pull request
- Keep PRs focused — one feature or fix per PR
- Add doc comments to all exported types and functions
- Ensure
make lintreports 0 issues - Update
README.mdif you add new features or keybindings - All management actions must write to the audit log
- Don't break existing tests
.
├── cmd/ugm/main.go # Entry point, root check, OS check
└── internal/
├── passwd/ # Parses /etc/passwd
├── group/ # Parses /etc/group
├── usermgmt/ # User management (create, delete, lock, unlock,
│ # expiry, groups, SSH keys, password aging)
├── audit/ # Action audit logging
└── tui/
├── tui.go # Root model, state management
├── style.go # Shared styles
├── userview.go # User list view
├── groupview.go # Group list view
└── manageview.go # Management actions
Open an issue with:
- What you expected to happen
- What actually happened
- Steps to reproduce
- OS and Go version (
go version)
This project follows the Contributor Covenant. By participating, you agree to uphold this code.