KCL is an open-source constraint-based record and functional language designed to enhance the writing of complex configurations, including those for cloud-native scenarios. It provides a robust framework for defining schemas with rule constraints, validating configuration data, and automating configuration management with scalability and stability.
Key Features:
Schema Modeling with Constraints: Define schemas using rule-based constraints to ensure configuration validity and enforce consistency.
Scalable Configuration Management: Handle large-scale configurations through isolated blocks and gradient automation schemes for different environments.
Integration with Cloud-Native Tools: Mutate or validate Kubernetes resources via plugins for tools like Kubectl, Kustomize, Helm, and KPT.
Ease of Use: Built from familiar concepts in Python and Golang, with functional language features for low side effects.
High Performance: Leverages Rust and LLVM for fast compile-time and runtime performance, supporting compilation to native code or WASM.
Strong Typing and Safety: Ensures configuration stability through a static type system and domain-oriented design with minimal security risks.
Multi-Language Support: Offers SDKs in Rust, Go, Python, .NET, Java, and Node.js for diverse use cases.
Audience & Benefit:
Ideal for developers, DevOps engineers, and platform teams working on configuration management and cloud-native applications. KCL enables efficient, consistent, and scalable configuration writing and validation, reducing manual errors and improving operational efficiency. It is particularly beneficial for those managing complex configurations in production environments or seeking to integrate with modern infrastructure-as-code practices.
Available via winget for easy installation.
README
KCL: Constraint-based Record & Functional Language
KCL is an open-source, constraint-based record and functional language that enhances the writing of complex configurations, including those for cloud-native scenarios. With its advanced programming language technology and practices, KCL is dedicated to promoting better modularity, scalability, and stability for configurations. It enables simpler logic writing and offers ease of automation APIs and integration with homegrown systems.
High performance: High compile-time and runtime performance using Rust & C, and support compilation to native code and WASM.
API affinity: Native support for ecological API specifications such as OpenAPI, Kubernetes CRD, Kubernetes Resource Model (KRM) spec.
Developer-friendly: Friendly development experiences with rich language tools (Format, Lint, Test, Vet, Doc, package management tools etc.), and multiple IDE extensions.
Safety & maintainable: Domain-oriented, no system-level functions such as native threads and IO, low noise and security risk, easy maintenance and governance.
Rich multi-language SDK: Rust, Go, Python, .NET, Java and Node.js SDKs meet different scenarios and application use prelude.