Design Principles and Guidelines
This document outlines the high-level design principles and guidelines for Salesforce CLI. The goal is to help you create a consistent, approachable, opinionated, and human-readable CLI in keeping with our Salesforce Developer Tools Principles.
Interactions with our CLI commands “just make sense.” In time, your understanding of each design pattern lets you to code new commands without visiting this documentation. And because of the consistent patterns, you code your plugin with confidence.
We recommend that all plugins follow our core plugin style guidelines. If you want to bundle your plugin with the core Salesforce CLI, then you're required to follow our guidelines. The reason is so our users aren't required to learn a new naming system each time they use the commands in a new plugin. This document provides guidance about command and flag names, command structure best practices, and more.
Core Salesforce CLI commands follow these general guidelines. This guide discusses specific naming guidelines for topics, commands, and flags in their own sections.
- Use the common language around Salesforce software development that we've developed. Using these consistent terms helps lower the bar to software development.
- Use industry-standard terms and concepts, which unify developers everywhere.
- The user shouldn't be required to search Reddit to understand what an action or resource is.
- Commands must be humanly comprehensible. The general user must understand what happens just by reading the command.
- Although it's important to consider the many scripts that use CLI commands, we've chosen to prefer the developer and their work flows first.
- Consider all users and their roles: Salesforce admins or developers, ISV partners, subscribers, or even general DevOps users with no Salesforce experience.
- Command and flag names must provide insight into their functionality or intent.
- Names must be expressive and identifying, but also concise.
- Avoid names that are non-industry standard, unique, terse, slang, clever, or “cute.”
- Abbreviate only when necessary (unless it's an industry standard).