{"id":23061813,"url":"https://github.com/rrwen/yargs-command-config","last_synced_at":"2026-05-01T09:31:43.603Z","repository":{"id":57403207,"uuid":"115750285","full_name":"rrwen/yargs-command-config","owner":"rrwen","description":"Yargs command for managing config files","archived":false,"fork":false,"pushed_at":"2018-01-22T02:42:51.000Z","size":1261,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-18T17:22:07.475Z","etag":null,"topics":["args","argument","bin","cli","command","config","default","edit","file","interface","json","line","manage","option","parser","parsing","path","save","settings","yargs"],"latest_commit_sha":null,"homepage":"https://rrwen.github.io/yargs-command-config","language":"JavaScript","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/rrwen.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":"2017-12-29T19:55:55.000Z","updated_at":"2018-01-08T05:01:49.000Z","dependencies_parsed_at":"2022-09-15T14:41:20.829Z","dependency_job_id":null,"html_url":"https://github.com/rrwen/yargs-command-config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rrwen/yargs-command-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fyargs-command-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fyargs-command-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fyargs-command-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fyargs-command-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrwen","download_url":"https://codeload.github.com/rrwen/yargs-command-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fyargs-command-config/sbom","scorecard":{"id":786769,"data":{"date":"2025-08-11","repo":{"name":"github.com/rrwen/yargs-command-config","commit":"d60253cf56329e00f619e9b24f673e0dadba2e15"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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-23T06:18:16.929Z","repository_id":57403207,"created_at":"2025-08-23T06:18:16.929Z","updated_at":"2025-08-23T06:18:16.929Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32492119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["args","argument","bin","cli","command","config","default","edit","file","interface","json","line","manage","option","parser","parsing","path","save","settings","yargs"],"created_at":"2024-12-16T03:18:33.328Z","updated_at":"2026-05-01T09:31:43.583Z","avatar_url":"https://github.com/rrwen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yargs-command-config\n\nRichard Wen  \nrrwen.dev@gmail.com  \n\n* [Documentation](https://rrwen.github.io/yargs-command-config)\n* [Changes](#changes)\n\nYargs command for managing config files\n\n[![npm version](https://badge.fury.io/js/yargs-command-config.svg)](https://badge.fury.io/js/yargs-command-config)\n[![Build Status](https://travis-ci.org/rrwen/yargs-command-config.svg?branch=master)](https://travis-ci.org/rrwen/yargs-command-config)\n[![Coverage Status](https://coveralls.io/repos/github/rrwen/yargs-command-config/badge.svg?branch=master)](https://coveralls.io/github/rrwen/yargs-command-config?branch=master)\n[![npm](https://img.shields.io/npm/dt/yargs-command-config.svg)](https://www.npmjs.com/package/yargs-command-config)\n[![GitHub license](https://img.shields.io/github/license/rrwen/yargs-command-config.svg)](https://github.com/rrwen/yargs-command-config/blob/master/LICENSE)\n[![Donate](https://img.shields.io/badge/donarbox-Donate-yellow.svg)](https://donorbox.org/rrwen)\n[![Twitter](https://img.shields.io/twitter/url/https/github.com/rrwen/yargs-command-config.svg?style=social)](https://twitter.com/intent/tweet?text=Yargs%20command%20for%20managing%20config%20files:%20https%3A%2F%2Fgithub.com%2Frrwen%2Fyargs-command-config%20%23nodejs%20%23npm)\n\n## Install\n\n1. Install [Node.js](https://nodejs.org/en/) \n2. Install [yargs](https://www.npmjs.com/package/yargs) and [yargs-command-config](https://www.npmjs.com/package/yargs-command-config) via `npm `\n\n```\nnpm install --save yargs yargs-command-config\n```\n\nFor the latest developer version, see [Developer Install](#developer-install).\n\n## Usage\n\nCreate a file named `bin.js` with the following contents:\n\n```javascript\nvar yargs = require('yargs');\n\n// (config) Load command with path to config JSON file\n// Replace './path/to/config.json' with your config JSON file\nvar config = require('yargs-command-config')({file: './path/to/config.json'});\n\n// (yargs) Add command to manage config file\nvar argv = yargs.command(config).argv;\n```\n\nDisplay help options for `bin.js` using [node](https://nodejs.org/api/cli.html):\n\n```\nnode bin.js config help\n```\n\nThe following will be displayed:\n\n```\nbin config \u003ctask\u003e [key] [value] [--config]\n\nmanage default config\n\n\u003ctask\u003e is one of:\n\n* set\n* delete\n* view\n* clear\n* reset\n\nSet option to value\n\u003e set [key] [value]\n\nRemove default option\n\u003e delete [key]\n\nView default options\n\u003e view\n\nClear default options\n\u003e clear\n\nReset default options\n\u003e reset\n\nManage other config file\n\u003e set [key] [value] --config other.json\n\u003e delete [key] --config other.json\n\u003e view --config other.json\n\u003e clear --config other.json\n\u003e reset --config other.json\n\nOptions:\n\t--help\tShow help\t[boolean]\n```\n\nDefault config files are managed with the commands below:\n\n```\nnode bin.js config view\nnode bin.js config clear\nnode bin.js config reset\nnode bin.js config set key value\nnode bin.js config delete key\n```\n\nOther config files are managed by passing a path in the option `--config`:\n\n```\nnode bin.js config view --config config.json\nnode bin.js config clear --config config.json\nnode bin.js config reset --config config.json\nnode bin.js config set key value --config config.json\nnode bin.js config delete key --config config.json\n```\n\nSee [Documentation](https://rrwen.github.io/yargs-command-config) for more details.\n\n## Contributions\n\n### Report Contributions\n\nReports for issues and suggestions can be made using the [issue submission](https://github.com/rrwen/yargs-command-config/issues) interface.\n\nWhen possible, ensure that your submission is:\n\n* **Descriptive**: has informative title, explanations, and screenshots\n* **Specific**: has details of environment (such as operating system and hardware) and software used\n* **Reproducible**: has steps, code, and examples to reproduce the issue\n\n### Code Contributions\n\nCode contributions are submitted via [pull requests](https://help.github.com/articles/about-pull-requests/):\n\n1. Ensure that you pass the [Tests](#tests)\n2. Create a new [pull request](https://github.com/rrwen/yargs-command-config/pulls)\n3. Provide an explanation of the changes\n\nA template of the code contribution explanation is provided below:\n\n```\n## Purpose\n\nThe purpose can mention goals that include fixes to bugs, addition of features, and other improvements, etc.\n\n## Description\n\nThe description is a short summary of the changes made such as improved speeds or features, and implementation details.\n\n## Changes\n\nThe changes are a list of general edits made to the files and their respective components.\n* `file_path1`:\n\t* `function_module_etc`: changed loop to map\n\t* `function_module_etc`: changed variable value\n* `file_path2`:\n\t* `function_module_etc`: changed loop to map\n\t* `function_module_etc`: changed variable value\n\n## Notes\n\nThe notes provide any additional text that do not fit into the above sections.\n```\n\nFor more information, see [Developer Install](#developer-install) and [Implementation](#implementation).\n\n## Developer Notes\n\n### Developer Install\n\nInstall the latest developer version with `npm` from github:\n\n```\nnpm install git+https://github.com/rrwen/yargs-command-config\n```\n  \nInstall from `git` cloned source:\n\n1. Ensure [git](https://git-scm.com/) is installed\n2. Clone into current path\n3. Install via `npm`\n\n```\ngit clone https://github.com/rrwen/yargs-command-config\ncd yargs-command-config\nnpm install\n```\n\n### Tests\n\n1. Clone into current path `git clone https://github.com/rrwen/yargs-command-config`\n2. Enter into folder `cd yargs-command-config`\n3. Ensure [devDependencies](https://docs.npmjs.com/files/package.json#devdependencies) are installed and available\n4. Run tests\n5. Results are saved to [tests/log](tests/log) with each file corresponding to a version tested\n\n```\nnpm install\nnpm test\n```\n\n### Documentation\n\nUse [documentationjs](https://www.npmjs.com/package/documentation) to generate html documentation in the `docs` folder:\n\n```\nnpm run docs\n```\n\nSee [JSDoc style](http://usejsdoc.org/) for formatting syntax.\n\n### Upload to Github\n\n1. Ensure [git](https://git-scm.com/) is installed\n2. Inside the `yargs-command-config` folder, add all files and commit changes\n3. Push to github\n\n```\ngit add .\ngit commit -a -m \"Generic update\"\ngit push\n```\n\n### Upload to npm\n\n1. Update the version in `package.json`\n2. Run tests and check for OK status\n3. Generate documentation\n4. Login to npm\n5. Publish to npm\n\n```\nnpm test\nnpm run docs\nnpm login\nnpm publish\n```\n\n### Implementation\n\nThe module [yargs-command-config](https://www.npmjs.com/package/yargs-command-config) uses the following npm packages for its implementation:\n\nnpm | Purpose\n--- | ---\n[yargs](https://www.npmjs.com/package/yargs) | Manage command line arguments and options\n[fs](https://nodejs.org/api/fs.html) | Read and write [JSON](https://www.json.org/) config files\n\n```\n yargs  \u003c-- CLI arguments\n   |\n  fs    \u003c-- JSON config files\n```\n\n### Changes\n\n#### v1.0.1\n\n* Defaults for `options.task.file` and `[--file]` are now `options.task.config` and `[--config]` respectively\n\n#### v1.0.0\n\n* Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrwen%2Fyargs-command-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrwen%2Fyargs-command-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrwen%2Fyargs-command-config/lists"}