@waiyat/devops v2.0 — Full enterprise DevOps automation platform now available.Install now
Section 1

Getting Started with @waiyat/devops

`@waiyat/devops` is a zero-config CLI and TypeScript library for preflight diagnostics, automated workflow scaffolding, and enterprise reusable CI/CD quality gates.

Quickstart in 30 Seconds

Run preflight checks directly in any repository with no installation:

Terminal
# 1. Run pre-flight diagnostics on your project
npx @waiyat/devops@latest check

# 2. Scaffold a tailored GitHub Actions CI workflow
npx @waiyat/devops@latest init --template nextjs

# 3. Or install as a devDependency in your Node project
npm install --save-dev @waiyat/devops

System Requirements

  • Node.js: v18.0.0 or later (Node 20+ LTS recommended)
  • OS: macOS, Linux (Ubuntu, Debian, Alpine), Windows (WSL2 / PowerShell)
  • Package Managers: npm, pnpm, yarn, bun supported
Section 2

Architecture & Project IR

`@waiyat/devops` processes repositories through a deterministic 4-step pipeline:

1. Detector: Identifies languages (TypeScript, Python, Go), web frameworks (Next.js, FastAPI), and package managers.

2. Project IR: Constructs a normalized Intermediate Representation of dependencies, scripts, and configuration files.

3. Diagnostics Suite: Probes Quality & Runtime, CI/CD, DevSecOps, Docker, Environment, and Observability.

4. Workflow Scaffolding: Injects reusable enterprise quality gates directly into `.github/workflows/ci.yml`.

Section 3

Programmatic TypeScript / Node.js API

You can import and execute `@waiyat/devops` core functions directly inside your Node.js scripts or custom CI tooling:

scripts/audit.ts
import { detectProject, runDiagnostics, runAutoFix, generateSBOM } from "@waiyat/devops";

// 1. Detect project metadata & stack
const project = detectProject(process.cwd());
console.log(`Stack: ${project.languages.join(", ")} | Frameworks: ${project.frameworks.join(", ")}`);

// 2. Run diagnostics & compute health score
const report = runDiagnostics(process.cwd(), project);
console.log(`Preflight Score: ${report.score}/100 [Ready: ${report.overallReady}]`);
console.log(`Summary: ${report.passedCount} passed, ${report.warnCount} warnings, ${report.errorCount} errors`);

// 3. Generate CycloneDX v1.5 SBOM
const sbom = generateSBOM(process.cwd(), project);
console.log(`Indexed ${sbom.components.length} packages in CycloneDX v1.5`);

// 4. Auto-heal repository issues
const fixResult = runAutoFix({ dryRun: true, rootDir: process.cwd() });
console.log(`Actions to apply: ${fixResult.actions.length}`);
Section 4

Reusable Workflows in GitHub Actions

Reference centralized workflows from `Waiyat/devops` in your repository:

.github/workflows/ci.yml
name: CI Quality Gate

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  ci:
    uses: Waiyat/devops/.github/workflows/reusable-ci.yml@main
    with:
      node-version: '22'
      package-manager: 'pnpm'
      run-build: true
      run-test: true
      run-audit: true

  security:
    needs: [ci]
    uses: Waiyat/devops/.github/workflows/reusable-security.yml@main
Section 5

Pre-Flight Diagnostic Checks

Package Manifest

Verifies package.json exists and auto-detects active package manager (npm, pnpm, yarn, bun).

Git Source Control

Checks repository initialization and git version control tracking.

TypeScript Compiler

Validates tsconfig.json configuration for type safety.

Containers & CI

Inspects Dockerfile presence and GitHub Actions CI workflow triggers.

Section 6

FAQ & Troubleshooting

How do I test a generated workflow without creating a commit?

Use the `--dry-run` flag: npx @waiyat/devops@latest init --template nextjs --dry-run to preview the YAML directly in your terminal.

How do I customize the package manager or Node version?

Pass `--pm pnpm` and `--node 22` flags: npx @waiyat/devops@latest init --template node --pm pnpm --node 22.