{"id":20077555,"url":"https://github.com/digitaledgeit/npm-cmd","last_synced_at":"2025-05-05T22:31:01.237Z","repository":{"id":57221798,"uuid":"38788009","full_name":"digitaledgeit/npm-cmd","owner":"digitaledgeit","description":"An API to execute `npm` commands programmatically.","archived":false,"fork":false,"pushed_at":"2015-09-10T02:17:06.000Z","size":132,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-17T14:43:12.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitaledgeit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-09T00:48:20.000Z","updated_at":"2019-10-14T23:49:10.000Z","dependencies_parsed_at":"2022-08-29T04:10:15.998Z","dependency_job_id":null,"html_url":"https://github.com/digitaledgeit/npm-cmd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fnpm-cmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fnpm-cmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fnpm-cmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fnpm-cmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitaledgeit","download_url":"https://codeload.github.com/digitaledgeit/npm-cmd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252586023,"owners_count":21772241,"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":[],"created_at":"2024-11-13T15:08:55.986Z","updated_at":"2025-05-05T22:31:00.905Z","avatar_url":"https://github.com/digitaledgeit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npm-cmd\n\nAn API to execute `npm` commands programmatically.\n\n## Installation\n\n    npm install --save npm-cmd\n    \n## Usage\n\n    var npm = require('npm-cmd');\n    \n    npm.install(['express', 'cookie-parser'], {save: true, cwd: '/tmp'}, function(err) {\n      if (err) {\n        console.log('Installation failed.');\n      } else {\n        console.log('Installation succeeded!'); \n      }       \n    });\n    \n## API\n\n### Methods\n\n#### .install(pkgs, opts, done)\n\nRun `npm install` where:\n\n- `pkgs` is an array of packages to install - optional\n\n- `opts` is an object of key-value pairs - optional\n- `opts.global` whether npm should install\n- `opts.save` whether npm should save the packages to the `dependencies` key in `package.json`\n- `opts.saveDev` whether npm should save the packages to the `devDependencies` key in `package.json`\n- `opts.registry` the registry which npm should source package information from\n\n- `done` is a function called when the command has finished - optional \n\n#### .dedupe(pkgs, opts, done)\n\nRun `npm dedupe` where:\n\n- `pkgs` is an array of packages to dedupe - optional\n- `opts` is an object of key-value pairs - optional\n- `done` is a function called when the command has finished - optional \n\n### Options\n\nGlobal options accepted by all commands:\n\n- `opts.cwd` is the directory where the command will be run","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaledgeit%2Fnpm-cmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitaledgeit%2Fnpm-cmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaledgeit%2Fnpm-cmd/lists"}