{"id":20102811,"url":"https://github.com/homecarehomebase/azcli-npm","last_synced_at":"2026-05-18T19:34:08.584Z","repository":{"id":78076990,"uuid":"157921082","full_name":"HomecareHomebase/azcli-npm","owner":"HomecareHomebase","description":"node module wrapper around azure cli 2.x","archived":false,"fork":false,"pushed_at":"2019-03-20T18:10:18.000Z","size":269,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-17T00:39:42.804Z","etag":null,"topics":["azure","azure-cli","npm-module"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/HomecareHomebase.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2018-11-16T21:04:36.000Z","updated_at":"2019-03-20T18:10:19.000Z","dependencies_parsed_at":"2023-07-31T01:01:48.443Z","dependency_job_id":null,"html_url":"https://github.com/HomecareHomebase/azcli-npm","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.038461538461538436","last_synced_commit":"42bc52ade1aeaed64bff9fbb519a1c075ce14739"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/HomecareHomebase/azcli-npm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HomecareHomebase%2Fazcli-npm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HomecareHomebase%2Fazcli-npm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HomecareHomebase%2Fazcli-npm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HomecareHomebase%2Fazcli-npm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HomecareHomebase","download_url":"https://codeload.github.com/HomecareHomebase/azcli-npm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HomecareHomebase%2Fazcli-npm/sbom","scorecard":{"id":63075,"data":{"date":"2025-08-11","repo":{"name":"github.com/HomecareHomebase/azcli-npm","commit":"42bc52ade1aeaed64bff9fbb519a1c075ce14739"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"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":"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 1/25 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":"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":"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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"33 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6","Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-7xcx-6wjh-7xp2","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T02:06:37.772Z","repository_id":78076990,"created_at":"2025-08-15T02:06:37.772Z","updated_at":"2025-08-15T02:06:37.772Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273961056,"owners_count":25198510,"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-09-06T02:00:13.247Z","response_time":2576,"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":["azure","azure-cli","npm-module"],"created_at":"2024-11-13T17:33:08.606Z","updated_at":"2026-05-18T19:34:08.521Z","avatar_url":"https://github.com/HomecareHomebase.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# azcli-npm\n\n\u003e node module wrapper around azure cli 2.x\n\n[![npm](https://img.shields.io/npm/v/azcli-npm.svg)](https://www.npmjs.com/package/azcli-npm)\n\n## Install\n\n```bash\nnpm i -S azcli-npm\n```\n\n## Usage\n\nBasic usage and CLI version reporting\n\n```js\nimport azcli from 'azcli-npm'\n\nvar cli = new azcli()\nconsole.log(cli.getAzCliVersion())\n```\n\nSet configuration property overrides\n\n```js\nimport azcli from 'azcli-npm'\n\nvar cli = new azcli(\u003cIAzOptions\u003e {\n    minVersion: '2.0.0'\n    maxVersion: '2.1'\n    ignoreVersion: false\n})\n\nconsole.log(cli.getAzCliVersion())\n```\n\nLogin with a SP and secret\n\n```js\nimport azcli from 'azcli-npm';\n\nvar cli = new azcli()\ncli.login('\u003ctenant-id\u003e', '\u003cservice-id\u003e','\u003cservice-secret\u003e')\ncli.logout()\n```\n\nLogin with a SP and PEM certificate\n\n```js\nimport azcli from 'azcli-npm';\n\nvar cli = new azcli()\ncli.loginWithCert('\u003ctenant-id\u003e', '\u003cservice-id\u003e','\u003ccert-path\u003e')\ncli.logout()\n```\n\nSet Subscription\n\n```js\nimport azcli from 'azcli-npm';\n\nvar cli = new azcli()\ncli.login(...)\n   .setSubscription('\u003csubscription-name\u003e')\n   .logout()\n```\nList VMs via json object\n\n```js\nimport azcli from 'azcli-npm';\n\nvar cli = new azcli()\nvar results =\ncli.login(...)\n   .setSubscription(...)\n   .start()\n     .arg('vm')\n     .arg('list')\n   .execJson\u003cany\u003e()\n\nresults.forEach(function(element)=\u003e{\n    console.log(element.id)\n    console.log(element.name)\n    console.log(element.location)\n})\n\ncli.logout()\n```\n\n## Unit test/mocking\n\nIf you want to incoroporate this module into your unit tests we provide a built-in mocking system, or you can roll your own.\n\nTo roll your own create a class that implements ShellRunner and its constructor. Then just override all the public facing functions\n\n```js\nimport azcli, { ShellRunner, ShellRunnerType, IExecResults } from 'azcli-npm'\n\nexport class MyMock extends ShellRunner {\n    constructor(shellPath: string){\n        super(shellPath)\n    };\n}\n\n//Now you can use this class as the shell override type when creating a new cli()\nvar cli = new azcli(\u003cIAzOptions\u003e {\n    shellRunner: MyMock\n})\n```\n\nYou can instead use the built-in mocking system which provides helpers for setting expected response types for commands\n\n```js\nimport cli, { IAzOptions, IExecResults, \n  MockResponseTypes, MockRunner, MockResponse, MockResponseFunctions} 'azcli-npm'\n\nlet options = \u003cIAzOptions\u003e{ shellRunner: MockRunner}\nlet wrapper = MockResponse(options)\n\n//grab the cli instance injected with MockRunner\nlet runner = wrapper.cli\n\n//the mr object is used to inject responses before commands are executed\n//these functions return the cli instance so you can directly chain off it\nlet mr = wrapper.mr\n\n\n//now you can assign response objects before calling commands\n\n//this will be the result for the setSubscription() call\nmr.AddMockResponse( MockResponseTypes.justReturnCode ) //-\u003e returns wrapper.cli\n  .setSubscription('subscription with space')\n\n//this creates a custom result for the 'webapp list' cmd after\n let results = \n    mr.AddResponse(\u003cIExecResults\u003e{\n        code: 0, \n        stdout: JSON.stringify([{id: '/id'}]) \n    }) // -\u003e returns wrapper.cli so we can chain from it\n    .start()\n        .arg('webapp')\n        .arg('list')\n    .execJson\u003cany\u003e()\n\nconsole.log(results[0].id)\n\n//You can also use this without chaining if you have commands pre-wrapped\nmr.AddMockResponse( MockResponseTypes.justReturnCode )\nmr.AddMockResponse( MockResponseTypes.justReturnCode )\n\n//this chain will consume the two mock responses above\nrunner.login(...)\n      .setSubscription(...)\n\n```\n\n\n## Contributing\n\n[Contribution Guide](./CONTRIBUTING.md)\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomecarehomebase%2Fazcli-npm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhomecarehomebase%2Fazcli-npm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomecarehomebase%2Fazcli-npm/lists"}