devctl is a command-line tool designed to streamline development workflows at Giant Swarm. It provides various commands to help manage repositories, generate files, and bootstrap applications.
Important: We recommend downloading the latest release from our releases page rather than using
go install. This ensures you get a properly built binary with:
- Correct version information
- Git commit information for traceability
- Build timestamps
- All necessary build flags
- Generated code and mocks for testing
While
go installwill work, it won't include this important metadata and may miss generated code that helps with debugging and version tracking.
# Not recommended
go install github.com/giantswarm/devctl/v7@latestRecommended: Download the latest release from
https://github.com/giantswarm/devctl/releases
The app command provides tools for working with Giant Swarm app repositories.
Creates a new app repository from a template with the following features:
- Creates a new repository from the
template-apptemplate - Configures sync methods (vendir or kustomize)
- Sets up patch methods (script or kustomize)
- Configures CI/CD automatically
- Creates a pull request with the initial setup
devctl app bootstrap \
--name my-app \
--patch-method script \
--sync-method vendir \
--team myteam \
--upstream-chart helm/upstream \
--upstream-repo https://github.com/org/repo \
--github-token-envvar GITHUB_TOKENOptions:
--name: Name of the app (required)--patch-method: Method to patch upstream changes (script or kustomize)--sync-method: Method to sync upstream changes (vendir or kustomize)--team: Team responsible for the app--upstream-chart: Path to the upstream chart--upstream-repo: URL of the upstream repository--github-token-envvar: Name of environment variable containing GitHub token--dry-run: Only print what would be done
The repo command helps manage GitHub repositories.
Configures repository settings according to Giant Swarm standards:
- Sets up branch protection rules
- Configures repository settings
- Sets up team permissions
- Configures CI/CD workflows
devctl repo setup org/repo-nameThe gen command provides tools for generating various files:
- Workflows
- Makefile
- License
- And more
devctl gen workflow
devctl gen makefile
devctl gen license# Merge all ready PRs for updating architect-orb to v7.8.9
# where you or your team is requested for review
devctl pr approve-merge-renovate "architect-orb v7.8.9"
# Approve "Align files" PRs
# where you are requested for review
devctl pr approve-align-filesHelps manage releases in Giant Swarm repositories:
- Creates release branches
- Updates changelog
- Creates GitHub releases
devctl release createHelps replace content across multiple files:
devctl replace old-text new-textProvides shell completion for various shells:
# Bash
devctl completion bash > ~/.bash_completion.d/devctl
# Zsh
devctl completion zsh > "${fpath[1]}/_devctl"
# Fish
devctl completion fish > ~/.config/fish/completions/devctl.fish- Go 1.21 or later
- Git
- GitHub account with appropriate permissions
If you want to build from source, use the Makefile which ensures all necessary steps are executed:
git clone https://github.com/giantswarm/devctl.git
cd devctl
make build # Build with proper flags and metadatago test ./...Set LOG_LEVEL=debug to see detailed output:
LOG_LEVEL=debug devctl app bootstrap ...Please check our contributing guidelines for details on how to contribute to this project.
devctl is licensed under the Apache 2.0 License.