toml

toml reads and changes the common TOML subset used by configuration files: tables, dotted keys, scalar values and simple lists. Validation and writes happen directly on the selected file.

DataVersion 1.1.6Stable
lil-terminal

Overview

toml handles common TOML configuration directly in place: inspect dotted paths, search keys or values, update one setting atomically, validate the supported subset, or dump the normalized source.

Tables become dotted paths

A [database] table containing host is addressed as database.host. The parser intentionally targets common hosting configuration; advanced TOML constructs are better edited as text rather than silently reinterpreted.

Syntax

lil-terminal
toml <file> [key|options] · toml dump <file>

Reference

toml <file>

show TOML data

toml <file> <key>

show one exact path or value

toml dump <file>

show normalized source text

-f <text|mask> [-k|-v]

find matching keys, paths or values

-w <key> : <value>

write a value directly to the file

-w <key> < <file>

write a value read from another file

-d <key>

delete a value or path

-c

validate the file

Read, find and change a setting

Start with toml config/app.toml to see the current settings; add database.host to read one value. -f searches paths and values, while -k searches only key paths and -v only values. Ordinary text matches without case sensitivity; * and ? make a whole-field mask. Check syntax with -c and view the reconstructed file with dump.

Use -w <key> : <value> to change one value immediately, or -w <key> < <file> to read it from another file. -d <key> deletes a path. An unquoted true, false or number may be interpreted as a typed value; use care with strings that look like numbers. Make a copy before writing. $ refers to the most recently opened file in Core; a filename alone may invoke its registered handler.

Limits and safe editing

This handles common sections, strings, numbers, booleans and JSON-style inline arrays. TOML dates, arrays of tables, special numbers and many other valid TOML constructs are not supported; duplicate keys or headings are rejected. Any write rebuilds the file and can discard comments and formatting. For full TOML syntax, use edit or code. Minimum can only display the whole file.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Open the file and reuse it with $

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install toml
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install toml -m
Exact public version

Install exactly this published version.

install toml -v 1.1.6
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade toml
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install toml -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Open the file and reuse it with $
cd \sandbox\config | toml app.toml
application.name    lil-shop
application.debug   true
database.host       localhost
database.port       3306
database.options.0  utf8mb4
database.options.1  strict
Show TOML data
toml config/app.toml
application.name    lil-shop
application.debug   true
database.host       localhost
database.port       3306
database.options.0  utf8mb4
database.options.1  strict
Show one exact path or value
toml config/app.toml database.host
localhost
Show one exact path or value
toml config/app.toml database.options.0
utf8mb4
Find matching keys, paths or values
toml config/app.toml -f "database.*" -k
database.host       localhost
database.port       3306
database.options.0  utf8mb4
database.options.1  strict
Find matching keys, paths or values
toml config/app.toml -f "strict" -v
database.options.1  strict
Find matching keys, paths or values
toml config/app.toml -f "debug"
application.debug  true
Write a value directly to the file
toml config/app.toml -w database.port : 3307
database.port  3307
Write a value read from another file
toml config/app.toml -w application.name < config/plain-value.txt
application.name  demo-site
Handle a missing file
toml config/app.toml -d application.debug
application.name    lil-shop
database.host       localhost
database.port       3306
database.options.0  utf8mb4
database.options.1  strict
Validate the file
toml config/app.toml -c
Valid TOML
Show normalized source text
toml dump config/app.toml
[application]
name = "lil-shop"
debug = true

[database]
host = "localhost"
port = 3306
options = ["utf8mb4","strict"]
Show one exact path or value
toml config/app.toml unknown.key
Path not found
Validate the file
toml config/invalid.toml -c
Duplicate TOML key
Show TOML data
toml config/missing.toml
File not found
Write a value directly to the file
toml config/app.toml -w database.port
Value required after : or 

File used in this example: sandbox/config/app.toml

The example uses a file or directory from the protected /sandbox/ documentation workspace.

[application]
name = "lil-shop"
debug = true

[database]
host = "localhost"
port = 3306
options = ["utf8mb4", "strict"]

Related documentation

Current public release

v1.1.62026-11-01

Production refinement

Current stable release of toml. toml reads and changes the common TOML subset used by configuration files: tables, dotted keys, scalar values and simple lists.