Automate Entire Devops Pipeline with AI

GitHub Repository Link

Intoduction

Hey everyone! Today, I’m excited to show you a project that brings DevOps automation to the next level: Agent Bootstrapper – Repo Scanner.

Imagine you could clone any GitHub repository, have an AI analyze its tech stack, and instantly generate all the Docker, CI/CD, and Kubernetes files you need—customized for that project. That’s exactly what we’ve built!

What Does it Do?

So, what is Agent Bootstrapper?
It’s a full-stack app powered by FastAPI, Google Gemini, and a modern frontend.
Here’s what it does:

  • Clones a repo from GitHub.
  • Scans and detects its languages, frameworks, dependencies, and entrypoints.
  • Uses generative AI to create tailored Dockerfiles, CI/CD pipelines, and Kubernetes manifests.
  • Lets you review and execute these files—all from a simple UI.

How it Works?

Scan a Repository - Enter a GitHub URL and branch. - Click “Scan.” - The app clones the repo and analyzes its structure.

Generate a Plan - Review the scan summary. - Click “Generate Plan.” - Gemini AI creates a step-by-step execution plan, with real file content for Docker, CI/CD, and Kubernetes.

The plan isn’t generic—it’s tailored to the actual codebase.

You’ll see the Dockerfile, docker-compose, CI workflow, and Kubernetes manifests, all customized for this project.

Execute and Review

  • Click “Execute Plan.”
  • The backend writes out all the files.
  • The UI displays each generated file—so you can inspect, download, or use them directly.

This means you can go from code to cloud-ready infrastructure in minutes, with zero manual YAML or Dockerfile writing.

Tech Stack and Architecture

Let’s talk tech for a second.

  • Backend: FastAPI, GitPython, Google Gemini AI.
  • Frontend: Next.js (or FastAPI UI), with interactive forms and code previews.
  • AI: Gemini analyzes the repo and generates all config files.
  • DevOps: Output includes Dockerfiles, CI/CD workflows, and Kubernetes manifests—ready to deploy.

Why is this useful?

  • Speeds up onboarding for new projects.
  • Reduces DevOps bottlenecks.
  • Ensures best practices by generating configs based on actual code.
  • Great for teams, hackathons, or anyone who wants to automate infrastructure setup.

Code Deep Dive

Alright, let’s jump into the code and see how Agent Bootstrapper works under the hood. We’ll focus on the service backend and the modern frontend built with Next.js.

1. Backend:

The service/main.py file

  • FastAPI App Setup:
    The backend is powered by FastAPI. In main.py, we define endpoints for /scan/plan, and /execute.

    • /scan clones the repo and analyzes its structure.
    • /plan sends the scan summary to Gemini AI, which generates a tailored execution plan.
    • /execute takes the plan and writes out the actual Docker, CI/CD, and Kubernetes files.
  • Gemini Integration:
    In planner.py, we use Google’s Gemini API. The prompt is dynamically built from the scan summary, so the AI generates configs specific to the repo’s tech stack.

  • File Generation:
    The executor functions in executor.py take the AI-generated content and write it directly to disk—no hardcoded templates.
    For example, the Dockerfile, docker-compose, and Kubernetes manifests are all created from the AI’s output.

 2. Frontend:

The frontend Folder

The frontend is built with Next.js and React 19. - The main entry is page.tsx, which lets users input a repo URL and branch. - After scanning, the app stores results in localStorage and navigates to the plan page.

  • Plan & Results Pages:
    • page.tsx displays the scan summary and lets users trigger the AI-powered plan generation.
    • page.tsx shows the execution plan steps, with details for each tool.
  • Execution Page:
    • page.tsx loads the execution results from localStorage and displays the generated files.
    • Each file—Dockerfile, CI/CD workflow, Kubernetes manifest—is rendered in a code block for easy review and copy-paste.
  • Styling & Layout:
    • The app uses Tailwind CSS for a clean, responsive UI.
    • The layout is defined in [layout.tsx, with a simple navbar and footer.

How Data Flows?

Here’s how the data flows:

  • User scans a repo → backend analyzes and returns a summary.
  • User generates a plan → backend calls Gemini, gets a JSON plan with file contents.
  • User executes the plan → backend writes files, frontend displays them interactively.

This architecture means you can plug in any repo and instantly get production-ready DevOps configs, all powered by AI and modern web tech.

Outro

Thank you for reading.