Klotho - write AWS applications at lightning speed
See the code
Klotho is an open source tool that transforms plain code into cloud native code.
Klotho allows you to quickly and reliably add cloud functionality to your application with minimal modification to your code. In most cases, this is just a handful of klotho annotations.
It adds 3 main in-code cloud capabilities:
expose web APIs to the Internetpersist multi-modal data into different types of databasesstatic_unit package static assets and upload into a CDN for distributionKlotho is designed to absorb the complexity of building cloud applications, enabling everyone in large-scale organizations and teams to hobbyist developers to write and operate cloud applications at a fraction of the effort.
Its design principles are an outcome of industry collaborations focused on mid-sized companies and fast growing startups.
Klotho builds on a new architecture called Adaptive Architecutes.

It's a superset of monoliths, microservices and serverless architectures, combining their benefits like a stellar developer experience, immediate productivity, scalability and autonomy of development and deployment as well as a spectrum of NoOps to FullOps. It also introduces a host of new capabilities that have been out of reach do to their implementation complexity.
Klotho is part of a new generation of cloud tools that implements Infrastructure-from-Code (IfC), a process to automatically create, configure and manage cloud resources from the existing software application's source code without having describe it explicitly.
By annotating the clients, SDKs or language constructs used in the code with Klotho capabilities, they are automatically created, updated and wired into the application.
Exposing a Python FastAPI to the internet with the Klotho klotho::expose capability. View for NodeJS, Go
Persisting Redis and TypeORM instances in NodeJS with the the Klotho klotho::persist capability. View for Python, Go (soon)
Klotho ensures that developers/operators are able to select and adapt the underlying technologies even after their initial setup.
To install the latest Klotho release, run the following (see full installation instructions for additional installation options):
Mac:
brew install klothoplatform/tap/klotho
Linux/WSL2:
curl -fsSL "https://github.com/klothoplatform/klotho/releases/latest/download/klotho_linux_amd64" -o klotho
chmod +x klotho
Get syntax highlighting and snippets for Klotho annotations in your favorite IDE.
The quickest way to get started is with the getting started tutorial for Javascript/Typescript, Python and Go (soon).
Clone our sample apps git repo and install the npm packages for the js-my-first-app app:
git clone https://github.com/KlothoPlatform/sample-apps.git
cd sample-apps/js-my-first-app
npm install
First log in to Klotho. This shares telemetry data for compiler improvements:
klotho --login <email>
Now compile the application for AWS by running klotho and passing --provider aws as an argument on the command line.
klotho . --app my-first-app --provider aws
Will result in:
██╗ ██╗██╗ ██████╗ ████████╗██╗ ██╗ ██████╗
██║ ██╔╝██║ ██╔═══██╗╚══██╔══╝██║ ██║██╔═══██╗
█████╔╝ ██║ ██║ ██║ ██║ ███████║██║ ██║
██╔═██╗ ██║ ██║ ██║ ██║ ██╔══██║██║ ██║
██║ ██╗███████╗╚██████╔╝ ██║ ██║ ██║╚██████╔╝
╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝
Adding resource input_file_dependencies:
Adding resource exec_unit:main
Found 2 route(s) on server 'app'
Adding resource gateway:pet-api
Adding resource persist_kv:petsByOwner
Adding resource topology:my-first-app
Adding resource infra_as_code:Pulumi (AWS)
The cloud version of the application is saved to the ./compiled directory, and has everything you need to deploy, run and operate the application.
As part of the compilation, Klotho generates a high-level topology diagram showing the cloud resources that will be used in your application's cloud deployment and their relationships.
Open ./compiled/my-first-app.png to view the application's topology diagram:
We can see here that Klotho has defined the following AWS topology:
Here are some links to additional resources:
These languages support the majority of capabilities and a wide variety of code styles.
These languages support only a minority of capabilities and/or small subset of code styles.
These languages are not yet supported but are in design and development
These providers support the majority of capabilities and languages.
These providers are not yet supported but are in design and development
go build ./...go test ./...go run ./cmd/klothogit push:
git config --local core.hooksPath .githooks/
integ-test environment. The login credentials are in BitWarden, under the "GitHub CI/CD login" entry.2,355 followers · starred Feb 2023
1,436 followers · starred Mar 2023
5,022 followers · starred Feb 2023
79 followers · starred Apr 2023
Klotho - write AWS applications at lightning speed
See the code
Klotho is an open source tool that transforms plain code into cloud native code.
Klotho allows you to quickly and reliably add cloud functionality to your application with minimal modification to your code. In most cases, this is just a handful of klotho annotations.
It adds 3 main in-code cloud capabilities:
expose web APIs to the Internetpersist multi-modal data into different types of databasesstatic_unit package static assets and upload into a CDN for distributionKlotho is designed to absorb the complexity of building cloud applications, enabling everyone in large-scale organizations and teams to hobbyist developers to write and operate cloud applications at a fraction of the effort.
Its design principles are an outcome of industry collaborations focused on mid-sized companies and fast growing startups.
Klotho builds on a new architecture called Adaptive Architecutes.

It's a superset of monoliths, microservices and serverless architectures, combining their benefits like a stellar developer experience, immediate productivity, scalability and autonomy of development and deployment as well as a spectrum of NoOps to FullOps. It also introduces a host of new capabilities that have been out of reach do to their implementation complexity.
Klotho is part of a new generation of cloud tools that implements Infrastructure-from-Code (IfC), a process to automatically create, configure and manage cloud resources from the existing software application's source code without having describe it explicitly.
By annotating the clients, SDKs or language constructs used in the code with Klotho capabilities, they are automatically created, updated and wired into the application.
Exposing a Python FastAPI to the internet with the Klotho klotho::expose capability. View for NodeJS, Go
Persisting Redis and TypeORM instances in NodeJS with the the Klotho klotho::persist capability. View for Python, Go (soon)
Klotho ensures that developers/operators are able to select and adapt the underlying technologies even after their initial setup.
To install the latest Klotho release, run the following (see full installation instructions for additional installation options):
Mac:
brew install klothoplatform/tap/klotho
Linux/WSL2:
curl -fsSL "https://github.com/klothoplatform/klotho/releases/latest/download/klotho_linux_amd64" -o klotho
chmod +x klotho
Get syntax highlighting and snippets for Klotho annotations in your favorite IDE.
The quickest way to get started is with the getting started tutorial for Javascript/Typescript, Python and Go (soon).
Clone our sample apps git repo and install the npm packages for the js-my-first-app app:
git clone https://github.com/KlothoPlatform/sample-apps.git
cd sample-apps/js-my-first-app
npm install
First log in to Klotho. This shares telemetry data for compiler improvements:
klotho --login <email>
Now compile the application for AWS by running klotho and passing --provider aws as an argument on the command line.
klotho . --app my-first-app --provider aws
Will result in:
██╗ ██╗██╗ ██████╗ ████████╗██╗ ██╗ ██████╗
██║ ██╔╝██║ ██╔═══██╗╚══██╔══╝██║ ██║██╔═══██╗
█████╔╝ ██║ ██║ ██║ ██║ ███████║██║ ██║
██╔═██╗ ██║ ██║ ██║ ██║ ██╔══██║██║ ██║
██║ ██╗███████╗╚██████╔╝ ██║ ██║ ██║╚██████╔╝
╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝
Adding resource input_file_dependencies:
Adding resource exec_unit:main
Found 2 route(s) on server 'app'
Adding resource gateway:pet-api
Adding resource persist_kv:petsByOwner
Adding resource topology:my-first-app
Adding resource infra_as_code:Pulumi (AWS)
The cloud version of the application is saved to the ./compiled directory, and has everything you need to deploy, run and operate the application.
As part of the compilation, Klotho generates a high-level topology diagram showing the cloud resources that will be used in your application's cloud deployment and their relationships.
Open ./compiled/my-first-app.png to view the application's topology diagram:
We can see here that Klotho has defined the following AWS topology:
Here are some links to additional resources:
These languages support the majority of capabilities and a wide variety of code styles.
These languages support only a minority of capabilities and/or small subset of code styles.
These languages are not yet supported but are in design and development
These providers support the majority of capabilities and languages.
These providers are not yet supported but are in design and development
go build ./...go test ./...go run ./cmd/klothogit push:
git config --local core.hooksPath .githooks/
integ-test environment. The login credentials are in BitWarden, under the "GitHub CI/CD login" entry.2,355 followers · starred Feb 2023
1,436 followers · starred Mar 2023
5,022 followers · starred Feb 2023
79 followers · starred Apr 2023