{"id":15984771,"url":"https://github.com/jaredreisinger/asp","last_synced_at":"2025-11-05T19:02:36.140Z","repository":{"id":61625355,"uuid":"540495319","full_name":"JaredReisinger/asp","owner":"JaredReisinger","description":"asp, the Automatic Settings Provider, an opinionated companion for `viper` and `cobra`.","archived":false,"fork":false,"pushed_at":"2023-11-17T12:51:53.000Z","size":179,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-10T05:26:17.348Z","etag":null,"topics":["12-factor","cli","cobra","go","viper"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/jaredreisinger/asp","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JaredReisinger.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-23T15:06:53.000Z","updated_at":"2024-02-06T17:08:21.000Z","dependencies_parsed_at":"2024-06-20T13:59:52.073Z","dependency_job_id":"a9d7647e-3ac6-4bb0-876d-7b3dd390bf62","html_url":"https://github.com/JaredReisinger/asp","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredReisinger%2Fasp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredReisinger%2Fasp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredReisinger%2Fasp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredReisinger%2Fasp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JaredReisinger","download_url":"https://codeload.github.com/JaredReisinger/asp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249608,"owners_count":20908211,"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":["12-factor","cli","cobra","go","viper"],"created_at":"2024-10-08T02:10:28.886Z","updated_at":"2025-11-05T19:02:36.128Z","avatar_url":"https://github.com/JaredReisinger.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asp — Automatic Settings Processor\n\n[![Go reference](https://img.shields.io/badge/pkg.go.dev-jaredreisinger/asp-007D9C?logo=go\u0026logoColor=white\u0026style=flat-square)](https://pkg.go.dev/github.com/jaredreisinger/asp)\n![Go version](https://img.shields.io/github/go-mod/go-version/jaredreisinger/asp?logo=go\u0026logoColor=white\u0026style=flat-square)\n[![GitHub build](https://img.shields.io/github/actions/workflow/status/jaredreisinger/asp/pipeline.yaml?branch=main\u0026logo=github\u0026style=flat-square)](https://github.com/jaredreisinger/asp/actions/workflows/pipeline.yaml)\n[![Codecov](https://img.shields.io/codecov/c/github/jaredreisinger/asp?logo=codecov\u0026label=codedov\u0026style=flat-square)](https://codecov.io/gh/JaredReisinger/asp)\n[![License](https://img.shields.io/github/license/jaredreisinger/asp?style=flat-square)](https://github.com/JaredReisinger/asp/blob/main/LICENSE)\n\n`asp`, the Automatic Settings Provider, an opinionated companion for `viper` and `cobra`.\n\n- [Getting started](https://github.com/JaredReisinger/asp/blob/main/docs/01-getting-started.md)\n- [Config processing](https://github.com/JaredReisinger/asp/blob/main/docs/02-config-processing.md)\n- [Defaults](https://github.com/JaredReisinger/asp/blob/main/docs/03-defaults.md)\n- [Options](https://github.com/JaredReisinger/asp/blob/main/docs/04-options.md)\n- [Config tags](https://github.com/JaredReisinger/asp/blob/main/docs/05-config-tags.md)\n\n## Why does this exist?\n\nThe `cobra` package provides excellent command-line flag functionality, and `viper` provides a rich configuration store and environment variable binding… _but_… there’s a lot of boilerplate and redundant code if you want to achieve the nirvana of CLI flags and environment variables _and_ configuration file support for _**all**_ flags/settings in your application. The `asp` package attempts to reduce this boilerplate by capturing it all from your “canonical” configure structure definition.\n\nThe goals of `asp` are to\n\n1. reduce the redundant boilerplate by concisely defining all of the necessary information in the config struct itself;\n\n2. encourage good practices by ensuring that _every_ option has config, command-line _and_ environment variable representation;\n\n3. avoid possible typos that using string-based configuration lookups can cause—Go can’t tell that `viper.Get(\"sommeSetting\")` is misspelled at compile time—but it _can_ tell that `config.sommeSetting` is invalid if the struct defines the member as `config.someSetting`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredreisinger%2Fasp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredreisinger%2Fasp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredreisinger%2Fasp/lists"}