my-server
← Wiki

TOML

Tom's Obvious, Minimal Language (TOML, originally Tom's Own Markup Language) is a file format for configuration files. It is designed to be easy to read and write by being minimal (unlike the more-complex YAML) and by using human-readable syntax. The project standardizes the implementation of the ubiquitous INI file format (which it has largely supplanted), removing ambiguity from its interpretation. Originally created by Tom Preston-Werner, the TOML specification is open source. TOML is used in a number of software projects and is implemented by all popular programming languages.

Syntax

TOML's syntax primarily consists of, among other constructs, <code>key = value</code> pairs, <code>[section names]</code>, and <code>#</code> (for comments). TOML's syntax is a superset of the .INI format but has one agreed-upon formal specification, whereas the .INI format suffers from many competing variants (most implicitly specified through project-specific parsers).

Exceeding stringly-typed semantics, TOML supports the following data types: string, integer, float, boolean, datetime, array, and table.

Example

Notable uses

TOML is used in a variety of settings, such as:

  • Jekyll (a static site generator) configuration <code>_config.toml</code> (although configuration through YAML is also supported)
  • Hugo (a static site generator) configuration <code>hugo.toml</code> (although configuration through JSON and YAML is also supported)
  • Python&nbsp;3 package manifests <code>pyproject.toml</code>
  • Rust package manifests <code>Cargo.toml</code>
  • Julia project settings <code>Project.toml</code> and package manifests <code>Manifest.toml</code>
  • Blender add-on manifests <code>blender_manifest.toml</code>
  • Gradle version catalogs <code>libs.versions.toml</code>
  • Taplo configurations <code>.taplo.toml</code> and <code>taplo.toml</code>
  • Prettier configurations <code>.prettierrc.toml</code>

See also

References