{"id":22494526,"url":"https://github.com/apurebase/arkenv","last_synced_at":"2025-08-03T01:33:11.896Z","repository":{"id":47577334,"uuid":"152605418","full_name":"aPureBase/arkenv","owner":"aPureBase","description":"Type-safe Kotlin configuration by delegates","archived":false,"fork":false,"pushed_at":"2022-01-17T19:10:38.000Z","size":846,"stargazers_count":17,"open_issues_count":7,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-07-27T12:06:14.307Z","etag":null,"topics":["cli","command-line","configuration","environment-variables","kotlin"],"latest_commit_sha":null,"homepage":"https://arkenv.io/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aPureBase.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2018-10-11T14:29:52.000Z","updated_at":"2022-10-03T16:31:24.000Z","dependencies_parsed_at":"2022-07-22T06:18:02.497Z","dependency_job_id":null,"html_url":"https://github.com/aPureBase/arkenv","commit_stats":null,"previous_names":[],"tags_count":12,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aPureBase%2Farkenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aPureBase%2Farkenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aPureBase%2Farkenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aPureBase%2Farkenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aPureBase","download_url":"https://codeload.github.com/aPureBase/arkenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228516721,"owners_count":17932440,"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":["cli","command-line","configuration","environment-variables","kotlin"],"created_at":"2024-12-06T19:14:43.178Z","updated_at":"2024-12-06T19:14:44.013Z","avatar_url":"https://github.com/aPureBase.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maven Central](https://img.shields.io/maven-central/v/com.apurebase/arkenv.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.apurebase%22%20AND%20a:%22arkenv%22)\n[![Tests](https://github.com/aPureBase/arkenv/actions/workflows/tests.yml/badge.svg)](https://github.com/aPureBase/arkenv/actions/workflows/tests.yml)\n[![Pipelines](https://gitlab.com/apurebase/arkenv/badges/master/coverage.svg)](https://gitlab.com/apurebase/arkenv/commits/master)\n[![Chat](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://kotlinlang.slack.com/messages/CGF74HD19/)\n[![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin)\n\n\u003cimg src=\"/docs/arkenv_logo.png?raw=true\" width=\"200\"\u003e\n\nType-safe Kotlin configuration `by` delegates. \n\nSupports the most common external configuration sources, including: \n* [Command line](https://arkenv.io/features/command-line/)\n* [Environment Variables](https://arkenv.io/features/environment-variables/)\n* [Properties](https://arkenv.io/features/properties/), [Yaml](https://arkenv.io/features/yaml/), and Spring-like [profiles](https://arkenv.io/features/profiles/)\n* [`.env` files](https://arkenv.io/features/dot-env-files/)\n\n\n### 📦 Installation\nAdd [Maven Central](https://search.maven.org/search?q=arkenv) to your repositories and add Arkenv in Gradle:\n\n```groovy\nrepositories { mavenCentral() }\nimplementation \"com.apurebase:arkenv:$arkenv_version\"\nimplementation \"com.apurebase:arkenv-yaml:$arkenv_version\" // for yaml support\n```\n\n### 🔨 Usage\n\n#### 1. Define your arguments with the `argument` delegate.\n```kotlin\nobject Arguments {\n    val port: Int by argument()\n}\n```\n\nor use constructor injection:\n```kotlin\nclass Arguments(val port: Int)\n```\n\n#### 2. Parse your arguments.\n\n```kotlin\nfun main(args: Array\u003cString\u003e) {\n    Arkenv.parse(Arguments, args) // object or existing instance\n    Arkenv.parse\u003cArguments\u003e(args) // constructor injection \n}\n```\n\nYou can specify additional custom names for each `argument`.\n\nThe property's name is used as a fallback.\n\nBy default, Arkenv supports parsing command line arguments,\nenvironment variables, and profiles.\n\n\nIn the case of `port`, you can parse it like this:\n* From command line with `--port 443`\n* As an environment variable `PORT=80`\n* In a profile, like `application-dev.properties`, add `port=5000` \n\n \n\nTo get started, we recommend reading about [the basics](https://arkenv.io/guides/the-basics) \nfor a quick tour of what's included. \n\n\n### 📃 Documentation\nPlease visit [https://arkenv.io/](https://arkenv.io/) for in-depth documentation.\n\n### 🤝 Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) \n\n##### Slack\nFind the Arkenv channel in the [official Kotlin Slack](https://kotlinlang.slack.com/messages/CGF74HD19/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapurebase%2Farkenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapurebase%2Farkenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapurebase%2Farkenv/lists"}