kres

module
v0.0.0-...-f51cb9c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: MPL-2.0

README

Kres

Kres is a tool to automate generation of build instructions based on project structure.

At the moment only Go projects are supported. Kres is opinionated, that's by design.

Following output files are generated automatically:

  • Makefile
  • Dockerfile
  • .drone.yaml
  • .dockerignore
  • .gitignore
  • .golangci.yml
  • .markdownlint.json
  • .golangci.yaml
  • .codecov.yml
  • LICENSE

Access Tokens

Kres can leverage API access tokens to set up build environment or settings for the project:

  • GITHUB_TOKEN environment variable should contain GitHub API personal access token with repo scope.

Running Kres

When running Kres for the first time, run it manually via Docker container:

docker run --rm -v ${PWD}:/src -w /src -e GITHUB_TOKEN ghcr.io/siderolabs/kres:latest

To update build instructions:

make rekres

Directories

Path Synopsis
cmd
kres command
kres entrypoint.
kres entrypoint.
kres/cmd
Package cmd implements Kres commands.
Package cmd implements Kres commands.
internal
config
Package config provides config loading and mapping.
Package config provides config loading and mapping.
dag
Package dag represents abstract directed acyclic graph.
Package dag represents abstract directed acyclic graph.
output
Package output defines basic output features.
Package output defines basic output features.
output/codecov
Package codecov implements output to .codecov.yml.
Package codecov implements output to .codecov.yml.
output/conform
Package conform implements output to .conform.yaml.
Package conform implements output to .conform.yaml.
output/conform/commitpolicy
Package commitpolicy contains YAML structures for commit policy in .conform.yaml.
Package commitpolicy contains YAML structures for commit policy in .conform.yaml.
output/conform/licensepolicy
Package licensepolicy contains the YAML structure for license policy in .conform.yaml.
Package licensepolicy contains the YAML structure for license policy in .conform.yaml.
output/dockerfile
Package dockerfile implements output to Dockerfiles.
Package dockerfile implements output to Dockerfiles.
output/dockerfile/step
Package step defines Dockerfile steps
Package step defines Dockerfile steps
output/dockerignore
Package dockerignore implements output to .dockerignore.
Package dockerignore implements output to .dockerignore.
output/drone
Package drone implements output to .drone.yml.
Package drone implements output to .drone.yml.
output/ghworkflow
Package ghworkflow implements output to .github/workflows/ci.yaml.
Package ghworkflow implements output to .github/workflows/ci.yaml.
output/github
Package github implements interface to GitHub API.
Package github implements interface to GitHub API.
output/gitignore
Package gitignore implements output to .gitignore.
Package gitignore implements output to .gitignore.
output/golangci
Package golangci implements output to .golangci.yml.
Package golangci implements output to .golangci.yml.
output/license
Package license implements output to LICENSE.
Package license implements output to LICENSE.
output/makefile
Package makefile implements output to Makefiles.
Package makefile implements output to Makefiles.
output/markdownlint
Package markdownlint implements output to .markdownlint.json.
Package markdownlint implements output to .markdownlint.json.
output/release
Package release implements output for releases.
Package release implements output for releases.
output/renovate
Package renovate implements output to .github/renovate.json
Package renovate implements output to .github/renovate.json
output/sops
Package sops implements output to .sops.yaml.
Package sops implements output to .sops.yaml.
output/template
Package template implements custom template output.
Package template implements custom template output.
project
Package project provides top-level view of the whole project consisting of building blocks.
Package project provides top-level view of the whole project consisting of building blocks.
project/auto
Package auto provides automatic detector of project type, reflections.
Package auto provides automatic detector of project type, reflections.
project/common
Package common provides building blocks applicable to all projects.
Package common provides building blocks applicable to all projects.
project/custom
Package custom provides blocks defined in the config manually.
Package custom provides blocks defined in the config manually.
project/golang
Package golang provides building blocks for Go-based projects.
Package golang provides building blocks for Go-based projects.
project/golang/templates
Package templates defines default templates for various Go components.
Package templates defines default templates for various Go components.
project/helm
Package helm provides helm build node.
Package helm provides helm build node.
project/js
Package js provides building blocks for JS-based projects.
Package js provides building blocks for JS-based projects.
project/js/templates
Package templates defines default templates for various JS components.
Package templates defines default templates for various JS components.
project/markdown
Package markdown provides building blocks for Markdown handling.
Package markdown provides building blocks for Markdown handling.
project/meta
Package meta provides project options from source code.
Package meta provides project options from source code.
project/pkgfile
Package pkgfile provides building blocks for Pkgfile.
Package pkgfile provides building blocks for Pkgfile.
project/service
Package service provides building blocks connecting to other services.
Package service provides building blocks connecting to other services.
project/wrap
Package wrap provides helper methods to wrap blocks to suppress (or add) some interfaces.
Package wrap provides helper methods to wrap blocks to suppress (or add) some interfaces.
toposort
Package toposort provides stable toposort implementation.
Package toposort provides stable toposort implementation.
version
Package version contains variables such as project name, tag and sha.
Package version contains variables such as project name, tag and sha.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL