Command line interface to read and write keys/values to/from toml files
Project description
toml-cli
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toml_cli-0.8.2.tar.gz.
File metadata
- Download URL: toml_cli-0.8.2.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec61fbfe5f0d6f2d6bfd9e1127cad38a797b8685a93589f2e22efd168b0cc866
|
|
| MD5 |
05f778005adbec5f25c7ba40ce14198c
|
|
| BLAKE2b-256 |
aa2d24de54996541a3355d6a90e08dbe8526771434941e410ef91c5422517e7b
|
File details
Details for the file toml_cli-0.8.2-py3-none-any.whl.
File metadata
- Download URL: toml_cli-0.8.2-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7af4679ca04c53ad0f6d300dab26f45a78fedf88e8310305bfe0a8ead37fd000
|
|
| MD5 |
7b56402b5e14db4d52c72b037944207e
|
|
| BLAKE2b-256 |
d2b8f0b9b880c03a3db8eaff63d76ca751ac7d8e45483fb7a0bb9f8e5c6ce433
|