{"id":25766669,"url":"https://github.com/jesperkristensen/forcecmd","last_synced_at":"2025-08-11T00:05:05.313Z","repository":{"id":4545227,"uuid":"21090822","full_name":"jesperkristensen/forcecmd","owner":"jesperkristensen","description":"A command-line tool for the Salesforce metadata API","archived":false,"fork":false,"pushed_at":"2025-06-28T11:32:49.000Z","size":176,"stargazers_count":39,"open_issues_count":8,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T06:35:27.698Z","etag":null,"topics":["javascript","nodejs","salesforce"],"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/jesperkristensen.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-06-22T10:16:24.000Z","updated_at":"2025-06-28T11:32:52.000Z","dependencies_parsed_at":"2025-06-28T12:36:47.066Z","dependency_job_id":null,"html_url":"https://github.com/jesperkristensen/forcecmd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jesperkristensen/forcecmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesperkristensen%2Fforcecmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesperkristensen%2Fforcecmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesperkristensen%2Fforcecmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesperkristensen%2Fforcecmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jesperkristensen","download_url":"https://codeload.github.com/jesperkristensen/forcecmd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesperkristensen%2Fforcecmd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269706722,"owners_count":24462222,"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-08-10T02:00:08.965Z","response_time":71,"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":["javascript","nodejs","salesforce"],"created_at":"2025-02-26T23:16:58.110Z","updated_at":"2025-08-11T00:05:05.289Z","avatar_url":"https://github.com/jesperkristensen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/jesperkristensen/forcecmd.svg?branch=master)](https://travis-ci.org/jesperkristensen/forcecmd)\n\nCommand line tool for the Salesforce metadata API\n========\n\nThis command line tool allows you to use the file based Salesforce metadata API\nto download and deploy your Org's configuration and code.\nThe tool will automatically build the required `package.xml` file for you\nand work around some bugs and limitations in the metadata API.\n\n## Installation\n\n1. Install Node.js from http://nodejs.org/.\n2. Open a command prompt / terminal.\n3. Run `npm install --global forcecmd`.\n\n## Set up an org\n\n1. Create an empty directory for your org.\n2. Create a new file in your org's directory named `forcecmd.json` with content like this:\n\n        {\n          \"hostname\": \"login.salesforce.com\",\n          \"username\": \"yourname@yourcompany.com\"\n        }\n\n3. Create a new file in your home directory (`~`) named `forcepw.json` with content like this:\n\n        {\n          \"passwords\": {\n            \"login.salesforce.com:yourname@yourcompany.com\": \"YourPasswordYourSecirityToken\"\n          }\n        }\n\n## Download an org\n\n1. Navigate your command prompt to your org's directory.\n2. Type `forcecmd retrieve`.\n\nAll metadata and all custom settings are downloaded by default. You can customize this in `forcecmd.json` like this:\n\n    {\n      \"apiVersion\": \"45.0\",\n      \"hostname\": \"login.salesforce.com\",\n      \"username\": \"yourname@yourcompany.com\",\n      \"excludeDirs\": [\"documents\"],\n      \"objects\": {\n        \"MyCustomSetting__c\": false,\n        \"Product2\": true,\n        \"Pricebook2\": [\"Id\", \"Name\", \"IsActive\"],\n        \"PricebookEntry\": \"select Product2Id, Pricebook2Id, UnitPrice from PricebookEntry where IsActive = true\"\n      }\n    }\n\nUse `forcecmd retrieve --verbose` to see what values are available to customize, or to debug issues finding the right password.\n\nUpon completion the tool will typically print a number of messages from the Metadata API indicating problems. This is normal. If the status is Succeeded, you can ignore the messages.\n\n## Deploy changes\n\n1. Navigate your command prompt to our org's directory.\n2. Type for example `forcecmd deploy src/classes/MyClass.cls src/objects/Account.object`.\n\nAdditional arguments:\n* `--destroy`: Delete all the listed files instead of updating them.\n* `'--options={\"rollbackOnError\":true}'`: Specify deployment options as documented on http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_deploy.htm#deploy_options\n* `--save-test-result`: Save test results (if tests are run) to a file named `TEST-result.xml` in JUnit format.\n* `--ignore-deploy-errors`: By default the process exits with an error code when the deployment fails. Use this argument to always exit with success no matter if the deployment was successful or not.\n* `--timed`: Show timestamps next to log messages.\n\n## Use with continous integration\n\nYou can use forcecmd together with a continuous integration tool and a version control system to backup and track changes to all your Salesforce organization's customizations (metadata), and to continously run all your Salesforce organization's unit tests.\n\nSee an [example of how to set this up completely in the cloud using GitHub](https://github.com/jesperkristensen/forcecmd-demo).\n\nSee an [example of how to set this up completely in the cloud using Azure DevOps](https://dev.azure.com/forcecmd/_git/forcecmd-demo).\n\n## Developing forcecmd\n\nTo set up development environment:\n\n1. Clone this repository.\n2. From the root of the cloned repository, run `npm install`.\n3. Replace `forcecmd` with `node path/to/this/tool/cli.js` when you use the tool.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesperkristensen%2Fforcecmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjesperkristensen%2Fforcecmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesperkristensen%2Fforcecmd/lists"}