Connect to Your Dev Hub
The Developer Hub (Dev Hub) lets you create and manage scratch orgs. The scratch org is a source-driven and disposable deployment of Salesforce code and metadata. This Getting Started Guide uses scratch orgs for developing a Salesforce Function.
Confirm Dev Hub is Enabled
In your Dev Hub org, from Setup, enter "Dev Hub" in the Quick Find box. Select Dev Hub and make sure the "Enable Dev Hub" switch is toggled on.
See Configure Your Org.
Login and Set an Alias To Your Dev Hub
Log in to your Dev Hub using your username and password.
-aset an alias for the authenticated org, which you use in subsequent CLI commands
-dset this org as the default Dev Hub for creating scratch orgs
In VS Code, from the command palette, select SFDX: Authorize a Dev Hub.
Authenticate the CLI with Salesforce Functions
Connect the Salesforce CLI to the same Salesforce Functions account you used to connect your Dev Hub org.
This command opens a browser page where you can log in to your Salesforce Functions account using the same credentials you used to connect your Dev Hub org.