Skip to main content

Your AI Powered Kubernetes Assistant from Thiago Alves with fix text-davinci-003

Project description

KoPylot: Your AI-Powered Kubernetes Assistant ๐Ÿค–

Release Build status codecov Commit activity License

KoPylot is an open-source AI-powered Kubernetes assistant. Its goal is to help developers and DevOps engineers to easily manage and monitor their Kubernetes clusters.

You can read more about the project in the blog post.

๐Ÿ’ซ Features:

  • ๐Ÿ” Audit: Audit a resource, such as pods, deployments, or services using an LLM model. Audit

  • ๐Ÿฉบ Diagnose: Diagnose resources, such as pods, deployments, or services using an LLM model. Diagnose

  • ๐Ÿ’ฌ Chat: Start a chat with KoPylot to generate kubectl commands based on your prompts. Chat

  • โ˜ธ๏ธ Ctl: A wrapper around kubectl. The arguments passed to the ctl subcommand are interpreted by kubectl. Ctl

๐Ÿš€ Quick Start:

  1. Requests an API key from OpenAI.
  2. Export the key using the following command:
export KOPYLOT_AUTH_TOKEN=your_api_key

NOTE: If you want to avoid having the key in your .bashrc, .oh-my-zsh/custom dir, or your .bash_history or .zsh_history, a possible trick is to do something like this:

export KOPYLOT_AUTH_TOKEN=$(cat ../../../keys/openai)
  1. Install KoPylot using pip:
pip install kopylot
  1. Run KoPylot:
kopylot --help

๐Ÿ“– Usage:

Usage: kopylot [OPTIONS] COMMAND [ARGS]...                                           
                                                                                      
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --version                                                                          โ”‚
โ”‚ --install-completion        [bash|zsh|fish|powershell  Install completion for the  โ”‚
โ”‚                             |pwsh]                     specified shell.            โ”‚
โ”‚                                                        [default: None]             โ”‚
โ”‚ --show-completion           [bash|zsh|fish|powershell  Show completion for the     โ”‚
โ”‚                             |pwsh]                     specified shell, to copy it โ”‚
โ”‚                                                        or customize the            โ”‚
โ”‚                                                        installation.               โ”‚
โ”‚                                                        [default: None]             โ”‚
โ”‚ --help                                                 Show this message and exit. โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Commands โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ audit     Audit a pod, deployment, or service using an LLM model.                  โ”‚
โ”‚ chat      Start a chat with kopylot to generate kubectl commands based your        โ”‚
โ”‚           inputs.                                                                  โ”‚
โ”‚ ctl       A wrapper around kubectl. The arguments passed to the ctl subcommand are โ”‚
โ”‚           interpreted by kubectl.                                                  โ”‚
โ”‚ diagnose  Diagnose a resource e.g. pod, deployment, or service using an LLM model. โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

๐Ÿค Contributions:

KoPylot is an open-source project and we welcome contributions from the community. There are a couple of ways to set up your development environment and start contributing to the project.

๐Ÿณ Using a Dev Container

KoPylot supports development using a dev container, which helps you set up a consistent and isolated environment for development. This makes it easy to get started without having to worry about conflicting dependencies or configurations on your local machine.

To get started with a dev container:

  1. Install Docker and Visual Studio Code.
  2. Install the Remote - Containers extension in Visual Studio Code.
  3. Clone the KoPylot repository and open the project folder in Visual Studio Code.
  4. Press F1, type Remote-Containers: Reopen in Container, and hit Enter. Visual Studio Code will build the dev container and reopen the project inside it.

You're now ready to start contributing to KoPylot using the dev container!

๐Ÿ› ๏ธ Local Setup

If you prefer to set up your development environment locally, make sure you have Poetry installed on your system. Then, follow these steps:

  1. Clone the KoPylot repository:

    git clone https://github.com/avsthiago/kopylot
    
  2. Navigate to the project folder:

    cd kopylot
    
  3. Install the project dependencies using Poetry:

    make install
    

You're now ready to start contributing to KoPylot using your local setup! ๐Ÿ˜„

Before submitting a pull request, please make sure to test your changes and follow the project's coding guidelines. We appreciate your contributions and look forward to collaborating with you! ๐ŸŽ‰

๐Ÿ“„ License:

KoPylot is licensed under the MIT License. See LICENSE for more information.

โ˜Ž๏ธ Contact:

If you have any questions or suggestions, feel free to contact me on https://thiagoalves.ai.

Thank you for using KoPylot! ๐Ÿ™Œ

๐Ÿ—บ๏ธ Roadmap:

  • Wrap the kubectl command using ctl subcommand.
  • Create the audit subcommand to audit kubernetes resources.
  • Create the diagnose subcommand to diagnose kubernetes resources.
  • Create the chat subcommand to generate kubectl commands using from the user prompts.
  • Make it possible to use other LLM models, not just from OpenAI.
  • Integrate LangChain into KoPylot to make it as autonomous as possible.

~ Similar Projects:

One of the similar projects that I found is the Kopilot from knight42. It is also a Kubernetes assistant which uses LLMs behind the scenes. The main difference from KoPylot is that it is written in Go. At the moment, it doesn't have the Chat command implemented, but it can respond in different languages.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kopylot_gpt-0.0.1.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kopylot_gpt-0.0.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file kopylot_gpt-0.0.1.tar.gz.

File metadata

  • Download URL: kopylot_gpt-0.0.1.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/22.6.0

File hashes

Hashes for kopylot_gpt-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e15a515879129f39132f44c5d675be6de4549f4b39aa9b5e69193e271fb2a6c5
MD5 3c78ba85a93560dae2456e0706a24873
BLAKE2b-256 808e1c93d8d8678bf85b3694915fc268d82a0a579b9bc78a3128c229193c61bb

See more details on using hashes here.

File details

Details for the file kopylot_gpt-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: kopylot_gpt-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/22.6.0

File hashes

Hashes for kopylot_gpt-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ae154f61742de56ffeee92ba34770dfffc95c99ad60ac1be0ca3cb822c4edfc
MD5 576632c97ebd8ece55ca980d47f628ee
BLAKE2b-256 96daef55bcdb3f6c6d435ae39351b1a922c4203bd4da2125a6f8b241d468ff1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page