I've set up actions that run on deployments in git. These scripts use the sfdx commands to deploy and various other functions. Now I want to move them from sfdx and to the new sf cli. Is there a painless transition to sf from sfdx that doesn't require me to change all the commands from sfdx to sf syntax in my scripts?

1 Answer 1


This will be taken care by sf(v2) as mentioned in the official documentation Move from sfdx (v7) to sf (v2). Once you migrate successfully, both sf and sfdx commands will work as sfdx is now aliased to sf.

Screenshot from the above link:

enter image description here

Screenshot from my windows machine where I have migrated to sf (v2) recently.

enter image description here

  • Thanks Saroj. I did notice this is the documentation, but wasn't sure that this would work as expected.
    – akarnid
    Commented Dec 5, 2023 at 10:53
  • Yes it will work, I have added a screenshot from my machine for your reference. Also I have seen VSCode Plugin still uses the sfdx versions of the commands, and it works without any changes.
    – Saroj Bera
    Commented Dec 5, 2023 at 10:57
  • Yes, I see the same after emptying my ~/.sf folder. Looks good. Thanks Saroj for the help!
    – akarnid
    Commented Dec 5, 2023 at 13:46
  • Thanks Saroj, I also see this sf version @salesforce/cli/2.19.8 darwin-arm64 node-v17.1.0 sfdx version @salesforce/cli/2.19.8 darwin-arm64 node-v17.1.0
    – akarnid
    Commented Dec 5, 2023 at 13:51
  • Could you please mark this answer as accepted then so future readers know this is the solution?
    – Saroj Bera
    Commented Dec 5, 2023 at 14:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .