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.py → LANGUAGE_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.py → PLATFORMS

📄 License

MIT License — see LICENSE for details.

👤 Author

Sanjay S — Senior DevOps Engineer

Metadata

Release files for cicd-pipeline-generator 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cicd-pipeline-generator 1.0.0
File Size Uploaded Provenance
cicd_pipeline_generator-1.0.0.tar.gz 25.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cicd-pipeline-generator 1.0.0
File Interpreter ABI Platform
cicd_pipeline_generator-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 52.4 kB

Release files / cicd_pipeline_generator-1.0.0.tar.gz

Download URL cicd_pipeline_generator-1.0.0.tar.gz
Size 25.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6a4bf976a87e55239b8febeb3bc3f4e961c7d21f4a4631133ae1917b24b3e492
BLAKE2b-256 checksum
How to use checksums
8b3594421d9e9ce1695db0bf677fe2400928fae11c39c87c7ed2ff08d11d64d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / cicd_pipeline_generator-1.0.0-py3-none-any.whl

Download URL cicd_pipeline_generator-1.0.0-py3-none-any.whl
Size 27.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9282503a67c839f854afc11c50c48b528210e6d2a367c9a37e212f496526d7a
BLAKE2b-256 checksum
How to use checksums
3c0645d7162248652be8d9bb02771ade80cb433dca5d7faa21d7ef6bcdeeb61f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for cicd-pipeline-generator 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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