talira

Better configuration for less

open sourceMITfree

Nickel is a configuration language from Tweag for generating static configuration files (JSON, YAML, TOML and the like) for other systems: in essence, JSON with functions. Configurations are built from small records merged into larger ones, with metadata such as documentation and defaults carried through the merge. It has a sound gradual type system, so you can statically check functions with type inference while validating plain data at run time, and contracts that act as schemas you write, combine and attach with type-like annotations. Nickel is an evolution of the Nix language's ideas, and Tweag publishes integrations for Kubernetes, Terraform and Bazel. The nickel CLI is the reference interpreter, written in Rust and embeddable from other languages, with a REPL, a language server and a formatter. MIT licensed.

Libraries for Nickel

Talira doesn't list any yet.

Problems it solves

  • generate complex JSON or YAML configuration without copy-paste
  • a configuration language with optional static types and schema validation
  • which config language should we use instead of templated YAML
  • validate configuration data against schemas I write myself
  • split infrastructure configuration into reusable modules that merge

Features

  • records merged into larger configurations, with metadata
  • sound gradual typing with type inference
  • contracts as composable schemas
  • first-class functions
  • export to JSON, YAML and TOML
  • REPL, language server and formatter
  • integrations for Kubernetes, Terraform and Bazel

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what Nickel does.

  1. Pkl A configuration-as-code language with rich validation and tooling
  2. CUE Validate, define, and use dynamic and text-based data
  3. Jsonnet A configuration language for app and tool developers
  4. KCL An open-source constraint-based record and functional language for configuration and policy
  5. HCL The HashiCorp configuration language
  6. Starlark A Python dialect designed as a configuration language, made for Bazel

Compare Nickel with the top 3