Common (Real-world) YINI Examples
Below are practical real-world configuration examples written in the YINI format, demonstrating how YINI handles structure,
data types, and readability β without relying on indentation-based syntax.
New to YINI?
Start with Learn the format
or keep the Cheat Sheet open while reading.
Real-world configuration examples
The following full examples demonstrate how YINI scales from small
configs to complete real-world setups.
π‘ Note: YINI uses indentation only for human readability.
Section markers (^, ^^, ^^^) define the section nesting.
/*
Features:
- Section headers
- Nested sections
- Strings (single quotes)
- Number values, booleans, nulls
*/
^ Server
host = '0.0.0.0'
port = 8080
enable_ssl = false
log_file = '/var/log/server.log'
max_connections = 200
^^ SSL
enabled = false
cert_path = null
key_path = null
@yini
/*
Features:
- Section nesting (up to 3 levels)
- Strings (single/double quotes)
- Strings, nulls, booleans
- List
*/
^ profile
username = "robinkoda"
display_name = 'Robin Koda'
email = "robin@example.com"
avatar = null
is_active = true
roles = ["user", "editor"]
created_at = "2024-05-12T10:30:00Z"
^^ preferences
theme = 'light'
language = "en"
notifications = true
^^^ editor
font = "Fira Code"
tab_width = 4
autosave = on
/*
Features:
- Sections
- Nested sections
- Lists
- Strings (double quotes), booleans,
*/
^ Build
entry = "src/index.ts"
output = "dist/"
source_map = true
minify = true
target = "ES2022"
^^ Plugins
enabled = ["eslint", "prettier", "typedoc"]
^^ Env
NODE_ENV = "production"
API_URL = "https://api.example.com"
DEBUG = false
^ Environment
# Overall environment definition
Version = 1.0
# ------------------------------------------------------------------
# Enabled tools
^^ Tools
items = [
{ Tool: "PyPip_deps", Version: "2.1.0" },
{ Tool: "Python", Version: "3.9.12" },
{ Tool: "7zip", Version: "18.0.1" }
]
# ------------------------------------------------------------------
# Installed but currently disabled / not enabled tools
^^ Tools_not_enabled
items = [
{ Tool: "Eclipse", Version: "javabundle14-cpp-2020-03-R-incubation-win32-x86_64" },
{ Tool: "Python", Version: "3.6.8-64-with-libs_rev2" },
{ Tool: "FOP", Version: "1.0.3.rev1" },
{ Tool: "Pandoc", Version: "2.17.1.1" },
{ Tool: "VisualCpp2015Redistributable", Version: "14.0.23026" },
{ Tool: "VisualCpp2019Redistributable", Version: "14.24.28127" },
{ Tool: "MatlabInstaller", Version: "2021b" }
]
Explore more examples:
β’ Core and practical YINI config examples. β short introductory examples
β’ Large YINI configuration examples. β full-scale configurations