---
title: Deployment – Command Line Interface (CLI) via SF CLI
description: "???? PDF Butler deployment goes SF CLI! You might say, why go command line? There are many reasons: 1) Automate deployment scripts 2) Integration with deployment tools (CI/CD) 3) Script setup of Sandbox or Scratch Org 4) Versioning with eg…"
url: "https://pdfbutler.com/academy/pdf-butler-academy/pdf-butler-deployment/deployment-command-line-interface-cli-via-sf-cli/"
updated: "2024-09-23"
category: PDF BUTLER DEPLOYMENT
---

# Deployment – Command Line Interface (CLI) via SF CLI

???? PDF Butler deployment goes SF CLI!
 You might say, why go command line? There are many reasons:
 1) Automate deployment scripts
 2) Integration with deployment tools (CI/CD)
 3) Script setup of Sandbox or Scratch Org
 4) Versioning with eg GIT repositories
 5) Reduce errors and improve productivity
 6) ... and many more

The Butler CLI integrates directly with the Salesforce CLI.
 Install it from here: [NPM Installation](https://www.npmjs.com/package/@pdfbutler/migration-cli)

More information: [LinkedIn post with video](https://www.linkedin.com/posts/igorstuyver_pdf-butler-deployment-goes-sf-cli-activity-7117078935678406656-EGWW?utm_source=share&utm_medium=member_desktop)

 

**Clone DocConfig:**

Check the "--clone" or short "-c" parameter in the NPM guide.

More information: [Clone via CLI](https://www.youtube.com/watch?v=zm05JhUmqcU)

 

**Working with GIT:**

All information exported via the CLI can be stored in GIT and used for automation to upload in other Sandboxes or PROD. Below an overview how this can work:

![](https://pdfbutler.com/wp-content/uploads/2023/10/Working-With-GIT-1024x635.png)

Following command example will export from stage DEV1 in a folder "butler/docConfigs"

 `sf butler pb export -t <FROM ORG USERNAME MUST EXIST AS ALIAS> -i '<LONG DOCCONFIG ID>'-o 'butler/docConfigs' -s 'DEV1' -a '<PDF BUTLER USERNAME>-ADMIN:<PDF BUTLER ADMIN PWD>' -e 'https://eu1.pdfbutler.com'`    

Following command example will import from stage QA from a folder "butler/docConfigs"

 `sf butler pb import -t <TO ORG USERNAME MUST EXIST AS ALIAS> -i '<LONG DOCCONFIG ID>' -f 'butler/docConfigs' -e '<PDF BUTLER USERNAME>-ADMIN:<PDF BUTLER ADMIN PWD>' -s 'QA'`
