toml-cli is a command-line interface tool designed for reading and writing keys and values within TOML configuration files. It is particularly useful for scripting and automating modifications to TOML files without requiring a full text editor. The library is currently at version 0.8.2 and appears to have an active release cadence.
pip install toml-cliNo compatibility data collected yet for this library.
This quickstart demonstrates how to use the `toml` command-line tool from Python scripts using `subprocess` to get and set values in a TOML file. It creates a temporary `test.toml` file, performs operations, and then cleans up.
Ensure the target key or path exists before attempting to set its value, or handle the non-zero exit code in scripts.
Review and update scripts that interact with arrays of tables using `toml get` to align with the corrected behavior.
When using in Python, call the `toml` command via `subprocess.run()` or similar methods.
Update scripts to correctly interpret and handle the standardized exit codes and enhanced error messages provided by the `toml` command.
pip install toml-cli
Ensure the file path is correct and the TOML file exists, or create the file.
Rename the file to have a `.toml` extension or provide a path to a file with a valid TOML extension.
Correct the syntax errors within the TOML file to conform to the TOML specification.