{"id":24071275,"url":"https://github.com/pony-ci/sfdx-node","last_synced_at":"2025-04-28T13:05:35.810Z","repository":{"id":41668037,"uuid":"254388202","full_name":"pony-ci/sfdx-node","owner":"pony-ci","description":"Execute SFDX commands in node.","archived":false,"fork":false,"pushed_at":"2023-01-09T16:54:23.000Z","size":411,"stargazers_count":5,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-28T13:04:36.448Z","etag":null,"topics":["cli","node","nodejs","salesforce","salesforcedx","sfdx","sfdx-cli"],"latest_commit_sha":null,"homepage":"","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/pony-ci.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":"2020-04-09T14:06:09.000Z","updated_at":"2023-06-29T11:20:14.000Z","dependencies_parsed_at":"2023-02-08T13:01:50.952Z","dependency_job_id":null,"html_url":"https://github.com/pony-ci/sfdx-node","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/pony-ci%2Fsfdx-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pony-ci%2Fsfdx-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pony-ci%2Fsfdx-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pony-ci%2Fsfdx-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pony-ci","download_url":"https://codeload.github.com/pony-ci/sfdx-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251319610,"owners_count":21570426,"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":["cli","node","nodejs","salesforce","salesforcedx","sfdx","sfdx-cli"],"created_at":"2025-01-09T16:39:55.168Z","updated_at":"2025-04-28T13:05:35.750Z","avatar_url":"https://github.com/pony-ci.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sfdx-node\n\n[![CircleCI](https://circleci.com/gh/pony-ci/sfdx-node.svg?style=svg)](https://circleci.com/gh/pony-ci/sfdx-node)\n[![npm](https://badge.fury.io/js/%40pony-ci%2Fsfdx-node.svg)](https://badge.fury.io/js/%40pony-ci%2Fsfdx-node)\n[![License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/pony-ci/sfdx-node/blob/master/LICENSE)\n\nExecute sfdx commands in node.  \nThe sfdx-cli itself doesn't have to be installed.\n\n## Usage\nAll commands are asynchronous.\n```javascript\n// run tests\nawait sfdx.force.apex.test.run({targetusername: 'username'});\n\n// set default username\nawait sfdx.force.config.set({}, 'defaultusername=username');\n\n// set global default username\nawait sfdx.force.config.set({global: true}, 'defaultusername=username');\n\n// suppress stdout and stderr\nawait sfdx.force.config.set({quiet: true}, 'defaultusername=username');\n```\n\n## SFDX Plugins\nThis module includes the `force` plugin by default.\nYou can override this plugin with a different version or even add support for other plugins.\nTo add or override plugin, add node module containing the commands into dependencies in your `package.json` file.\nThen register the commands using `registerNamespace` function.\n```javascript\n// override force plugin\nconst FORCE_PATH = path.dirname(require.resolve('salesforce-alm'));\nregisterNamespace({\n    commandsDir: path.join(FORCE_PATH, 'commands'),\n    namespace: 'force'\n});\n\n// add custom plugin\nconst PLUGIN_PATH = path.dirname(require.resolve('my-plugin-module'));\nregisterNamespace({\n    commandsDir: path.join(PLUGIN_PATH, 'commands'),\n    namespace: 'namespace'\n});\n``` \n\nRequirements for plugins.\n* Commands must be in the `\u003ccommandsDir\u003e/\u003cnamespace\u003e/` directory.  \n* Each command file must contain one of the following:  \n    * default export of a class extending `SfdxCommand`\n    * export of a class extending the ToolbeltCommand and its name must be in camel case, \n    without namespace name and with `Command` suffix,\n    e.g. `OrgCreateCommand` for `force/org/create.js` file where `force` is a namespace.  \n\nEven some first versions of force commands don't fulfil these requirements.  \n\n## License\nThis software is released under the [MIT License](https://github.com/pony-ci/sfdx-node/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpony-ci%2Fsfdx-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpony-ci%2Fsfdx-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpony-ci%2Fsfdx-node/lists"}