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

Quick Tips: Setup SFDX Manually without Admin access

We all have faced challenges while working in different enterprise environments, where there may be lot of controls/ checks/ red-tape to get by. In such situations, getting access to simple tools (even git) can take lot of time. Note: This tutorial is to be followed at your own risk, as it may not be complaint to your organization's IT policies. What is SFDX? SFDX is a command line utility for managing salesforce builds/ deployments. Being command line, it can be easily embedded to automation chains, to help build fully automated build and deployment processes. To get started, refer Setup SFDX on Windows machine without admin access As you may have already realized, SFDX installation needs admin access to one's machine. Which may be a luxury a lot of developers may not have. So, i tried to provide a step-by-step guide to setup SFDX on your computer without any admin access Steps: Note: