Development Setup

Build, test, and lint CloudOpt from source.

Clone and build

git clone https://github.com/kernul-io/cloudopt.git
cd cloudopt

go mod tidy
make build          # produces ./main

Test and lint

make test
make lint

Integration tests

AWS sandbox tests are opt-in:

COA_AWS_INTEGRATION=1 go test -tags=integration ./internal/adapters/aws-inventory/...

GCP sandbox tests are opt-in:

COA_GCP_INTEGRATION=1 COA_GCP_PROJECTS=my-project go test -tags=integration ./internal/adapters/gcp-inventory/...

Offline loop

./main init --workspace-dir "$HOME/.cloudopt-dev"
./main import-fixture --workspace-dir "$HOME/.cloudopt-dev" testdata/fixtures/sample.yaml
./main analyze --workspace-dir "$HOME/.cloudopt-dev"
./main report --workspace-dir "$HOME/.cloudopt-dev" --format html

Multi-cloud engagement fixture:

./main import-fixture --workspace-dir "$HOME/.cloudopt-dev" testdata/fixtures/multicloud-engagement.yaml
./main analyze --workspace-dir "$HOME/.cloudopt-dev"
./main capabilities matrix --providers aws,gcp

Recorded API fixtures also live under testdata/. Pass --offline on collect subcommands.

Requirements

  • Go 1.25+
  • make, golangci-lint (via make lint)