{"id":19188046,"url":"https://github.com/skeema/mybase","last_synced_at":"2025-07-23T17:06:44.559Z","repository":{"id":57486732,"uuid":"71206220","full_name":"skeema/mybase","owner":"skeema","description":"CLI framework with MySQL-like option handling","archived":false,"fork":false,"pushed_at":"2025-05-27T16:32:53.000Z","size":202,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-27T17:25:08.205Z","etag":null,"topics":["cli","command-line-parser","golang","mysql"],"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/skeema.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-10-18T03:39:57.000Z","updated_at":"2025-05-27T16:32:57.000Z","dependencies_parsed_at":"2024-11-09T11:25:10.381Z","dependency_job_id":"92b8210a-0453-4a12-9bf9-a17074c4aefa","html_url":"https://github.com/skeema/mybase","commit_stats":null,"previous_names":["skeema/mycli"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/skeema/mybase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeema%2Fmybase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeema%2Fmybase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeema%2Fmybase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeema%2Fmybase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skeema","download_url":"https://codeload.github.com/skeema/mybase/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeema%2Fmybase/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266717709,"owners_count":23973384,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","command-line-parser","golang","mysql"],"created_at":"2024-11-09T11:23:02.499Z","updated_at":"2025-07-23T17:06:44.535Z","avatar_url":"https://github.com/skeema.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mybase\n\n[![build status](https://img.shields.io/github/actions/workflow/status/skeema/mybase/tests.yml?branch=main)](https://github.com/skeema/mybase/actions)\n[![godoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/skeema/mybase)\n[![latest release](https://img.shields.io/github/release/skeema/mybase.svg)](https://github.com/skeema/mybase/releases)\n\nA light-weight Golang framework for building command-line applications, with MySQL-like option handling\n\n## Features\n\n* Options may be provided via POSIX-style CLI flags (long or short) and/or ini-style option files\n* Intentionally does *not* support the golang flag package's single-dash long args (e.g. \"-bar\" is not equivalent to \"--bar\")\n* Multiple option files may be used, with cascading overrides\n* Ability to determine which source provided any given option (e.g. CLI vs a specific option file vs default value)\n* Supports command suites / subcommands, including nesting\n* Extensible to other option file formats/sources via a simple one-method interface\n* Automatic help/usage flags and subcommands\n* Few external dependencies\n\n## Motivation\n\nUnlike other Go CLI packages, mybase attempts to provide MySQL-like option parsing on the [command-line](http://dev.mysql.com/doc/refman/5.6/en/command-line-options.html) and in [option files](http://dev.mysql.com/doc/refman/5.6/en/option-files.html). In brief, this means:\n\n* In option names, underscores are automatically converted to dashes.\n* Boolean options may have their value omitted to mean true (\"--foo\" means \"--foo=true\"). Meanwhile, falsey values include \"off\", \"false\", and \"0\".\n* Boolean option names may be [modified](http://dev.mysql.com/doc/refman/5.6/en/option-modifiers.html) by a prefix of \"skip-\" or \"disable-\" to negate the option (\"--skip-foo\" is equivalent to \"--foo=false\")\n* If an option name is prefixed with \"loose-\", it isn't an error if the option doesn't exist; it will just be ignored. This allows for backwards-compatible / cross-version option files.\n* The -h short option is *not* mapped to help (instead help uses -? for its short option). This allows -h to be used for --host if desired.\n* String-type short options may be configured to require arg (format \"-u root\" with a space) or have optional arg (format \"-psecret\" with no space, or \"-p\" alone if no arg / using default value or boolean value).\n* Boolean short options may be combined (\"-bar\" will mean \"-b -a -r\" if all three are boolean options).\n\nFull compatibility with MySQL's option semantics is not guaranteed. Please open a GitHub issue if you encounter specific incompatibilities.\n\nMySQL is a trademark of Oracle Corp.\n\n## Status\n\nmybase has reached v1 and now has a stable API with backwards-compatibility guarantee. However, documentation, generic examples, and more thorough test coverage still need to be written. For now, see the [Skeema codebase](http://github.com/skeema/skeema) for a canonical example using all features of mybase.\n\n### Future development\n\nThe following features are **not** yet implemented, but are planned for future releases:\n\n* Env vars as an option source\n* Additional ways to get config option values: floating-point, IP address, bool count of repeated option\n* API for re-reading all option files that have changed\n* Command aliases\n\nUnit test coverage of mybase is still incomplete; code coverage is currently around 68%. This will be improved in future releases.\n\n## Credits\n\nCreated and maintained by [@evanelias](https://github.com/evanelias).\n\nAdditional [contributions](https://github.com/skeema/mybase/graphs/contributors) by:\n\n* [@zls0424](https://github.com/zls0424)\n* [@gusgins](https://github.com/gusgins)\n\n## License\n\n**Copyright 2025 Skeema LLC and the Skeema authors**\n\n```text\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskeema%2Fmybase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskeema%2Fmybase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskeema%2Fmybase/lists"}