DevX is a tool for building lightweight Internal Developer Platforms. Use DevX to build internal standards, prevent misconfigurations early, and enable infrastructure self-service.
docker run --rm -v "$(pwd):/app" ghcr.io/stakpak/devx:latest -h
Quick start
➜ devx project init ➜ devx project update ➜ devx project gen ➜ devx build dev 🏭 Transforming stack for the "dev" environment... [compose] applied resources to "build/dev/compose/docker-compose.yml" [terraform] applied resources to "build/dev/terraform/generated.tf.json"
Usage
Configuration language
We use CUE to write strongly typed configurations. You can now shift YAML typos left, instead of detecting errors when applying configurations. You can easily transform CUE configuration files to and from YAML (CUE is a superset of YAML & JSON).
CUE is the result of years of experience writing configuration languages at Google, and seeks to improve the developer experience while avoiding some nasty pitfalls. CUE looks like JSON, while making declarative data definition, generation, and validation a breeze. You can find a primer on CUE here.
Create a stack (by Developers)
You create a stack to define the workload and its dependencies.
➜ devx project discover --transformers [🏷️ traits] "stakpak.dev/devx/v1/traits" traits.#Workload a component that runs a container traits.#Replicable a component that can be horizontally scaled traits.#Exposable a component that has endpoints that can be exposed traits.#Postgres a postgres database traits.#Helm a helm chart using helm repo traits.#HelmGit a helm chart using git traits.#HelmOCI a helm chart using oci
[🏭 transformers] "stakpak.dev/devx/v1/transformers/argocd" argocd.#AddHelmRelease add a helm release (requires trait:Helm)
[🏭 transformers] "stakpak.dev/devx/v1/transformers/compose" compose.#AddComposeService add a compose service (requires trait:Workload) compose.#ExposeComposeService expose a compose service ports (requires trait:Exposable) compose.#AddComposePostgres add a compose service for a postgres database (requires trait:Postgres)
[🏭 transformers] "stakpak.dev/devx/v1/transformers/terraform" terraform.#AddHelmRelease add a helm release (requires trait:Helm)
Package management
You can publish and share CUE packages directly through git repositories.
Create a new packages
Create a new repository to store your packages (you can host multiple packages per repository).
Update packages (pulling updates will replace existing packages)
Like this project
Posted Dec 3, 2023
A tool for generating, validating & sharing all your configurations, powered by CUE. Works with Kubernetes, Terraform, Compose, GitHub actions and much more...…