cigpt

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: MIT Imports: 1 Imported by: 0

README


Logo

cigpt

cigpt is an open-source utility developed in Go that retrieves error logs from CI pipelines and uses ChatGPT to perform an initial analysis and provide troubleshooting hints. The goal of this project is to assist all users in comprehending the errors in CI pipelines, which can be extremely complicated to read and understand.

This project is a fork of k8sgpt and relies on a portion of its code base.

Installation

Pre-compiled executables

Get them here

Verify installation

  • Run cigpt version

Quick Start

  • Currently the default AI provider is OpenAI, you will need to generate an API key from OpenAI
  • Run cigpt auth to set it in cigpt.
  • Run cigpt analyze --project-id $GITLAB_PROJECT_ID --pipeline-id $GITLAB_PIPELINE_ID to run a scan.

https://user-images.githubusercontent.com/99146727/228486925-9bf16909-e4e1-44e8-952f-413aa52533a8.mov

Tools Supported

  • gitlab

Usage

CI jobs debugging powered by AI

Usage:
  cigpt [command]

Available Commands:
  analyze     This command will analyze the error logs of a GitlabCI pipeline.
  auth        Authenticate with your chosen backend
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  version     Print the version number of cigpt

Flags:
      --config string   config file (default is $HOME/.cigpt.yaml)
  -h, --help            help for cigpt
  -t, --toggle          Help message for toggle

Use "cigpt [command] --help" for more information about a command.

Run a scan with the gitlab analyzers

cigpt auth
cigpt analyze --project-id $GITLAB_PROJECT_ID --pipeline-id $GITLAB_PIPELINE_ID

Upcoming major milestones

  • Multiple AI backend support
  • Multiple CI support ( github, jenkins, etc.. )

Configuration

cigpt stores config data in ~/.cigpt.yaml the data is stored in plain text, including your OpenAI key and CI token.

Contributing

Coming soon..

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
pkg
ai

Jump to

Keyboard shortcuts

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