toml-cli
toml-cli copied to clipboard
feat: Add search command (using JMESPath)
Hi, I have implemented a new command: search. The query that you can use to search is the JMESPath expression.
It might be really helpful for various of reasons, one would be to work with arrays of tables. For example, assuming such a pyproject.toml file:
[[tool.uv.index]]
name = "private-registry"
url = "some-private-url"
[[tool.uv.index]]
name = "public-registry"
url = "official-pypi-url"
Now we can retrieve the names of all the defined uv indexes:
toml search --toml-path pyproject.toml tool.uv.index[*].name