A tiny, header-only C++ library for reading, writing, and manipulating INI files with lazy write and formatting preservation.
mINI is a header-only C++ library for reading, writing, and manipulating INI configuration files. It solves the problem of managing configuration data in a human-readable format while preserving file structure, comments, and custom formatting during updates. The library offers lazy writing, which only applies changes, and supports both case-insensitive and case-sensitive operations.
C++ developers who need to handle INI configuration files in their applications, particularly those working on projects where maintaining file formatting and comments is important, such as game development, desktop applications, or tools with user-editable configs.
Developers choose mINI for its simplicity, zero-dependency header-only design, and ability to preserve INI file formatting and comments. Its lazy write feature and safe data access methods provide reliability and control, making it a lightweight alternative to more complex configuration libraries.
INI file reader and writer
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Just include the single ini.h header with no compilation or dependencies, making integration trivial for C++ projects.
Lazy writing only updates changes while preserving original comments, spacing, and order, ideal for human-editable configs.
Provides get() and has() methods to avoid unintentional structure modifications, unlike the operator[] which can create empty entries.
Simplifies key access without case worries, with an option for case sensitivity via a preprocessor define.
Explicitly does not support multiline values, limiting its use for configurations requiring complex or formatted text entries.
Using operator[] for access automatically creates sections or keys if missing, which can lead to unintended data structure growth without careful has() checks.
At version 0.9.18, the API may not be fully stable and could introduce breaking changes in future updates.
Relies on the host environment for string encoding, which might cause inconsistencies with UTF-8 or other encodings in cross-platform scenarios.