{Corn}

A simple and pain-free configuration language.

Corn has been designed using inspiration from JSON and Nix to produce a language that's easy and intuitive to write, good for config files, and has a feature-set small enough you can learn it in minutes. It was born out of the following frustrations:

Get startedFull specification
let {
    $entry = "dist/index.js"
    $author = { name = "John Smith" email = "[email protected]" }
} in {
    name = "example-package"
    version = "1.0.0"
    main = $entry
    bin.filebrowser = $entry
    private = false

    author = $author
    author.url = "https://example.com"

    contributors = [ $author ]

    scripts.build = "tsc"
    scripts.run = "node dist"

    dependencies = {
        dotenv = "^8.2.0"
        // put the rest of your deps here...
    }

    devDependencies.typescript = "^4.5"

    config.port = 8080
    config.hostname = null
}

No obscure types

Corn does away with special use-case data types, sticking only to the same small set available in JSON.

This simplifies parsing, makes your configuration versatile and avoids lock-in.

One way to write Corn

Each data type and feature has a single, simple, syntax that is valid, leaving no room for ambiguity.

The syntax is plain and predictable, borrowing from existing well-established languages.

Optimised for reading and writing

Corn is designed to be read and written by humans. Use key-chaining to create deeply nested objects instantly, and inputs with merging to cut down on repetition.

Equally, the feature set has been kept purposefully minimal. This makes it easy to learn and get going within minutes.