Skip to main content

An OpenAI-powered assistant for managing Google Cloud Platform resources.

Project description

GCPMate - Google Cloud Platform Assistant

GCPMate is a tool that helps you manage your Google Cloud Platform (GCP) resources. It uses OpenAI's powerful language models to understand what you want to do, and then generates GCP command-line instructions for you to execute. If you like the proposed outcome, GCPMate can also execute the commands for you!

Installation

To use GCPMate, you'll need to have Python 3.x and an OpenAI API key. To install GCPMate, simply run:

pip install gcpmate

In current version program expects to find API key in env variable OPENAI_API_KEY. You can obtain the API key at https://platform.openai.com/account/api-keys. Once ready, you can set up env variable by running:

export OPENAI_API_KEY=<your-api-key>

Usage

GCPMate will use OpenAI's language models to understand your query, and then generate a series of GCP command-line instructions for you to execute. If you like the proposed outcome, GCPMate can also execute the commands for you! To use GCPMate, simply run:

gcpmate "<your query>"

Where <your query> is a description of what you want to achieve in GCP.

To get an explanation for a command, error or even a custom query, you can use the following command:

gcpmate --explain "your query"

Replace "your query" with the text you want to explain. Be sure to use single quotes if your query contains double quotes, and vice versa.

Examples

Here are some example queries you can use with GCPMate:

gcpmate "create a new GCP project called my-superb-new-project"
gcpmate "create ubuntu VM called superbvm in us-central1-a in project <xyz>"

You can also use GCPMate to ask queries, or paste error messages, or ask to explain a command:

gcpmate --explain "Why I cannot connect to my VM over ssh?"
gcpmate -e " gcloud compute instances create newvm --project superproject324 --zone us-central1-a --image-family ubuntu-1804-lts --image-project ubuntu-os-cloud"
# this query will return explanation what that command would do.

Options

GCPMate supports several command-line options:

gcpmate -h  # Show the help message and exit
gcpmate -m <model>  # Specify the OpenAI model to use (default: gpt-3.5-turbo)
gcpmate -s  # Skip printing "Fair warning" and runtime info (gcloud account, project, region, zone, OpenAI model)
gcpmate -e  # Return explanation to given query, which can be command, error message, etc.

Contributing

If you find a bug or have a feature request, please open an issue on the GCPMate GitHub repository: https://github.com/ontaptom/gcpmate

Pull requests are also welcome! If you want to contribute to GCPMate, please fork the repository, create a new branch, and then submit a pull request. Please ensure that your code passes the existing tests and linting rules.

License

This project is licensed under the terms of the Apache License 2.0. See the LICENSE file for more details.

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

gcpmate-1.0.2.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

gcpmate-1.0.2-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file gcpmate-1.0.2.tar.gz.

File metadata

  • Download URL: gcpmate-1.0.2.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for gcpmate-1.0.2.tar.gz
Algorithm Hash digest
SHA256 43651a1a08eee6354443b542a1f0e2b6d8723e6685a9a656d78c4796f1be36d5
MD5 5b27b3f1346a2359ba8a1345f4873546
BLAKE2b-256 35c1dc25a57bf37cb0971fd0013ed0421bb21ae4ddc9d81af056dc97854c7e34

See more details on using hashes here.

File details

Details for the file gcpmate-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: gcpmate-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for gcpmate-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cbb3051fc0112278b0ee8b0b221a33a17ae8170e17731032891ea6111d4675b6
MD5 015155f8efaa5d19cb23f9977e3f875e
BLAKE2b-256 e0f4f7e2d2a627dcc8718cf3ffeb867e2f138d1b5d0345fe34e6b946a26c4ba5

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