Introducing Confetti

Confetti is a configuration language that combines the readability of Unix configuration files with the flexibility of S-expressions. It is minimalistic, untyped, and unopinionated. Schema conformance is validated by the user application.

Confetti does not compete with JSON or XML, it competes with INI.

Kitchen Sink Example#

The following example uses most features of Confetti:

# This is a comment.

probe-device eth0 eth1

user * {
    login anonymous
    password "${ENV:ANONPASS}"
    machine 167.89.14.1
    proxy {
        try-ports 582 583 584
    }
}

user "Joe Williams" {
    login joe
    machine 167.89.14.1
}

Implementations#

Confetti is available for:

Create your own implementation of Confetti by reviewing the specification and testing it against the official conformance test suite. To have it listed here, please reach out!

Philosophy#

Simplicity and minimalism are at the heart of Confetti. Some formats, like YAML, are very complicated (look at the size of its specification!) whereas Confetti’s spec is simple and minimal, and it can be learned in minutes.

Confetti is typeless by design and its syntax is composable. Confetti provides the building blocks necessary to create everything from simple configuration to textual file formats and lightweight scripting. Check out the various examples for inspiration.

Notable features:

  • Unopinionated: Confetti lets you define custom keywords, like on and off, and tristates, like yes, no, and maybe. This is in contrast to formats, like TOML, which mandate the keywords true and false.

  • Localization Friendly: Confetti lets you write configuration files in your native language. This is in contrast to formats, like JSON, which requires the English words null, true, and false, and Arabic numerals 0 through 9.

  • Extensions Encouraged: Much like how Markdown has different flavors, you are encouraged to create unique flavors of Confetti. The specification defines the common language and its annex includes extensions that are compatible with the grammar.

Feature Comparison#

Here’s how Confetti compares to popular formats:

Confetti INI JSON TOML

Specification

Typeless

Localization Friendly

1
2
2

Unicode Literals

1

Multiline Literals

Comments

Hierarchical Structures

Intended Use Case

Configuration

Configuration

Data Interchange

Configuration

1 INI has no specification and therefore support for internalization and Unicode are implementation dependent.

2 JSON and TOML mandate the English words true and false and Arabic numerals 0 through 9.