Skip to main content

SFDX Utility - Easy to use Command Line Wizard

As you would already know, SFDX is Salesforce utility for improved build management and development activities. It is definitely a big leap in terms of bringing Salesforce development practices in line with common delivery and development processes.

However, I believe non-admins, new developers and most of folks who love browser based development will be puzzled, as they now have to move to a not-so-good-looking command line screen to run their commands. Not to mention, they need to remember these commands and all their options.

Who is it for?

This utility (currently) caters to teams/ developers who are yet not using scratch org for their development. I consider you are familiar with managing package.xml to ensure you have your build manifest ready.

What is the need?

  1. Eases pain of entering common development commands (retrieve, deploy, build)
  2. With one time config, you'll be sure you are not messing up with instances
  3. Ensure you or your team follows same process

What does it do?

  1. Retrieve - it performs following steps for each retrieve cycle
    • retrieves components, as per src/package.xml file
    • unzips zip file generated by SFDX
    • copies downloaded components to src folder
    • deletes temporary files
  2. Deploy - allows user to specify username for instance
  3. Test Build - runs a quick validation deployment on a pre-defined build environment/ sandbox

Technical Details

This utility is a windows batch script and tested only on Windows 10, but should work on older windows machines as well (unless you are still using windows 95).

This is a command line utility available for:
  1. Windows machines (tested on Windows 10) - use ctksfdx.bat
  2. *Nix machines (tested on Linux Mint 18.02) - use


Follow these instructions for each client/ project setup, and you'll not have to enter long SFDX commands again and again.


(This setup is to be repeated for each client/project)
  1. Copy utility within project folder (
  2. Setup configurations within utility (explained below)

Example folder structure

Configure utility

Within configuration section of utility (batch file) setup following:
  1. DEV - define username of development sandbox (line no. 13)
    SET DEV=
  2. BUILD - define username of build test sandbox (line no. 16)

Optional settings:
  1. Retrieve wait period - setup time interval in minutes, utility should wait for retrieve operations to complete
  2. Deploy wait period - setup time interval in minutes, utility should wait for deploy/ built test operations to complete

How to use it?

Remember, this is to reduce complexity and effort for repititive tasks, so all you have to do is fire command ctksfdx

That's it!! 

Utility will give you options to choose.

Remember, to keep it really simple and safe, deploy option needs you to provide username of the org where you want to deploy.

[Update Nov 21, 2018] Added shell script utility for *nix systems.


Popular posts from this blog

Quick Tips: Salesforce default Images

Well, I'm sure a lot of you still rely on using out of the box salesforce images for displaying quick icons within formula fields or even using them within your Visualforce pages. Lately, I realized that a lot of earlier resources are no longer accessible, so I tried to quickly extract all images from Salesforce CSS files and provide a quick reference here. Please note, I've referenced all images from SF servers directly, so if anything changes, the image should stop rendering here. As these images are completely controlled by Salesforce, and in case they change anything, it might lead to image not being accessible. Image path Image /img/samples/flag_green.gif /img/samples/flag_green.gif /img/samples/flag_red.gif /img/samples/color_red.gif /img/samples/color_yellow.gif /img/samples/color_green.gif /img/samples/light_green.gif /img/samples/light_yellow.gif /img/samples/light_red.gif /img/samples/stars_100.gif /img/samples/stars_200.gif /img/samples/stars_300.

Lightning: Generate PDF from Lightning components with in-memory data

I'm sure as everyone is diving into lightning components development, they are getting acquainted with the nuances of the Lightning components framework. As well as, its current limitations. Being a new framework, this is bound to happen. Although we have our users still using salesforce classic, we have started using lightning components framework our primary development platform and Visualforce is considered primarily for rendering lightning components within Classic Service console. Recently, while re-architecting a critical module, we encountered a problem wherein we needed to generate PDF from lightning components. Now, being Javascript intensive framework, it has limited room for such features (may be included in future roadmap). As of now, there is no native feature within the lightning framework to do so (at least I didn't find anything). Common Scenario - Create Visualforce page to retrieve data and generate PDF For scenarios where the data exist within Sa

Lightning: Generate PDF within Lightning Experience with Salesforce Data

Some time back I posted a solution to generate PDF from Lightning components using in-memory data. Post url: It was developed for a specific scenario, wherein we need to generate PDF where: User interface is Salesforce classic Initiated via Lightning Component Data doesn't exist within Salesforce and is completely in-memory As complex and tricky this situation was, we did end up finding a stable and equally tricky solution. However, I realize that there are still lack of solutions (or maybe my search skills are downgrading) to generate and automatically download PDF document from Lightning Experience, without using any lightning components, wherein data exists within Salesforce. You can use the earlier solution in that case, but it will be an overkill. There are various solutions available to generate PDF from javascript. But, I still think the plain old method of converting HTML to PDF (via