Tommel is a lightweight and user-friendly command-line tool designed to simplify the creation of TOML configuration files. Whether you're managing complex configurations or just getting started with TOML, Tommel ensures your files are clean, valid, and headache-free.
-
Dynamic Table Creation
Easily create tables and nested tables with intuitive dot notation. -
Arrays Made Simple
Define arrays with type validation, ensuring no accidental TOML violations. -
Multiline Strings
Add beautifully formatted multiline strings that are automatically closed. -
Arrays of Tables
Organize your configurations with array-of-tables support. -
Key-Value Management
Add, edit, and validate key-value pairs with type-checking for strings, integers, floats, booleans, and datetimes. -
Comments
Document your configurations with inline comments. -
Error-Proof
Built-in validation prevents common mistakes like duplicate keys, invalid names, or inconsistent arrays. -
Export with Ease
Generate valid TOML files directly to your desktop.
- Java 11 or later
Ensure you have Java installed. You can check with:java -version
git clone https://github.com/mehrzweckmandala/tommel.git
cd tommel
javac -d bin src\main\java\de\mehrzweckmandala\tommel\*.java
java -cp bin de.mehrzweckmandala.tommel.Main
Tommel provides an interactive CLI menu to guide you through creating TOML files step-by-step.
-
Create a New Table
Define a top-level or nested table. Example:[settings] [parent.child]
-
Add Key-Value Pairs
Assign values to keys with automatic validation:theme = "dark" retries = 5
-
Add Arrays
Input arrays with a key name:supported_languages = ["en", "fr", "de"]
-
Add Multiline Strings
Easily handle multiline content:description = """ This is a multiline string example. """
-
Add Comments
Document your file:# This is a comment
-
Review Configuration
Preview your current configuration. -
Export to TOML
Save your file as a valid TOML document. -
Reset Configuration
Start fresh by clearing the current configuration.
Here’s how you might use Tommel to create a configuration:
-
Start the Program
Runjava -cp bin de.mehrzweckmandala.tommel
. -
Create a Table
Add a table for your app settings:> 1 Enter table name (use dot notation for nested tables): > app.settings
-
Add Key-Value Pairs
Specify configurations:> 2 Enter key: > theme Enter value: > dark Enter value type (string, integer, float, boolean, datetime): > string
-
Add an Array
Add supported languages:> 4 Enter array name: > supported_languages Enter array elements separated by commas: > en, fr, de
-
Export Your File
Save your work:> 8 Configuration exported to: /Users/yourname/Desktop/config.toml
Here’s the TOML file generated by Tommel:
[app.settings]
theme = "dark"
supported_languages = ["en", "fr", "de"]
- Beginner-Friendly: No need to memorize TOML syntax – Tommel guides you every step of the way.
- Error-Free: Built-in validation ensures your files are always valid TOML.
- Flexible: Supports advanced TOML features like arrays of tables and nested tables.
Tommel is open-source under the MIT License. Contributions are welcome! 🛠️
Got ideas for features or improvements? Feel free to open an issue or submit a pull request!
TOML is meant to be simple and human-readable – and so is Tommel. Go ahead and create your first configuration file today!