Build
Write workflows in TypeScript with a fluent API. Compiles to YAML with full autocomplete and type checking.
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".
npm install -D flughafen @flughafen/coreTypeScript in, YAML out. More examples
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'))
);npx flughafen build
# or watch mode
npx flughafen build --watchGit Workflow
Use watch mode during development, or set up pre-commit hooks to auto-build.
Security and schema checks. More examples
npx flughafen validate[ok] ci.ts
Schema Structure ✓ Syntax ✓ TypeScript ✓
Security Secrets ✓ Permissions ✓ Injection ✓ Vulnerabilities ✓Validate before pushing with Husky:
npm install -D husky && npx husky init
echo "npx flughafen validate" > .husky/pre-pushYAML in, TypeScript out. More examples
npx flughafen reverse# .github/workflows/ci.yml
name: CI
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm test// 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"))
);