toml-cli
Command line interface to read and write keys/values to/from toml files
What it is and what it does
toml-cli is a command-line utility for reading, modifying, and querying TOML configuration files programmatically. It exposes four main operations—get, set, search, and add_section—allowing scripts and automation tools to extract or update TOML values without parsing the file manually or opening an editor. The tool supports nested key paths (e.g., `tool.poetry.name`), array indexing, and JMESPath queries for complex selections.
The package depends on typer for CLI scaffolding, tomlkit for preserving TOML structure during edits, jmespath for query evaluation, and regex for pattern matching. It targets modern Python (3.10+) and installs as a pure wheel with low friction. Use it in CI/CD pipelines, build scripts, or development workflows where TOML configuration needs to be read or updated by code rather than by hand.
Use it for:
- Extract version numbers or metadata from pyproject.toml in CI/CD pipelines for automated release workflows.
- Update dependency versions or tool settings in TOML files during scripted configuration management.
- Query complex nested TOML structures (e.g., multiple index entries) using JMESPath expressions in shell scripts.
- Programmatically add new sections or modify existing ones in configuration files without manual editing.
- Read TOML values in development scripts to drive conditional build or test steps.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Command-line tool for reading, writing, and querying TOML files without opening an editor, using JMESPath for complex lookups.
Yes, if you need scriptable TOML manipulation in CI/CD or automation. The tool is straightforward, has no known vulnerabilities, and installs cleanly. The 336-day release gap suggests it may not be actively developed, but the repository is unarchived and the functionality is stable—suitable for read-heavy or occasional-write use cases where you don't expect frequent updates.
Install
toml-cli on PyPI
pip
pip install toml-cliuv
uv add toml-clipoetry
poetry add toml-cliInstalling toml-cli
Before you install
Low friction install with a pure-Python wheel. Maintenance status is aging—last release was 336 days ago—but the repository remains active and unarchived.
License in practice
Dual-licensed under MIT and (Apache-2.0 OR BSD-2-Clause), all permissive terms; no restrictions on commercial or private use.
Quickstart
pip install toml-cli
toml get --toml-path pyproject.toml tool.poetry.name
toml set --toml-path pyproject.toml tool.poetry.version 0.2.0
toml search --toml-path pyproject.toml tool.uv.index[*].name
Requires Python 3.10 or later.
Verify before relying
- Whether the 336-day gap since last release signals maintenance risk or stable maturity.
- Performance characteristics when handling large TOML files or complex JMESPath queries.
Package facts
| License | MIT AND (Apache-2.0 OR BSD-2-Clause) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — jmespath, regex, tomlkit, typer |
| Maintenance | aging — 336 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 668,994/month — #5,415 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: toml_cli-0.8.2-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
nietA command-line tool that extracts and…
permissive · top 15,000 on PyPI
tomlrtReads and writes TOML files while preserving…
permissive · top 15,000 on PyPI
jmespathJMESPath is a query language for extracting and…
permissive · top 100 on PyPI
Flake8-pyprojectFlake8-pyproject enables Flake8 to read its…
permissive · top 5,000 on PyPI
toml-sortCommand-line utility and Python library to sort…
permissive · top 15,000 on PyPI
tccliCommand-line interface for managing Tencent…
permissive · top 15,000 on PyPI
pyproject-fmtFormats pyproject.toml files with consistent,…
permissive · top 5,000 on PyPI
pytest-envA pytest plugin that loads environment…
permissive · top 1,000 on PyPI
pyproject-parserParses and extracts metadata from…
permissive · top 15,000 on PyPI
tombiTombi is a TOML formatter, linter, and language…
permissive · top 15,000 on PyPI