Skip to main content

🚀 pipeline-generator

CI Python 3.9+ License: MIT

Generate production-ready CI/CD pipeline configs from a simple YAML spec.

One spec file → pipeline configs for GitHub Actions, Azure DevOps, and GitLab CI. Stop writing boilerplate YAML manually.

pipe-gen generate --demo

✨ Features

Feature Description
🐙 GitHub Actions Generates .github/workflows/ci.yml with matrix testing, caching, Docker builds
🔷 Azure DevOps Generates azure-pipelines.yml with stages, test publishing, deployment jobs
🦊 GitLab CI Generates .gitlab-ci.yml with parallel matrix, DinD builds, environments
🔍 Auto-Detect Scans your project to detect language, framework, and existing CI configs
📝 Simple Spec Define your pipeline in a human-readable YAML spec file
🎨 Rich Output Beautiful terminal output with previews, syntax highlighting, and summaries
🏗️ 5 Languages Python, Node.js, Go, .NET, Terraform — with smart defaults for each
🔒 Security Built-in security scanning stages (Bandit, Safety, npm audit, gosec, tfsec)
🐳 Docker Docker build & push with metadata extraction and multi-platform support
🚀 Deploy Environment-based deployments with manual approval gates

📦 Installation

pip install pipeline-generator

Or install from source:

git clone https://github.com/SanjaySundarMurthy/pipeline-generator.git
cd pipeline-generator
pip install -e ".[dev]"

🚀 Quick Start

1. Create a spec file

# From a preset
pipe-gen init --preset python --name my-api

# Or auto-detect your project
pipe-gen detect

2. Edit the spec (optional)

# pipeline.yaml
project:
  name: my-api
  language: python
  version: "3.11"
  framework: fastapi

stages:
  - lint
  - test
  - security
  - build
  - deploy

lint:
  tools:
    - ruff

test:
  framework: pytest
  coverage: true
  min_coverage: 80

security:
  tools:
    - bandit
    - safety

build:
  type: docker
  dockerfile: Dockerfile
  registry: ghcr.io

deploy:
  target: kubernetes
  environments:
    - name: staging
      auto_deploy: true
    - name: production
      auto_deploy: false

3. Generate pipeline configs

# Generate for all platforms
pipe-gen generate --platform all

# Generate for a specific platform
pipe-gen generate --platform github

# Preview without writing files
pipe-gen generate --dry-run

# Try the demo (no files needed)
pipe-gen generate --demo

📋 CLI Reference

Command Description
pipe-gen init Create a pipeline.yaml spec file
pipe-gen detect Auto-detect project type
pipe-gen generate Generate CI/CD pipeline configs
pipe-gen --version Show version

pipe-gen init

Options:
  -p, --preset   Language preset (python, node, go, dotnet, terraform)
  -n, --name     Project name
  -o, --output   Output file path (default: pipeline.yaml)

pipe-gen generate

Options:
  -p, --platform   Target platform: all, github, azure, gitlab (default: all)
  -s, --spec       Path to spec file (default: pipeline.yaml)
  --preset         Use a built-in preset instead of spec file
  -o, --output-dir Output directory (default: current dir)
  --dry-run        Preview without writing files
  --demo           Demo mode with sample output

🗣️ Supported Languages

Language Lint Tools Test Framework Security Tools Setup Action
Python ruff, mypy, flake8, black pytest, unittest bandit, safety setup-python@v5
Node.js eslint, prettier jest, vitest, mocha npm audit setup-node@v4
Go golangci-lint, go vet go test gosec, govulncheck setup-go@v5
.NET dotnet format dotnet test dotnet audit setup-dotnet@v4
Terraform terraform fmt, tflint terraform validate tfsec, checkov setup-terraform@v3

🏗️ Generated Pipeline Structure

Each generated pipeline includes (based on your spec):

lint  →  test (matrix)  →  security  →  build (Docker)  →  deploy
                                                          ├── staging (auto)
                                                          └── production (manual)

What's included:

  • Lint: Code style checking, formatting validation
  • Test: Matrix testing across language versions, coverage reports
  • Security: SAST scanning, dependency vulnerability checks
  • Build: Docker build & push with image metadata and tagging
  • Deploy: Environment-based deployments with approval gates

🔧 Advanced Usage

Use a preset without a spec file

pipe-gen generate --preset python --platform github --dry-run

Generate in a different directory

pipe-gen generate --output-dir ./ci-configs

Auto-detect and generate

pipe-gen detect           # See what's detected
pipe-gen init             # Create spec from detection
pipe-gen generate         # Generate configs

🧪 Running Tests

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest -v

# Run with coverage
pytest --cov=pipeline_generator -v

📁 Project Structure

pipeline-generator/
├── pipeline_generator/
│   ├── __init__.py          # Package version
│   ├── cli.py               # Click CLI commands
│   ├── models.py            # PipelineSpec data models
│   ├── presets.py            # Language configs & presets
│   ├── detector.py           # Project auto-detection
│   ├── generator.py          # Generation engine
│   ├── platforms/
│   │   ├── base.py          # Abstract base class
│   │   ├── github.py        # GitHub Actions generator
│   │   ├── azure.py         # Azure DevOps generator
│   │   └── gitlab.py        # GitLab CI generator
│   └── output/
│       └── console.py       # Rich terminal output
├── tests/
│   ├── conftest.py          # Test fixtures
│   └── test_generator.py    # 35+ tests
├── examples/                # Example spec files
├── pyproject.toml
├── README.md
└── CONTRIBUTING.md

🤝 Contributing

Contributions are welcome! See CONTRIBUTING.md for details.

Adding a new language

  1. Add tool config to presets.pyLANGUAGE_TOOLS
  2. Add preset to PRESETS
  3. Add detection in detector.py
  4. Add tests and an example spec

Adding a new platform

  1. Create generator in platforms/
  2. Inherit from BasePlatform
  3. Register in generator.pyPLATFORMS

📄 License

MIT License — see LICENSE for details.

👤 Author

Sanjay S — Senior DevOps Engineer

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cicd_pipeline_generator-1.0.0.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cicd_pipeline_generator-1.0.0-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file cicd_pipeline_generator-1.0.0.tar.gz.

File metadata

  • Download URL: cicd_pipeline_generator-1.0.0.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for cicd_pipeline_generator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6a4bf976a87e55239b8febeb3bc3f4e961c7d21f4a4631133ae1917b24b3e492
MD5 ef2fadf8305f2a179a432b2190cc497c
BLAKE2b-256 8b3594421d9e9ce1695db0bf677fe2400928fae11c39c87c7ed2ff08d11d64d6

See more details on using hashes here.

File details

Details for the file cicd_pipeline_generator-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cicd_pipeline_generator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9282503a67c839f854afc11c50c48b528210e6d2a367c9a37e212f496526d7a
MD5 7f0090835566f2be682b24bebc177772
BLAKE2b-256 3c0645d7162248652be8d9bb02771ade80cb433dca5d7faa21d7ef6bcdeeb61f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page