🚀 QForge — AI-Powered CI/CD Pipeline Generator from Your CLI
Hardik Soni

Hardik Soni @hs094

About: Chasing Dreams, Not Deadlines ✨

Location:
Pune, Maharashtra, India
Joined:
Nov 1, 2021

🚀 QForge — AI-Powered CI/CD Pipeline Generator from Your CLI

Publish Date: May 11
1 0

This is my submission for the Amazon Q Developer “Quack The Code” Challenge: Crushing the Command Line.

Image description

Hey builders! 👋

I’m excited to introduce QForge — a smart, AI-driven CLI tool that automates the generation of robust, secure, and self-healing CI/CD pipelines using Amazon Q Developer CLI.

No copy-pasting YAMLs. No trial-and-error configs. Just a single command to get it all done.

📦 GitHub Repository

🛠️ Built With: TypeScript, Node.js, Amazon Q Developer CLI


💡 The Idea

Setting up CI/CD pipelines for multi-language projects is painful and error-prone — especially when you need to add coverage gates, security scans, and resilience.

QForge was created to automate this completely, using deep codebase analysis and the power of Amazon Q Developer to generate intelligent, tailored pipelines for GitHub Actions, AWS CodePipeline, GitLab CI, or CircleCI.


🤖 How It Works

Here's how QForge gets you from zero to production-grade pipeline:

  1. 🔍 Project Analysis

    • Analyzes your codebase using custom analyzers for Ruby, Go, Rust, PHP, .NET, and more.
    • Detects languages, frameworks, test tools, build systems, and special characteristics.
  2. 📦 Prompt Generation

    • Constructs a highly tailored prompt using your project’s context and chosen CI/CD platform.
  3. 🤖 Amazon Q CLI Integration

    • Sends the prompt to Amazon Q CLI to generate a pipeline with all requested features:
      • Test coverage
      • Linting
      • Security scanning
      • Self-healing automation
  4. 🛠️ Output

    • Saves a production-ready pipeline YAML (e.g., ci.yml, aws-pipeline.yml) into your project directory.

🚀 Getting Started

1️⃣ Install Dependencies

npm install
npm run build
npm link
Enter fullscreen mode Exit fullscreen mode

Make sure you have:

  • Node.js ≥ 16
  • Amazon Q Developer CLI installed (pip install amazon-q-cli)

2️⃣ Authenticate Amazon Q

q login
Enter fullscreen mode Exit fullscreen mode

🧪 Usage

▶️ Generate Pipeline

qforge generate
Enter fullscreen mode Exit fullscreen mode

By default, this analyzes your current directory and generates a GitHub Actions workflow.

▶️ Customize Options

qforge generate --platform aws --directory ./my-project --output ./ci/aws-pipeline.yml
Enter fullscreen mode Exit fullscreen mode

Available platforms:

  • github
  • aws
  • gitlab
  • circleci

Use --yes to skip confirmation prompts.


📄 Sample Output (GitHub Actions)

name: CI Pipeline

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 18

      - name: Install dependencies
        run: npm install

      - name: Lint
        run: npm run lint

      - name: Run tests with coverage
        run: |
          npm run test -- --coverage
          npm run coverage:check

      - name: Security scan
        run: npm audit --audit-level=critical

      - name: Build project
        run: npm run build
Enter fullscreen mode Exit fullscreen mode

✅ Fully-commented AWS CodePipeline templates are also supported via --platform aws.


🧪 Tests

QForge includes a test suite powered by Jest. Example:

npm run test
Enter fullscreen mode Exit fullscreen mode

Test coverage thresholds are enforced and configurable:

// jest.config.js
coverageThreshold: {
  global: {
    branches: 20,
    functions: 40,
    lines: 25,
    statements: 25
  }
}
Enter fullscreen mode Exit fullscreen mode

You can also test prompts independently:

npm run test:prompt:aws
Enter fullscreen mode Exit fullscreen mode

✨ Why You’ll Love It

QForge:

✅ Saves hours of manual YAML wrangling

🧠 Uses deep project analysis to optimize CI/CD pipelines

🔐 Adds security and test coverage gates automatically

🛠️ Enables self-healing for resilient pipelines

🤝 Works seamlessly with Amazon Q CLI


🔭 What’s Next

Coming soon:

  • 📊 CI Coverage Dashboard
  • 🧩 VS Code integration
  • 🦺 Linter for pipeline configurations
  • 🦾 Auto-fix for failed builds based on logs

🧠 Final Thoughts

QForge is built to remove friction and empower developers to deliver faster and safer. Thanks to Amazon Q Developer CLI, it bridges code understanding with intelligent automation — all from the CLI.

Let your pipelines write themselves! 🔧🧠


Let me know what you think or drop a ⭐️ on the GitHub repo if you find it helpful!

Comments 0 total

    Add comment