cipipe

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package cipipe generates CI/CD pipeline configurations tailored to a project's tech stack and cloop task plan. Supports GitHub Actions, GitLab CI, and CircleCI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultOutputPath

func DefaultOutputPath(platform Platform) string

DefaultOutputPath returns the default output file path for a given platform.

func Generate

func Generate(ctx context.Context, p provider.Provider, model string, platform Platform, stack TechStack, plan *pm.Plan) (string, error)

Generate calls the AI provider with the GeneratePrompt and returns the pipeline YAML.

func GeneratePrompt

func GeneratePrompt(platform Platform, stack TechStack, plan *pm.Plan) string

GeneratePrompt builds the AI prompt that asks the provider to produce a CI YAML for the given platform, tech stack, and (optional) task plan.

func Write

func Write(path, content string) error

Write writes content to path, creating parent directories as needed.

Types

type Platform

type Platform string

Platform is the CI platform to generate a pipeline for.

const (
	PlatformGitHub   Platform = "github"
	PlatformGitLab   Platform = "gitlab"
	PlatformCircleCI Platform = "circleci"
)

type TechStack

type TechStack struct {
	// Go project signals
	HasGoMod bool
	GoModule string // module name from go.mod (e.g. "github.com/user/repo")

	// Node/JS project signals
	HasPackageJSON bool
	PackageName    string
	HasNodeModules bool
	HasYarnLock    bool

	// Python project signals
	HasRequirementsTxt bool
	HasPyprojectToml   bool
	HasSetupPy         bool

	// Docker signals
	HasDockerfile    bool
	HasDockerCompose bool

	// Build tool signals
	HasMakefile bool

	// CI signals (existing pipelines detected)
	HasGitHubActions bool
	HasGitLabCI      bool
	HasCircleCI      bool

	// Terraform / IaC
	HasTerraform bool
}

TechStack describes the detected technologies in a project directory.

func Detect

func Detect(dir string) TechStack

Detect scans dir for well-known project files and returns a TechStack.

func (TechStack) Languages

func (s TechStack) Languages() []string

Languages returns a compact summary of detected languages/frameworks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL