chore: add AI documentation and best practices#853
Open
AndrewLPetersonSF wants to merge 1 commit intosalesforcecli:mainfrom
Open
chore: add AI documentation and best practices#853AndrewLPetersonSF wants to merge 1 commit intosalesforcecli:mainfrom
AndrewLPetersonSF wants to merge 1 commit intosalesforcecli:mainfrom
Conversation
iowillhoit
reviewed
Feb 26, 2026
| @@ -0,0 +1,149 @@ | |||
| ## Add Template Generator to CLI | |||
|
|
|||
| **Repo**: [salesforcecli/plugin-templates](https://github.com/salesforcecli/plugin-templates/tree/main/src/commands) (Public GitHub, requires access to `forcedotcom` org) | |||
Contributor
There was a problem hiding this comment.
Suggested change
| **Repo**: [salesforcecli/plugin-templates](https://github.com/salesforcecli/plugin-templates/tree/main/src/commands) (Public GitHub, requires access to `forcedotcom` org) | |
| **Repo**: [salesforcecli/plugin-templates](https://github.com/salesforcecli/plugin-templates/tree/main/src/commands) (Public GitHub, requires access to `salesforcecli` org) |
iowillhoit
reviewed
Feb 26, 2026
|
|
||
| #### Nightly | ||
|
|
||
| The CLI has a `nightly` release. The day after your PR is merged, you can update to the latest with `sf update nightly`. Keep in mind that if you have previously run `sf plugins link .` during development, you have to run `sf plugins unlink @salesforce/plugin-templates`. |
Contributor
There was a problem hiding this comment.
Suggested change
| The CLI has a `nightly` release. The day after your PR is merged, you can update to the latest with `sf update nightly`. Keep in mind that if you have previously run `sf plugins link .` during development, you have to run `sf plugins unlink @salesforce/plugin-templates`. | |
| The CLI has a `nightly` release. The day after your PR is merged, you can update to the latest with `sf update nightly` or `npm install @salesforce/cli@nightly --global`. Keep in mind that if you have previously run `sf plugins link .` during development, you have to run `sf plugins unlink @salesforce/plugin-templates`. |
iowillhoit
reviewed
Feb 26, 2026
|
|
||
| #### Release Candidate | ||
|
|
||
| The release candidate branch is updated weekly, on Wednesdays, around noon CST (10am PST). To update to the release candidate, you can run `sf update latest-rc`. |
Contributor
There was a problem hiding this comment.
Suggested change
| The release candidate branch is updated weekly, on Wednesdays, around noon CST (10am PST). To update to the release candidate, you can run `sf update latest-rc`. | |
| The release candidate is updated weekly, on Wednesdays, around noon CST (10am PST). To update to the release candidate, you can run `sf update stable-rc` or `npm install @salesforce/cli@latest-rc --global`. |
Note the stable vs latest naming... Its been this way for a long time
iowillhoit
reviewed
Feb 26, 2026
|
|
||
| #### Latest | ||
|
|
||
| A week after promotion to the release candidate, the RC is promoted to `latest`. Final sanity checks should be done during this week, and emergency patch fixes can be made if required. Update with `sf update latest`. |
Contributor
There was a problem hiding this comment.
Suggested change
| A week after promotion to the release candidate, the RC is promoted to `latest`. Final sanity checks should be done during this week, and emergency patch fixes can be made if required. Update with `sf update latest`. | |
| A week after promotion to the release candidate, the RC is promoted to `latest`. Final sanity checks should be done during this week, and emergency patch fixes can be made if required. Update with `sf update stable` or `npm install @salesforce/cli --global`. |
iowillhoit
reviewed
Feb 26, 2026
| 2. If you're introducing new templates in `salesforcedx-templates`, update your `package.json` in plugin-templates to reference your local path to the root directory of `salesforcedx-templates` | ||
| 3. Run `yarn build` after all changes to your templates or generator (in dx-templates) | ||
| 4. Run `yarn install --force` and `yarn build` in `plugin-templates` to fetch newly built changes from your local salesforcedx-templates directory | ||
| 5. When introducing your CLI command for the **first time**, run `sf plugins link .` from `plugin-templates`, which will override your local CLI with the new command that you’re working on. No newline at end of file |
Contributor
There was a problem hiding this comment.
Suggested change
| 5. When introducing your CLI command for the **first time**, run `sf plugins link .` from `plugin-templates`, which will override your local CLI with the new command that you’re working on. | |
| 5. When introducing your CLI command for the **first time**, run `sf plugins link .` from `plugin-templates`, which will override your local CLI with the new command that you’re working on. | |
| a. Alternatively, you can run your new command directly from the plugin-templates directory with: `./bin/run.js template generate your-command` |
iowillhoit
reviewed
Feb 26, 2026
| Use the interactive flag generator for each flag you need: | ||
|
|
||
| ```bash | ||
| sf dev generate flag |
Contributor
There was a problem hiding this comment.
FYI, this command is interactive only. Might want to mention that so that the LLM instructs the user to run it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
DEVELOPMENT.mdfor developers adding new template generators and exposing them to the CLIWhat issues does this PR fix or reference?
N/A