
Leeway is a heavily caching build system for Go, Typescript and Docker projects.
Repo gitpod-io/leeway, read from GitHub 1 d ago. gitpod-io has not joined Take My Repo.
gitpod-io/leeway is a public repo on GitHub by gitpod-io. Leeway is a heavily caching build system for Go, Typescript and Docker projects. It declares the MIT license on GitHub. It is written mainly in Go, has 182 stars and last changed on 2026-11-14. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.

Leeway is a heavily caching build system for Go, Yarn and Docker projects. Its features are:
Leeway structures a repository in three levels:
WORKSPACE.yaml file.BUILD.yaml file is a component. Components are identifed by their path relative to the workspace root.Leeway assumes its running on Linux or macOS. It is very very unlikely that this runs on Windows out-of-the-box. To install, just download and unpack a release.
Place a file named WORKSPACE.yaml in the root of your workspace. For convenience sake you should set the LEEWAY_WORKSPACE_ROOT env var to the path of that workspace.
For example:
touch WORKSPACE.yaml
export LEEWAY_WORKSPACE_ROOT=$PWD
The WORKSPACE.yaml may contain some default settings for the workspace:
# defaultTarget is package we build when just running `leeway build`
defaultTarget: some/package:name
#defaultArgs are key=value pairs setting default values for build arguments
defaultArgs:
key: value
Users can override, and provide additional default arguments using a WORKSPACE.args.yaml file in the workspace root. This is useful for providing local overrides which you might not want to commit to Git.
The WORKSPACE.args.yaml takes key value pairs which become available as build arguments. The values herein take precedence over the default arguments in the WORKSPACE.yaml.
foo: bar
key: value
Place a BUILD.yaml in a folder somewhere in the workspace to make that folder a component. A BUILD.yaml primarily contains the packages of that components, but can also contain constant values (think of them as metadata). For example:
# const defines component-wide constants which can be used much like build arguments. Only string keys and values are supported.
const:
internalName: example
someRandomProperty: value
packages:
- ...
scripts:
- ...
Scripts are a great way to automate tasks during development time (think yarn scripts).
Unlike packages they do not run in isolation by default, but have access to the original workspace.
What makes scripts special is that they can dependent on packages which become available to a script in the PATH and as environment variables.
Under the scripts key in the component's BUILD.yaml add:
# name is the component-wide unique name of script. Packages and scripts do NOT share a namespace.
# You can have a package called foo and a script called foo within the same component.
name: some-script-name
# description provides a short synopsis of the script. Shown when running `leeway collect scripts`.
description: A sentence describing what the script is good for.
# Deps list dependencies to packages (NOT scripts) which must be built prior to running this script.
# All built dependencies get added to the PATH environment variable. This is handy if your workspace
# contains tools you want to use in a script.
deps:
- some/other:package
# Env sets environment variables which are present during script execution.
env:
- MESSAGE=hello
# Workdir changes the workdir location/layout of working dir of the script. The following choices are available:
# - origin (default): execute the script in the directory of the containing component in the original workspace.
# This is the default mode and handy if one wants to automate tasks in the development workspace.
# - packages: produces a filesystem layout much like during a generic package build where all deps are
# found by their name in a temporary directory. This provides some isolation from the original
# workspace, while giving full access to the built dependencies.
workdir: origin
# The actual script. For now, only bash scripts are supported. The shebang is added automatically.
script: |
echo $MESSAGE, this is where the script goes
if [ "A$(ps -o comm= -p $$)" = "Abash" ]; then
echo "it's the bash alright"
fi
echo "build args work to: ${myBuildArg}"
A package is an entry in a BUILD.yaml in the packages section. All packages share the following fields:
# name is the component-wide unique name of this package
name: must-not-contain-spaces
# Package type must be one of: go, yarn, docker, generic
type: generic
# Sources list all sources of this package. Entries can be double-star globs and are relative to the component root.
# Avoid listing sources outside the component folder.
srcs:
- "**/*.yaml"
- "glob/**/path"
# Deps list dependencies to other packages which must be built prior to building this package. How these dependencies are made
# available during build depends on the package type.
deps:
- some/other:package
# Argdeps makes build arguments version relevant. I.e. if the value of a build arg listed here changes, so does the package version.
argdeps:
- someBuildArg
# Env is a list of key=value pair environment variables available during package build
env:
- CGO_ENABLED=0
# Config configures the package build depending on the package type. See below for details
config:
...
config:
# Packaging method. See https://godoc.org/github.com/gitpod-io/leeway/pkg/leeway#GoPackaging for details. Defaults to library.
packaging: library
# If true leeway runs `go generate -v ./...` prior to testing/building. Defaults to false.
generate: false
# If true disables `go test -v ./...`
dontTest: false
# If true disables the enforcement of `go fmt`. By default, if the code is not gofmt'ed the build fails.
dontCheckGoFmt: false
# If true disables the linting stage.
dontLint: false
# Overrides the `go build .` command. Supersedes buildFlags.
buildCommand: []
# [DEPRECATED: use buildCommand instead] A list of flags passed to `go build`. Useful for passing `ldflags`.
buildFlags: []
# Command that's executed to lint the code
lintCommand: ["golangci-lint", "run"]
# GoMod can point to a go.mod file outside the component root. Leeway expects a go.sum alongside the go.mod.
goMod: "../go.mod"
config:
# yarnlock is the path to the yarn.lock used to build this package. Defaults to `yarn.lock`. Useful when building packages in a Yarn workspace setup.
# Automatically added to the package sources.
yarnlock: "yarn.lock"
# tsconfig is the path to the tsconfig.json used to build this package. Detauls to `tsconfig.json`
# Automatically added to the package sources.
tsconfig: "tsconfig.json"
# packaging method. See https://godoc.org/github.com/gitpod/leeway/pkg/leeway#YarnPackaging for details.
# Defaults to library
packaging: library
# If true disables `yarn test`
dontTest: false
# commands overrides the default commands executed during build
commands:
install: ["yarn", "install"]
build: ["yarn", "build"]
test: ["yarn", "test"]
Security note: Leeway uses
--frozen-lockfileby default to ensure reproducible builds and prevent dependency confusion attacks. As per OWASP recommendations, consider addingignore-scripts=trueto your.npmrcto further minimize the attack surface from malicious postinstall scripts.
config:
# Dockerfile is the name of the Dockerfile to build. Automatically added to the package sources.
dockerfile: "Dockerfile"
# exportToCache controls whether images are pushed directly or exported to cache
# - false (default): push directly to registry (legacy behavior)
# - true: export to cache for signing (enables SLSA L3 compliance)
# Can be overridden via --docker-export-to-cache flag or LEEWAY_DOCKER_EXPORT_TO_CACHE env var
exportToCache: false
# Metadata produces a metadata.yaml file in the resulting package tarball.
metadata:
foo: bar
# build args are Docker build arguments. Often we just pass leeway build arguments along here.
buildArgs:
- arg=value
- other=${someBuildArg}
# image lists the Docker tags leeway will use and push to
image:
- gitpod/leeway:latest
- gitpod/leeway:${__pkg_version}
The first image name of each Docker dependency which pushed an image will result in a build argument. This mechanism enables a package to build the base image for another one, by using the build argument as FROM value.
The name of this build argument is the package name of the dependency, transformed as follows:
/ is replaced with _: is replaced with __E.g. component/nested:docker becomes COMPONENT_NESTED__DOCKER.
For SLSA Level 3 compliance: Set exportToCache: true to enable cache-based Docker image distribution with cryptographic signing. This can be overridden globally using:
leeway build --docker-export-to-cacheLEEWAY_DOCKER_EXPORT_TO_CACHE=trueRequirements for OCI export (exportToCache: true):
docker-container driver (the default docker driver does not support OCI export)docker buildx create --name leeway-builder --driver docker-container --bootstrap && docker buildx use leeway-builderdocker/setup-buildx-action which automatically creates a docker-container builder by defaultSee leeway build --help for more details.
config:
# A list of commands to execute. Beware that the commands are not executed in a shell. If you need shell features (e.g. wildcards or pipes),
# wrap your command in `sh -c`. Generic packages without commands result in an empty tar file.
commands:
- ["echo", "hello world"]
- ["sh", "-c", "ls *"]
Packages can be dynamically produced within a component using a dynamic package script named BUILD.js. This ECMAScript 5.1 file is executed using Goja and produces a packages array which contains the package struct much like they'd exist within the BUILD.yaml. For example:
Leeway interacts with the script using global variables, specifically:
args [input] a JavaScript object containing the build arguments which have explicitely been passed to leeway.packages [output] where the script produces an array of package structures akin to those found in a BUILD.yaml file.|
|
Equivalent
|
Note that for a
BUILD.jsto become effective/be recodnized there needs to a (possibly empty)BUILD.yamlin the same directory.
In a package definition one can use build arguments. Build args have the form of ${argumentName} and are string-replaced when the package is loaded.
It's advisable to use build args only within the config section of packages. Constants and built-in build args do not even work outside of the config section.
Leeway supports built-in build arguments:
__pkg_version resolves to the leeway version hash of a component.__git_commit contains the current Git commit if the build is executed from within a Git working copy. If this variable is used and the build is not executed from within a Git working copy the variable resolution will fail. If the package sources contain uncommitted files/directories, then __pkg_version will be appended to __git_commit__git_commit_short shortened version of __git_commit to the first 7 characters.gitpod-io/leeway is a public repo on GitHub by gitpod-io. Leeway is a heavily caching build system for Go, Typescript and Docker projects.
It declares the MIT license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-11-14. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Take My Repo cannot say: it does not audit code and has not run leeway. What is known comes from GitHub. It declares the MIT license on GitHub. Its last change was on 2026-11-14. It has 182 stars, which measure popularity, not safety. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read the source before you run it. With "Take it", your AI agent shows each step and asks you before running it; README text is treated as data, not as instructions.