Nickel is a configuration language that generates static configuration files in formats like JSON, YAML, and XML through templating and computation.
Nickel addresses the problem of automating complex configuration generation by treating configuration as code. It extends JSON with functions as first-class citizens, allowing configurations to be built compositionally. The language combines lightweight syntax with a gradual type system that lets developers choose when to apply static typing. Records serve as the basic data structure and can be merged together while preserving metadata like documentation, defaults, and type contracts. Contracts provide a principled validation mechanism similar to schemas, enabling runtime checking without requiring rigid static types for all configuration data.
Nickel suits projects that generate complex configurations across infrastructure, package management, and build systems. It works well for single applications, machine configurations, and entire infrastructure deployments. The language is particularly relevant for teams using or extending the Nix package manager, as Nickel is designed as an evolution of the Nix language addressing some of its limitations. The tool's lightweight design makes it easy to embed in other systems, and the reference interpreter can be called from multiple programming languages. Developers should choose Nickel when they need both the simplicity of a clear default path for common configuration tasks and the flexibility to extend beyond those defaults without arbitrary restrictions.
The project maintains active development with regular commits across its core interpreter and standard library. Pull requests receive timely review and feedback from maintainers. The codebase shows consistent attention to documentation and examples, with updates to guides and use-case documentation appearing alongside feature development. Issue discussions demonstrate engagement with user questions and feature requests, indicating responsive maintenance of the project.