Part 5: SN-CLI Cheat Sheet
by Jake Laux and Freddy Reza
Most Useful Commands
Creates a profile with the name specified
snc configure profile set --profile [profile name]
Creates a component
snc ui-component project --name [name] --scope [scope] --description [description]
scope name must be 18 characters or less and snake_case
default scope name: x_customerprefix_componentname
Opens the component in your default browser
snc ui-component develop --open --profile [profile name]
Deploys the component to your specified profile's instance if you have permissions to do so
snc ui-component deploy --profile [profile name] --force
Force argument is for redeployment
SNC Commands
Profile Commands can be found here -> Configure and Manage your ServiceNow CLI Profiles
Creates a default profile if no other profile exists
snc configure profile set
Creates a profile with the name specified
snc configure profile set --profile [profile-name]
Displays all configured profiles
snc configure profile list
Removes the configured profile using the name specified
snc configure profile remove --profile [profile-name]
CLI refreshes the connection for default profile
snc configure profile refresh
CLI refreshes the connection for named profile
snc configure profile refresh --profile [profile-name]
UI-Component Development
Commands can be found here -> Set Up Project Development
Will run component using default profile instance
snc ui-component develop
Opens the component in your default browser
snc ui-component develop --open
Runs component using instance associated with named profile
snc ui-component develop --profile [profile name]
--open argument opens the component in your default browser
--profile argument uses instance associated with named profile.
snc ui-component develop --open --profile [profile name]
UI-Component Deployment
Deploys component to default profile instance
snc ui-component deploy
-profile uses named profile's instance if you have permissions to do so.
--force argument is for redeployment
snc ui-component deploy --profile [profile name] --force
#servicenow #cli