github-workflows-kt: writing GitHub Actions workflows in Kotlin instead of YAML
Authoring GitHub Actions workflows in Kotlin. You won't go back to YAML!
At a glance
- What is it?
- github-workflows-kt is a Kotlin library and code generator that produces GitHub Actions workflow YAML from a typed script, so a workflow definition is compiled rather than hand-indented. It runs on GitHub Actions through a Kotlin script step, and the repository also ships the tooling that generates action bindings from action metadata.
- Who is it for?
- github-workflows-kt suits a Kotlin shop that already builds and tests in Kotlin and wants its CI definitions to be type-checked, refactorable and shareable, because the same mistakes that YAML lets through, a wrong indentation or a wrong parameter type, become compile errors.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 5 days ago.
- What is it written in?
- Mainly Kotlin, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The complaint the project is answering
The README states the problem plainly. We are often surrounded by YAML configuration. It is a powerful format that provides simple syntax for defining hierarchical data, but it is sometimes used, abused, to configure complicated scenarios, which leads to complicated files that are difficult to write and maintain. Then it asks the questions every team has asked. Who among us has not accidentally used the wrong indentation, missed a possibility to extract a reusable piece of code, or been confused by ambiguous types? The answer it offers is that the power of a generic-purpose programming language would come in handy in these cases. That framing matters for judging the project. github-workflows-kt is not a YAML validator and it is not a linter for existing workflows. It is a replacement authoring format: you write Kotlin, the library produces the YAML file that GitHub Actions reads. The promise in the tagline is that you will not go back to YAML once you have used it, and the topic list on the repository confirms the intent with dsl, type-safe and kotlin-script among the labels.
What type safety buys you in a workflow file
The benefits list is the substance of the argument, and the items are specific rather than promotional. No indentation confusion, because Kotlin's syntax does not rely on it. Immediate validation, catching bugs early during development rather than during runtime. Strongly typed values, so there is no confusion about what type is needed for a given parameter. Superb IDE support, since you author your workflows in any IDE that supports Kotlin with auto-completion and documentation at your fingertips. No duplication, because you can share common configuration using constant values or define your own functions to encapsulate logic. And a fully featured language, meaning you can use the full power of Kotlin to generate workflows dynamically, randomly generate data, or add custom validation, with the note that defining workflow logic in Kotlin is currently experimental. That last caveat is the honest edge of the project. The benefits up to and including duplication are the difference between a workflow that is annoying to write and one that is not. The dynamic generation part is flagged as experimental, and it is also the part with the least obvious payoff, since a workflow that generates itself is harder to read in a pull request than one that is plainly written out.
Action bindings are what make the typing real
The mechanism behind the type safety is a binding layer, and there are two parts to it. The first is type-safe action bindings, which the README says make it possible to use every action using auto-generated Kotlin bindings. The second is an integration with github-actions-typing, which uses typings provided by action authors, so the parameter types come from the action's own metadata rather than from a hand-written guess. That distinction is what separates a genuinely typed workflow API from a Kotlin wrapper with stringly typed parameters, and it is the reason the repository contains a code-generator directory and a maven-binding-builder directory alongside the main library. The top-level entries show the full shape of the project: action-binding-generator, action-updates-checker, code-generator, jit-binding-server, maven-binding-builder, shared-internal and test-utils, plus the github-workflows-kt directory itself, built with Gradle through build.gradle.kts, settings.gradle.kts, a buildSrc directory and the gradle wrapper scripts. This is a build-tooling project with a published library at its centre, not a single Kotlin file with a DSL.
Getting started is a documentation visit, not a command
The README does not contain an install snippet, and it is worth saying so plainly rather than inventing one. The path it points to is its own documentation site, where three links are given: a getting started page, API docs, and a how to contribute guide, all under typesafegithub.github.io/github-workflows-kt. The contributor documentation lives in the repository at CONTRIBUTING.md, and there is a MAINTENANCE.md file at the root as well, alongside the usual build files, a mkdocs.yml for the documentation site, a renovate.json for dependency updates and an .editorconfig. The library is published to Maven, with the usual Kotlin coordinates, and the project is Apache 2.0 licensed. The repository also carries a server status badge and an invitation to a Kotlin Slack channel, which tells you the maintainers expect questions to be asked in public rather than in a tracker. Since the actual first-use steps live in the getting started page rather than in this README, that page is where to look for the concrete invocation, and this description deliberately does not guess at it.
The trade is a build step and a second source of truth
Using this tool means your CI configuration is no longer a file GitHub can read on its own. The workflow YAML becomes a build artefact, generated from Kotlin, and that has consequences worth weighing before you adopt it. You add a Kotlin compilation step to your build, you add a dependency on the library, and your engineers now need the Kotlin toolchain to modify CI. Worse for some teams, the GitHub web interface, which lets you edit a workflow file directly from the browser, can no longer be the editing surface for that workflow, because the source is now a Kotlin file somewhere else in the repository. The gain is symmetric. The same thing that gives you compile-time checking gives you a refactorable, shareable definition, and a project with a dozen workflows that share a common matrix or a common set of steps gets real reuse out of constant values and functions, which is exactly where the YAML version falls apart. So the decision is not about types versus no types. It is about whether your CI configuration is a piece of code that several people maintain, or a small file that one person writes once.
Where this approach does not pay off
Three cases stand out. The first is a repository with a handful of simple workflows and no appetite for maintaining a Kotlin build for CI. The cost of adopting the tool is then higher than the value of the typing, and the YAML would have been finished in an hour. The second is a team that wants GitHub's own workflow editing and its context in pull request checks to remain the natural workflow, because a generated file that GitHub presents for editing invites someone to hand-edit the artefact and have the next build overwrite the change. The third is anything that needs a feature the generator does not cover yet, since a workflow DSL has to model what the platform supports and anything it does not model is either unsupported or worked around. It is also worth noting what the project says about itself in a narrower sense. The list ends with and more, linking to the documentation, and the last item on the benefits list, type-safe action bindings, depends on bindings existing for the actions you actually use, so coverage is a practical constraint rather than an abstract one. The library is at version 4.0.0, a major bump, and the last push to the repository was on 2026-10-19, so the project is active rather than abandoned, but the API is young enough that the 4.x line is where you should be reading the migration notes.
Editorial conclusion
github-workflows-kt suits a Kotlin shop that already builds and tests in Kotlin and wants its CI definitions to be type-checked, refactorable and shareable, because the same mistakes that YAML lets through, a wrong indentation or a wrong parameter type, become compile errors. It is the wrong tool for a repository whose workflows are one-off and nobody maintains, since you would be adding a build step and a dependency to express a job that takes ten lines of YAML, and it is the wrong tool if you need GitHub's own workflow editing in the browser, because the source of truth becomes a Kotlin file that the GitHub UI cannot edit. Verify first that the action bindings you need exist for the actions you use, since the generated bindings are what make the type safety useful, and note that the last push was on 2026-10-19 with the newest release v4.0.0 from 2026-07-03.
Frequently asked questions
What does github-workflows-kt actually do?
It is a tool for generating GitHub Actions workflow YAML files in a type-safe script, so you build robust workflows for your GitHub projects without mistakes, using Kotlin.
What are the main benefits over writing YAML by hand?
The README lists no indentation confusion, immediate validation during development rather than at runtime, strongly typed values for parameters, IDE support with auto-completion, no duplication through shared constants and functions, the full power of Kotlin, and type-safe action bindings using auto-generated Kotlin bindings.
Where do the type information for actions come from?
The action bindings are auto-generated, and the project integrates with github-actions-typing to use typings provided by action authors, so the parameter types come from the actions themselves.
Is generating workflows dynamically supported?
The README says you can use the full power of Kotlin to generate workflows dynamically, randomly generate data, or add custom validation, and notes that defining workflow logic in Kotlin is currently experimental.
Under what licence is github-workflows-kt released?
Apache 2.0, shown in the licence badge in the README and held in the LICENSE file at the repository root.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/typesafegithub-github-workflows-kt)Was this useful?