toml-cli

Command line interface to read and write keys/values to/from toml files

15 个版本 Python >=3.10
安装
pip install toml-cli
poetry add toml-cli
pipenv install toml-cli
conda install toml-cli
描述

toml-cli

Build

Command line interface for toml files.

This can be usefull for getting or setting parts of a toml file without an editor. Which can be convinient when values have to be read by a script for example in continuous development steps.

Install

Install via

pip install toml-cli

or

uv tool install toml-cli

Get a value

toml get --toml-path pyproject.toml tool.poetry.name

toml get --toml-path pyproject.toml tool.poetry.authors[0]

toml get --toml-path pyproject.toml tool.poetry.name --default marc

Search with JMESPath

toml search --toml-path pyproject.toml tool.uv.index[*].name

Set a value

toml set --toml-path pyproject.toml tool.poetry.version 0.2.0

toml set --toml-path pyproject.toml tool.poetry.authors[0] "Marc Rijken <marc@rijken.org>"

When the index exists, the item is changed. Otherwise, the item will be added to the list.

Add a section

toml add_section --toml-path pyproject.toml tool.poetry.new_section

Unset a value

toml unset --toml-path pyproject.toml tool.poetry.version

版本列表
0.8.2 2025-09-12
0.8.1 2025-07-19
0.8.0 2025-07-19
0.7.0 2024-06-26
0.6.1 2024-04-11
0.6.0 2023-09-28
0.5.0 2023-05-11
0.4.2 2023-04-17
0.4.0 2023-04-14
0.3.1 2022-05-16
0.1.4 2022-03-30
0.1.3 2020-08-30
0.1.2 2020-08-24
0.1.1 2020-08-24
0.1.0 2020-08-17