A homebrew package to manage the repeated creation of scratch orgs for day to day work.
- Quick Org Creator
brew tap mvogelgesang/quick-org-creator
brew install quick-org-creator
- Salesforce CLI
- Git
- GitHub CLI (Optional)
- IDE with CLI support:
The first time oc is run, it will establish a configuration file that is used to supply the list of DevHub orgs, any namespaces, and set default values.
oc
Creates a new scratch org and prompts user to identify which DevHub to use, folder location, and scratch definition file. Upon completion, the following are produced
- New Salesforce scratch org from desired DevHub with specified org definition
- New project directory with org set as default target
- Initialized Git repo and creation of corresponding private GitHub repo (if GitHub CLI is installed)
oc config
Allows you to set default values for:
- DevHub
- Project folder location
- Default scratch org duration
- Scratch Definition File
- Default scratch definition features/ settings that always get applied
- Manage multiple Git remotes and set default
- Preferred IDE (VSCode or Cursor)
oc config list
oc devhub
Saves a local list of DevHub orgs that have been authenticated via the CLI. If a devhub does not have an alias, it appears as blank in the list.
oc namespace
Refreshes the list of namespaces associated with your default DevHub org.
oc help
Prints all commands and brief descriptions of each.
oc -o
Creates an org but skips steps to create associated project directory or github repo.
oc --version
Prints the current version of Quick Org Creator.
brew update
brew upgrade quick-org-creator
- New Salesforce scratch org from desired devHub with specified org definition
- New project directory with org set as default target
- Initialized Git repo and creation of private GitHub repo
- A cleanup script to clear out old
node_modulesfolders - If a config value is missing, prompt for it
- Org picker based on authenticated dev hub orgs
- Directory picker based on folders available from run location
- ✔️ Issue 55 - Print list of current configuration variables.
- ✔️ Issue 52 - Create and manage common settings/ features to apply to all scratch orgs.
- ✔️ Issue 48 - Create only the org, no project directory
- ✔️ Issue 3 - Check for repo updates
- ✔️ Include a readme file in each directory containing more details about the scratch org, why it was created, etc
./build/local.sh Uninstalls any existing version of oc, builds from local directory and installs from locally produced bundle tmp-quick-org-creator.tar.gz. Once built, can be run using oc alias.
./build/restoreProd.sh
Removes locally built version of package and installs from tap.
- Commit all changes to local branch.
- Open pull request agains develop branch and merge changes from local.
- Run
./build/publish-release.sh #.#.#
Assumes all changes to scripts and templates are committed and merged into main.
versionNumber=#.#.#
git pull origin develop
git merge main >> this should say that it is already up to date. If not, merge.
git checkout main
git merge develop
git push origin main
echo -n $versionNumber>VERSION
git add VERSION
git commit -m ${versionNumber}
git tag -a v${versionNumber} -m ${versionNumber}
git push origin v${versionNumber}
- In GitHub, create new release from tag.
- Copy link to tarball
- Fetch SHA-256 using tarball url
curl -L {tarballUrl} | shasum -a 256
- Update
./Formula/quick-org-creator.rband replace url and sha contents. - Commit all changes and push to main
unset versionNumber
git push origin main
git checkout develop
git merge main
git push origin develop
- Now
mainanddevelopwill be at the same commit hash.