JSPM

  • Created
  • Published
  • Downloads 62
  • Score
    100M100P100Q74426F
  • License MIT

Command-line interface for Flughafen GitHub Actions workflow builder

Package Exports

  • flughafen

Readme

flughafen

CLI for type-safe GitHub Actions workflows.

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

Install

npm install -D flughafen @flughafen/core

Build

TypeScript in, YAML out.

// flughafen/workflows/ci.ts
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
# → .github/workflows/ci.yml

# Watch mode
npx flughafen build --watch

Validate

Security and schema checks.

npx flughafen validate
[ok] ci.ts
  Schema    Structure ✓  Syntax ✓  TypeScript ✓
  Security  Secrets ✓  Permissions ✓  Injection ✓  Vulnerabilities ✓
# Skip security checks
npx flughafen validate --ignore security

# Skip schema validation
npx flughafen validate --ignore schema

# JSON output
npx flughafen validate --format json

Reverse

YAML in, TypeScript out.

# .github/workflows/ci.yml
name: CI
on: push
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm test
npx flughafen reverse
# → flughafen/workflows/ci.ts
// 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'))
  );

Documentation

License

MIT