cloudctl is a Go CLI for managing common AWS and GCP resources from one command line:
- Authenticate to AWS or GCP
- List, create, and delete storage buckets
- List, create, delete, and inspect container registries / repositories
- Keep a small local config with your active provider and default GCP project
- AWS support for S3 buckets and ECR repositories
- GCP support for Cloud Storage buckets and Artifact Registry repositories
- Browser-based GCP login flow
- Local config stored at
~/.cloudctl/config.yaml - Provider selection through
--provideror the saved current provider
- Go 1.25 or newer
- Access to the AWS or GCP account you want to manage
- A browser available on the machine if you want to use
cloudctl auth login gcp
From source:
go build -o cloudctl .Then run it directly:
./cloudctl --helpIf you want the command available everywhere, move the binary onto your PATH.
- Log in to a provider.
- Optionally set your default GCP project.
- Run bucket or registry commands.
cloudctl auth login awsYou will be prompted for:
- AWS Access Key ID
- AWS Secret Access Key
- AWS Region
cloudctl auth login gcpThis opens a browser window and completes an OAuth login flow.
cloudctl auth config set-project my-gcp-projectcloudctl auth config showcloudctl auth login [aws|gcp]
cloudctl auth config set-project [project-id]
cloudctl auth config showcloudctl bucket list
cloudctl bucket create [bucket-name]
cloudctl bucket delete [bucket-name]
cloudctl bucket list-objects [bucket-name]Common flags:
--provider aws|gcp--project <gcp-project-id>for GCP bucket commands--region <region-or-location>for provider-specific location handling--forceto empty the bucket before deleting it--yesor-yto skip delete confirmation
Examples:
cloudctl bucket list --provider aws
cloudctl bucket list --provider gcp --project my-gcp-project
cloudctl bucket create my-bucket --provider aws --region us-east-1
cloudctl bucket create my-bucket --provider gcp --project my-gcp-project --region us-central1
cloudctl bucket list-objects my-bucket --provider gcp --project my-gcp-projectcloudctl registry list
cloudctl registry create [repo-name]
cloudctl registry delete [repo-name]
cloudctl registry list-images [repo-name]Common flags:
--provider aws|gcp--project <gcp-project-id>for GCP registry commands--region <region-or-location>--format <artifact-format>for GCP repository creation, defaulting toDOCKER--forceto delete AWS repositories after removing images--yesor-yto skip delete confirmation
Examples:
cloudctl registry list --provider aws
cloudctl registry list --provider gcp --project my-gcp-project
cloudctl registry create my-repo --provider aws --region us-east-1
cloudctl registry create my-repo --provider gcp --project my-gcp-project --region us-central1 --format DOCKER
cloudctl registry list-images my-repo --provider gcp --project my-gcp-project --region us-central1cloudctl stores its config in:
~/.cloudctl/config.yaml
That file tracks:
- The current active provider
- Saved AWS credentials and region
- Saved GCP refresh token
- The default GCP project, if you set one
- If no provider is passed on a command,
cloudctluses the current provider saved by the last successful login. - If you have not set a current provider, pass
--providerexplicitly or runcloudctl auth login. - GCP bucket and registry commands generally need a project ID. You can pass
--projector set a default withcloudctl auth config set-project.
go build ./...See LICENSE for licensing information.