Sponsor:

Your company here ā€” click to reach over 10,000 unique daily visitors

tomcli-set-lists - Man Page

CLI for working with TOML files. Pronounced "tom clee."

Synopsis

[tomcli-set | tomcli set] [Global Options] PATH lists COMMAND [Options] [Arguments]

[tomcli-set | tomcli set] ... lists [COMMAND] --help

Description

The tomcli-set lists subcommand supports modifying lists in TOML files.

Arguments

PATH

Path to a TOML file to read. Use '-' to read from stdin. Set to ... when calling --help for a subcommand.

SELECTOR

A dot separated map to a key in the TOML mapping.
Example: 'section1.subsection.value' or '"key.with.dots".abc'

VALUE

Value to set

PATTERN

Pattern against which to match strings Defaults to regex but can be changed with the --type option. The pattern must match the full string.

REPL

Replacement string (used by replace subcommand). Support Python regex expansions (e.g. \1) when

Global Options

--version

Show the version and exit.

--writer <tomli_w|tomlkit>

Library to use to write TOML files.

--reader <tomli|tomlkit>

Library to use to write TOML files. Defaults to tomlkit and falls back to tomli/tomllib if tomlkit is unavailable.

Options

-t / --type <regex|fnmatch>

Matcher type. Python regexes and fnmatch(3)-style patterns are supported.

--first

Only modify the first PATTERN match

Commands

append

Add a string value to a TOML list

  tomcli-set [GLOBAL OPTIONS] PATH append [OPTIONS] SELECTOR VALUE 
  tomcli-set ... append --help

delitem

Delete string values from a TOML file

  tomcli-set [GLOBAL OPTIONS] PATH lists delitem [OPTIONS] SELECTOR PATTERN
  tomcli-set ... lists delitem --help

replace

Replace string values in a TOML list with other string values

  tomcli-set [GLOBAL OPTIONS] PATH lists replace [OPTIONS] SELECTOR PATTERN REPL
  tomcli-set ... lists replace --help

str

Create a TOML list of strings

  tomcli-set [GLOBAL OPTIONS] PATH lists str [VALUE...]
  tomcli-set ... lists str --help

See Also

tomcli(1), tomcli-formatters(1), tomcli-set(1), tomcli-set(1)

Referenced By

tomcli(1), tomcli-set(1).

2024-06-07