Skip to content

Architecture ​

Keel is a single Go binary. It uses OpenTofu for infrastructure changes and the AWS SDK for runtime operations.

                         keel.yml
                            |
              +-------------+-------------+
              |                           |
       Infrastructure                 Runtime operations
       HCL → OpenTofu                 AWS SDK (direct)
              |                           |
        S3 state + lock           ECS, CloudWatch, SSM, ...

Two planes ​

Infrastructure provisioning (keel up, keel infra plan/apply) runs through OpenTofu. Keel generates HCL from your config and invokes tofu with an S3 backend and DynamoDB locking. State is keyed by environment (<app>/<env>/terraform.tfstate), and credentials are passed through environment variables instead of written to disk.

Runtime operations (keel deploy, keel logs, keel exec, keel scale) use the AWS SDK directly. For example, a deploy builds an image, registers a task definition, and updates a service without planning the VPC again.

An optional in-account control plane, for shared cached reads and brokered operations, is coming soon.

The app registry ​

A DynamoDB table tracks every Keel app and environment in the account. Team members can use keel apps to discover deployments regardless of which machine ran keel up.

Internal layout ​

For contributors, the codebase splits along the same lines:

PackageResponsibility
internal/cliCobra commands — thin glue that delegates to domain packages
internal/configkeel.yml parsing, validation, defaults, environment merging
internal/authAccess levels, credential caching, IAM bootstrap, team management
internal/awsAWS SDK v2 wrappers (ECS, ECR, CloudWatch, SSM, STS)
internal/infraOpenTofu orchestration and HCL generation
internal/deployDocker/CodeBuild builds, ECS deploys, release commands, rollback
internal/projectWorkspace detection and the DynamoDB app registry
internal/tuiThe Bubbletea dashboard
internal/utilLogging, error types, terminal detection

Access control ​

Every privileged command declares the access level it requires (viewer, developer, or admin) and checks it before doing anything. The dashboard disables actions your level does not allow and says why. See The Auth Model.

Keel — the missing platform layer for AWS.