{"id":36700630,"url":"https://github.com/kovszilard/easy-config","last_synced_at":"2026-01-12T11:37:53.940Z","repository":{"id":57720818,"uuid":"240000567","full_name":"kovszilard/easy-config","owner":"kovszilard","description":"Easy Config makes Scala application configuration extremely easy. It reads configuration from the environment or command line arguments.","archived":false,"fork":false,"pushed_at":"2020-03-02T20:02:12.000Z","size":70,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-06-30T19:05:04.610Z","etag":null,"topics":["12-factor","configuration","configuration-management","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kovszilard.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-12T11:51:06.000Z","updated_at":"2022-12-01T13:01:54.000Z","dependencies_parsed_at":"2022-09-26T22:30:36.785Z","dependency_job_id":null,"html_url":"https://github.com/kovszilard/easy-config","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"purl":"pkg:github/kovszilard/easy-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovszilard%2Feasy-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovszilard%2Feasy-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovszilard%2Feasy-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovszilard%2Feasy-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kovszilard","download_url":"https://codeload.github.com/kovszilard/easy-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovszilard%2Feasy-config/sbom","scorecard":{"id":568703,"data":{"date":"2025-08-11","repo":{"name":"github.com/kovszilard/easy-config","commit":"9da077af155c649ab4cad65eae05e55ffeb1fb5f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T15:43:35.091Z","repository_id":57720818,"created_at":"2025-08-20T15:43:35.092Z","updated_at":"2025-08-20T15:43:35.092Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["12-factor","configuration","configuration-management","scala"],"created_at":"2026-01-12T11:37:53.886Z","updated_at":"2026-01-12T11:37:53.936Z","avatar_url":"https://github.com/kovszilard.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Easy Config\n[![Build Status](https://travis-ci.org/kovszilard/easy-config.svg?branch=master)](https://travis-ci.org/kovszilard/easy-config)\n[![Maven central](https://img.shields.io/maven-central/v/com.github.kovszilard/easy-config_2.12)](https://search.maven.org/search?q=com.github.kovszilard.easy-config)\n[![Tweet](https://img.shields.io/twitter/url?style=social\u0026url=https%3A%2F%2Fgithub.com%2Fkovszilard%2Feasy-config)](https://twitter.com/intent/tweet?text=Wow:\u0026url=https%3A%2F%2Fgithub.com%2Fkovszilard%2Feasy-config)\n[![Twitter follow](https://img.shields.io/twitter/follow/kovszilard?style=social)](https://twitter.com/intent/follow?screen_name=kovszilard)\n\nEasy Config makes Scala application configuration extremely easy. It reads configuration from the environment or command line arguments.\n\n## Features\n\n* You define a case class for your configuration, and Easy Config gives you an instance. That's it.\n* Reads default value from the case class if environment variable or command line argument is not present.\n* Environment variables can be overridden by command line arguments.\n* Can parse most common types, including Options and Lists.\n* Has a `Secret` data type for storing secret values. It prevents accidental printing or logging of the secret value.\n* Returns help message for command line arguments `-h` and `--help`.\n* Returns help message if the configuration is not present or malformed.\n* Nested configurations are not supported yet.\n\n\n## Usage\n\nInclude it in your project by adding the following to your build.sbt:\n\n```scala\nlibraryDependencies += \"com.github.kovszilard\" %% \"easy-config\" % \"0.2.1\"\n```\n\nRequest configuration or a help String if something goes wrong.\n\n```scala\nimport easyconfig._\n\nobject MyApp extends App {\n\n  case class Config(foo: Int, bar: String, baz: Option[List[Int]] = None)\n\n  val config = easyConfig[Config](args)\n\n  config.fold(\n    help =\u003e println(help),\n    config =\u003e //do something with the configuration\n      println(s\"Configuration: $config\")\n  )\n\n}\n```\n\n## Field name conversions\n\n### Environment variables\n\nSimple lower case fields are expected to be all uppercase environment variables. For example, field `name` expected to be `NAME` in the environment.\n\nCamel cased fields are expected to be all uppercase environment variables with an underscore before each uppercase letter. For example, field `firstName` expected to be `FIRST_NAME` or `customerFirstName` expected to be `CUSTOMER_FIRST_NAME` in the environment.\n\n### Command line arguments\n\nSimple lower case fields are expected to be the same with trailing double dashes. For example, field `name` expected to be `--name` in command line arguments.\n\nCamel cased fields are expected to be all lowercase letters with trailing double dashes and a dash before each uppercase letter. For example, field `firstName` expected to be `--first-name` or `customerFirstName` expected to be `--customer-first-name` in command line arguments.\n\n## Configuration precedence\n\nCase class default values \u003c Environment variables \u003c Command line arguments\n\nDefault values defined on the case class are overridden by environment variables. In addition, command line arguments override configuration provided in the environment.\n\n## Parsing\n\n### Arguments separated with spaces\n\nYou can define `fullName` in the environment as `FULL_NAME=\"John Smith\"`.\n\nOr, in command line as `--full-name \"John Smith\"`\n\n### Lists\n\nLists are separated by commas. In the environment `FRUITS=\"apple,banana\"`\n\nOr, in command line as `--fruits apple,banana`\n\nNOTE: trailing spaces are included, so `FRUITS=\"apple, banana\"` or `--fruits apple, banana` will become `List(\"apple\", \" banana\")`.\n\n\n### Creating parsers\n\nIn case you have a not supported data type or you want to parse differently than Easy Config does it, then you have to create a parser for yourself. Luckily it is very easy, just define an implicit Parser instance using the `createParser` method. `createParser` takes a function from `String` to `Try[A]`, where `A` is your data type.\n\nSee an examples below:\n\n```scala\nimport scala.util.Try\nimport easyconfig._\nimport easyconfig.Parser\nimport easyconfig.Parser.createParser\n\nobject CustomParser extends App {\n\n  case class Name(first: String, last: String)\n\n  implicit val nameParser: Parser[Name] = createParser{ str =\u003e\n    Try{\n      val fullname = str.split(\" \")\n      Name(fullname(0), fullname(1))\n    }\n  }\n\n  case class Config(name: Name)\n\n  val config = easyConfig[Config](args)\n\n  config.fold(\n    help =\u003e println(help),\n    config =\u003e //do something with the configuration\n      println(s\"Configuration: $config\\n\")\n  )\n}\n```\n\n## Using `Secret`\n\n```scala\nimport easyconfig._\n\nobject Secret extends App {\n\n  case class Config(password: Secret)\n\n  val config = easyConfig[Config](args)\n\n  config.fold(\n    help =\u003e println(help),\n    config =\u003e\n      println(s\"Printing or logging the configuration won't reveal the secret: $config\\n\" +\n              s\"Secret can be revealed by explicitly calling secretValue: ${config.password.secretValue}\")\n  )\n\n}\n\n```\n\n## Do you like this project? ❤️\n\nPlease give it a star. It is just one click for you and it keeps me motivated to write open source tools like this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkovszilard%2Feasy-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkovszilard%2Feasy-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkovszilard%2Feasy-config/lists"}