Skip to content

FlughafenType-Safe GitHub Actions

Write workflows in TypeScript. Autocomplete, validation, and security checks built in. Works with existing YAML.

Why "Flughafen"?

Fluent GitHub Actions + "fen" (not many words start with "flugha"). German for "airport".

Install

bash
npm install -D flughafen @flughafen/core

Build

TypeScript in, YAML out. More examples

typescript
import { createWorkflow } from '@flughafen/core';

export default createWorkflow()
  .name('CI')
  .on('push', { branches: ['main'] })
  .job('test', (job) =>
    job
      .runsOn('ubuntu-latest')
      .step((step) => step.uses('actions/checkout@v4'))
      .step((step) => step.run('npm test'))
  );
bash
npx flughafen build
# or watch mode
npx flughafen build --watch

Git Workflow

Use watch mode during development, or set up pre-commit hooks to auto-build.


Validate

Security and schema checks. More examples

bash
npx flughafen validate
[ok] ci.ts
  Schema    Structure ✓  Syntax ✓  TypeScript ✓
  Security  Secrets ✓  Permissions ✓  Injection ✓  Vulnerabilities ✓

Git Hooks

Validate before pushing with Husky:

bash
npm install -D husky && npx husky init
echo "npx flughafen validate" > .husky/pre-push

Reverse

YAML in, TypeScript out. More examples

bash
npx flughafen reverse
yaml
# .github/workflows/ci.yml
name: CI
on: push
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm test
typescript
// flughafen/workflows/ci.ts
import { createWorkflow } from "@flughafen/core";

export default createWorkflow()
  .name("CI")
  .on("push")
  .job("test", (job) =>
    job
      .runsOn("ubuntu-latest")
      .step((step) => step.uses("actions/checkout@v4"))
      .step((step) => step.run("npm test"))
  );

Released under the MIT License.