{"id":15736154,"url":"https://github.com/rwxrob/conf","last_synced_at":"2025-03-13T07:32:08.310Z","repository":{"id":42049489,"uuid":"480330971","full_name":"rwxrob/conf","owner":"rwxrob","description":"🌳 Go YAML/JSON Configuration, centralized management of configuration data for all the commands composed into your Bonzai tree","archived":false,"fork":false,"pushed_at":"2022-11-17T18:02:38.000Z","size":116,"stargazers_count":2,"open_issues_count":7,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-11T01:41:41.740Z","etag":null,"topics":["bonzai","configuration","go","golang","json","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","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/rwxrob.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"rwxrob","patreon":"rwxrob","custom":["https://twitch.tv/rwxrob","https://youtube.com/rwxrob"]}},"created_at":"2022-04-11T10:26:30.000Z","updated_at":"2023-02-07T17:17:26.000Z","dependencies_parsed_at":"2022-08-12T03:21:00.864Z","dependency_job_id":null,"html_url":"https://github.com/rwxrob/conf","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwxrob%2Fconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwxrob%2Fconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwxrob%2Fconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwxrob%2Fconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwxrob","download_url":"https://codeload.github.com/rwxrob/conf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221349724,"owners_count":16802687,"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":["bonzai","configuration","go","golang","json","yaml"],"created_at":"2024-10-04T01:21:18.242Z","updated_at":"2024-10-24T21:05:10.079Z","avatar_url":"https://github.com/rwxrob.png","language":"Go","funding_links":["https://github.com/sponsors/rwxrob","https://patreon.com/rwxrob","https://twitch.tv/rwxrob","https://youtube.com/rwxrob"],"categories":[],"sub_categories":[],"readme":"# 🌳 Go YAML/JSON Configuration\n\n![Go\nVersion](https://img.shields.io/github/go-mod/go-version/rwxrob/conf)\nCoding simple !go function to grab current !k8s context[![GoDoc](https://godoc.org/github.com/rwxrob/conf?status.svg)](https://godoc.org/github.com/rwxrob/conf)\n[![License](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](LICENSE)\n\nThis `conf` Bonzai branch is for safely managing any configuration as\nsingle, local YAML/JSON using industry standards for local configuration\nand system-safe writes. Use it to add a `conf` subcommand to any other\nBonzai command, or to your root Bonzai tree (`z`). All commands that use\n`conf` that are composed into a single binary, no matter where in the\ntree, will use the same local conf file even though the position\nwithin the file will be qualified by the tree location.\n\nBy default, importing `conf` will assigned a new implementation of\n`bonzai.Configurer` to `Z.Conf` (satisfying any `Z.Cmd` requirement for\nconfiguration) and will use the name of the binary (`Z.ExeName`) as the\ndirectory name within `os.UserConfDir` with a `config.yaml` file name.\nTo override this behavior, create a new `pkd/conf.Conf` struct assign\n`Id`, `Dir` and `File`, and then assign that to `Z.Conf`.\n\n## Install\n\nThis command can be installed as a standalone program (for combined use\nwith shell scripts perhaps) or composed into a Bonzai command tree.\n\nStandalone\n\n```\ngo install github.com/rwxrob/conf/cmd/conf@latest\n```\n\nComposed\n\n```go\npackage z\n\nimport (\n\tZ \"github.com/rwxrob/bonzai/z\"\n\t\"github.com/rwxrob/conf\"\n)\n\nvar Cmd = \u0026bonzai.Cmd{\n\tName:     `z`,\n\tCommands: []*Z.Cmd{help.Cmd, conf.Cmd},\n}\n```\n\nNote conf is designed to be composed only in monolith mode (not\nmulticall binary).\n\n## Tab Completion\n\nTo activate bash completion just use the `complete -C` option from your\n`.bashrc` or command line. There is no messy sourcing required. All the\ncompletion is done by the program itself.\n\n```\ncomplete -C conf conf\n```\n\nIf you don't have bash or tab completion check use the shortcut\ncommands instead.\n\n## Embedded Documentation\n\nAll documentation (like manual pages) has been embedded into the source\ncode of the application. See the source or run the program with help to\naccess it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwxrob%2Fconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwxrob%2Fconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwxrob%2Fconf/lists"}