InfraGPT
A CLI tool that converts natural language requests into Google Cloud (gcloud) commands.
Installation
Using pip
Using pip to install packages system-wide is not recommended. Instead, install InfraGPT using pipx in the next section.
Using pipx
# Install pipx if you don't have it
pip install --user pipx
pipx ensurepath
# Install infragpt
pipx install infragpt
From Source
-
Clone the repository:
git clone https://github.com/priyanshujain/infragpt.git cd infragpt -
Install in development mode:
pip install -e .
Usage
API Keys
InfraGPT requires API keys to work:
- For OpenAI GPT-4o: Set the
OPENAI_API_KEYenvironment variable - For Anthropic Claude: Set the
ANTHROPIC_API_KEYenvironment variable
You can set these in your shell:
export OPENAI_API_KEY="your-openai-api-key"
export ANTHROPIC_API_KEY="your-anthropic-api-key"
Command Line
Run InfraGPT directly with a prompt:
infragpt "create a new VM instance called test-vm in us-central1 with 2 CPUs"
Or specify the model to use:
infragpt --model claude "list all my compute instances in europe-west1"
Interactive Mode
Launch InfraGPT in interactive mode (no initial prompt):
infragpt
Example Commands
- "Create a new GKE cluster with 3 nodes in us-central1"
- "List all storage buckets"
- "Create a Cloud SQL MySQL instance named 'mydb' in us-west1"
- "Set up a load balancer for my instance group 'web-servers'"
Options
--model,-m: Choose the LLM model (gpt4o or claude)--verbose,-v: Enable verbose output
Contributing
For information on how to contribute to InfraGPT, including development setup, release process, and CI/CD configuration, please see the CONTRIBUTING.md file.
Metadata
Release files for infragpt 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| infragpt-0.1.1.tar.gz | 16.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| infragpt-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.9 kB
Release files / infragpt-0.1.1.tar.gz
| Download URL | infragpt-0.1.1.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2ed5c4ee987423df07b8b08e8cb2727c76df966e254063b9ea9eb178608e366
|
|
BLAKE2b-256 checksum How to use checksums |
d430c5ab27858e2ca2f44720fbf6e10415bd615115c711a5a67ddf6a4bde8f17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Release files / infragpt-0.1.1-py3-none-any.whl
| Download URL | infragpt-0.1.1-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50ea7f825bb3dde466be7edcb5f4a238b76976de754f29648667326f8031b228
|
|
BLAKE2b-256 checksum How to use checksums |
ed0b49255faf13891788695b74f0c9a9b61bf7245008b0fdea603a48fdba9d34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|