{"id":20892929,"url":"https://github.com/CarmJos/configured","last_synced_at":"2025-05-12T22:32:13.237Z","repository":{"id":39984897,"uuid":"482302211","full_name":"CarmJos/EasyConfiguration","owner":"CarmJos","description":":memo: Easy (to make) Configurations! A simple, easy-to-use and universal solution for managing configuration files.  Enjoy the ease of use with customizable formats for loading, reading, and updating your configuration files.","archived":false,"fork":false,"pushed_at":"2024-09-14T14:50:40.000Z","size":845,"stargazers_count":30,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-15T00:35:17.431Z","etag":null,"topics":["configuration","configuration-files","configuration-management","development","easy-to-use","fastdev","hocon","json","library","sql","yaml"],"latest_commit_sha":null,"homepage":"https://carmjos.github.io/EasyConfiguration/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CarmJos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["CarmJos"],"custom":["https://donate.carm.cc"]}},"created_at":"2022-04-16T16:17:57.000Z","updated_at":"2024-09-14T14:50:36.000Z","dependencies_parsed_at":"2024-03-12T02:43:06.788Z","dependency_job_id":"7f8c8c77-f9f7-4819-9b9b-357dc41887f4","html_url":"https://github.com/CarmJos/EasyConfiguration","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarmJos%2FEasyConfiguration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarmJos%2FEasyConfiguration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarmJos%2FEasyConfiguration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarmJos%2FEasyConfiguration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CarmJos","download_url":"https://codeload.github.com/CarmJos/EasyConfiguration/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225156982,"owners_count":17429701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configuration","configuration-files","configuration-management","development","easy-to-use","fastdev","hocon","json","library","sql","yaml"],"created_at":"2024-11-18T10:14:16.816Z","updated_at":"2025-05-12T22:32:13.178Z","avatar_url":"https://github.com/CarmJos.png","language":"Java","readme":"\u003cdiv align=center\u003e\n\u003cimg src=\".doc/images/banner.png\"  alt=\"Banner\"/\u003e\n\n[![version](https://img.shields.io/github/v/release/CarmJos/configured)](https://github.com/CarmJos/configured/releases)\n[![License](https://img.shields.io/github/license/CarmJos/configured)](https://www.gnu.org/licenses/lgpl-3.0.html)\n[![workflow](https://github.com/CarmJos/configured/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/CarmJos/configured/actions/workflows/maven.yml)\n[![CodeFactor](https://www.codefactor.io/repository/github/carmjos/configured/badge)](https://www.codefactor.io/repository/github/carmjos/configured)\n![CodeSize](https://img.shields.io/github/languages/code-size/CarmJos/configured)\n![](https://visitor-badge.glitch.me/badge?page_id=configured.readme)\n\nREADME LANGUAGES [ [**English**](README.md) | [中文](README_CN.md)  ]\n\u003c/div\u003e\n\n# configured _(config framework)_\n\n\u003cimg src=\".doc/images/logo-bg.svg\" width=\"150px\" alt=\"logo\" align=\"right\" style=\"float: right\"/\u003e\n\n_**\"Once set, Simple get.\"**_\n\nA simple, easy-to-use and universal solution for managing, loading, reading,\nand updating configuration files.\n\nSupported **JSON**, **YAML**, **Hocon**, **TOML**, **SQL**, **MongoDB**... and much more!\n\n## Features \u0026 Advantages\n\nSupported [YAML](impl/yaml), [JSON](impl/json), [HOCON](impl/hocon) and [SQL](impl/sql) based configuration files\nformat.\n\n- Class-based mechanism for initializing, loading, retrieving, and updating configuration files, ensuring convenience\n  and efficiency.\n- Supports manual serialization and deserialization of complex configurations.\n- Offers multiple builder forms for rapid construction of `ConfigValue\u003c?\u003e` objects.\n- Enables specification of configuration paths, comments, and more via annotations.\n\n## Development\n\nFor the latest JavaDoc release, [CLICK HERE](https://CarmJos.github.io/configured).\n\nFor a detailed development guide, [CLICK HERE](.doc/README.md).\n\n### Preview\n\nTo quickly demonstrate the applicability of the project, here are a few practical demonstrations:\n\n- [Database configuration.](demo/src/main/java/cc/carm/lib/configuration/demo/DatabaseConfiguration.java)\n- [Demonstration of all types of configuration instance classes.](demo/src/main/java/cc/carm/lib/configuration/demo/tests/conf/DemoConfiguration.java)\n\nCheck out all code demonstrations [HERE](demo/src/main/java/cc/carm/lib/configuration/demo/DatabaseConfiguration.java).\nFor more examples, see the [Development Guide](.doc/README.md).\n\n```java\n\n@ConfigPath(root = true)\n@HeaderComments(\"Configurations for sample\")\npublic interface SampleConfig extends Configuration {\n\n    @InlineComment(\"Enabled?\") // Inline comment\n    ConfiguredValue\u003cBoolean\u003e ENABLED = ConfiguredValue.of(true);\n\n    @HeaderComments(\"Server configurations\") // Header comment\n    ConfiguredValue\u003cInteger\u003e PORT = ConfiguredValue.of(Integer.class);\n\n    @HeaderComments({\"[ UUID \u003e-----------------------------------\", \"A lot of UUIDs\"})\n    @FooterComments(\"[ UUID \u003e-----------------------------------\")\n    ConfiguredList\u003cUUID\u003e UUIDS = ConfiguredList.builderOf(UUID.class).fromString()\n            .parse(UUID::fromString).serialize(UUID::toString)\n            .defaults(\n                    UUID.fromString(\"00000000-0000-0000-0000-000000000000\"),\n                    UUID.fromString(\"00000000-0000-0000-0000-000000000001\")\n            ).build();\n\n    @ConfigPath(\"info\") // Custom path\n    interface INFO extends Configuration {\n\n        @HeaderComments(\"Configure your name!\") // Header comment\n        ConfiguredValue\u003cString\u003e NAME = ConfiguredValue.of(\"Joker\");\n\n        @ConfigPath(\"how-old-are-you\") // Custom path\n        ConfiguredValue\u003cInteger\u003e AGE = ConfiguredValue.of(24);\n\n    }\n\n}\n\n```\n\n```java\npublic class Sample {\n    public static void main(String[] args) {\n        // 1. Make a configuration provider from a file.\n        ConfigurationHolder\u003c?\u003e holder = YAMLConfigFactory.from(\"target/config.yml\")\n                .resourcePath(\"configs/sample.yml\")\n                .indent(4) // Optional: Set the indentation of the configuration file.\n                .build();\n\n        // 2. Initialize the configuration classes or instances.\n        holder.initialize(SampleConfig.class);\n        // 3. Enjoy using the configuration!\n        System.out.println(\"Enabled? -\u003e \" + SampleConfig.ENABLED.resolve()); // true\n        SampleConfig.ENABLED.set(false);\n        System.out.println(\"And now? -\u003e \" + SampleConfig.ENABLED.resolve()); // false\n        // p.s. Changes not save so enable value will still be true in the next run.\n\n        System.out.println(\"Your name is \" + SampleConfig.INFO.NAME.resolve() + \" (age=\" + SampleConfig.INFO.AGE.resolve() + \")!\");\n    }\n}\n\n```\n\n```yaml\n# Configurations for sample\n\nenabled: true #Enabled?\n\n# Server configurations\nport:\n\n# [ UUID \u003e-----------------------------------\n# A lot of UUIDs\nuuids:\n  - 00000000-0000-0000-0000-000000000000\n  - 00000000-0000-0000-0000-000000000001\n# [ UUID \u003e-----------------------------------\n\ninfo:\n  # Configure your name!\n  name: Joker\n  how-old-are-you: 24\n```\n\n### Dependencies\n\n#### Maven Dependency\n\n\u003cdetails\u003e\n\u003csummary\u003eRemote Repository Configuration\u003c/summary\u003e\n\n```xml\n\n\u003cproject\u003e\n    \u003crepositories\u003e\n\n        \u003crepository\u003e\n            \u003c!-- Using Maven Central Repository for secure and stable updates, though synchronization might be needed. --\u003e\n            \u003cid\u003emaven\u003c/id\u003e\n            \u003cname\u003eMaven Central\u003c/name\u003e\n            \u003curl\u003ehttps://repo1.maven.org/maven2\u003c/url\u003e\n        \u003c/repository\u003e\n\n        \u003crepository\u003e\n            \u003c!-- Using GitHub dependencies for real-time updates, configuration required (recommended). --\u003e\n            \u003cid\u003econfigured\u003c/id\u003e\n            \u003cname\u003eGitHub Packages\u003c/name\u003e\n            \u003curl\u003ehttps://maven.pkg.github.com/CarmJos/configured\u003c/url\u003e\n        \u003c/repository\u003e\n\n    \u003c/repositories\u003e\n\u003c/project\u003e\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGeneric Native Dependency\u003c/summary\u003e\n\n```xml\n\n\u003cproject\u003e\n    \u003cdependencies\u003e\n        \u003c!-- Basic implementation part, requiring custom implementation of “Provider” and “Wrapper”. --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecc.carm.lib\u003c/groupId\u003e\n            \u003cartifactId\u003econfigured-core\u003c/artifactId\u003e\n            \u003cversion\u003e[LATEST RELEASE]\u003c/version\u003e\n            \u003cscope\u003ecompile\u003c/scope\u003e\n        \u003c/dependency\u003e\n\n        \u003c!-- YAML file-based implementation, compatible with all Java environments. --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecc.carm.lib\u003c/groupId\u003e\n            \u003cartifactId\u003econfigured-yaml\u003c/artifactId\u003e\n            \u003cversion\u003e[LATEST RELEASE]\u003c/version\u003e\n            \u003cscope\u003ecompile\u003c/scope\u003e\n        \u003c/dependency\u003e\n\n        \u003c!-- JSON file-based implementation, compatible with all Java environments. --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecc.carm.lib\u003c/groupId\u003e\n            \u003cartifactId\u003econfigured-gson\u003c/artifactId\u003e\n            \u003cversion\u003e[LATEST RELEASE]\u003c/version\u003e\n            \u003cscope\u003ecompile\u003c/scope\u003e\n        \u003c/dependency\u003e\n\n    \u003c/dependencies\u003e\n\u003c/project\u003e\n```\n\n\u003c/details\u003e\n\n#### Gradle Dependency\n\n\u003cdetails\u003e\n\u003csummary\u003eRemote Repository Configuration\u003c/summary\u003e\n\n```groovy\nrepositories {\n\n    // Using Maven Central Repository for secure and stable updates, though synchronization might be needed.\n    mavenCentral()\n\n    // Using GitHub dependencies for real-time updates, configuration required (recommended).\n    maven { url 'https://maven.pkg.github.com/CarmJos/configured' }\n\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGeneric Native Dependency\u003c/summary\u003e\n\n```groovy\n\ndependencies {\n\n    // Basic implementation part, requiring custom implementation of “Provider” and “Wrapper”.\n    api \"cc.carm.lib:configured-core:[LATEST RELEASE]\"\n\n    // YAML file-based implementation, compatible with all Java environments.\n    api \"cc.carm.lib:configured-yaml:[LATEST RELEASE]\"\n\n    // JSON file-based implementation, compatible with all Java environments.\n    api \"cc.carm.lib:configured-gson:[LATEST RELEASE]\"\n\n}\n```\n\n\u003c/details\u003e\n\n## Derived Projects\n\n### [**MineConfiguration**](https://github.com/CarmJos/MineConfiguration) (by @CarmJos)\n\nconfigured for MineCraft!\nEasily manage configurations on MineCraft-related server platforms.\n\nCurrently, it supports BungeeCord, Velocity, Bukkit (Spigot) servers,\nwith more platforms to be supported soon.\n\n## Support and Donation\n\nIf you appreciate this plugin, consider supporting me with a donation!\n\nThank you for supporting open-source projects!\n\nMany thanks to Jetbrains for kindly providing a license for us to work on this and other open-source projects.\n\n[![](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://www.jetbrains.com/?from=https://github.com/CarmJos/configured)\n\nMany thanks to [ArtformGames](https://github.com/ArtformGames) for their\nstrong support and active contribution to this project!\n\n\u003cimg src=\"https://raw.githubusercontent.com/ArtformGames/.github/master/logo/logo_full.svg\" width=\"317px\" height=\"117px\" alt=\"ArtformGames\"\u003e\n\n## Open Source License\n\nThis project's source code is licensed under\nthe [GNU LESSER GENERAL PUBLIC LICENSE](https://www.gnu.org/licenses/lgpl-3.0.html).\n","funding_links":["https://github.com/sponsors/CarmJos","https://donate.carm.cc"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCarmJos%2Fconfigured","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCarmJos%2Fconfigured","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCarmJos%2Fconfigured/lists"}