@flosum/cli is a Node.js command line tool for working with Flosum DevOps. This extension lets you run its commands from VS Code without using a terminal.
On startup the extension checks the installed CLI. If the CLI is missing or outdated, you will see a notification with an Install / Update button that runs npm i -g @flosum/cli@latest in a new terminal.
Usage
There are two ways to run a command:
Click the Flosum button in the bottom left corner of the VS Code window and pick a command from the list.
Open the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on Mac) and type Flosum.
The list of available commands depends on whether a DevOps project is open.
Without a DevOps project
Flosum: Login authorizes the CLI with an API token generated in Flosum Global Settings. It asks for an alias for the credentials, so you can keep several tokens at the same time.
Flosum: Logout deletes saved credentials by alias.
Flosum: Init Devops Project creates an empty Salesforce project with Flosum system files in the selected folder. It asks for a project name, credentials and a topology. The credentials alias is not saved to the project config, so log in from the project afterwards.
Flosum: Clone Devops Project does the same as Init, saves the selected credentials alias to the project and also retrieves the default branch from DevOps. Large projects can take a while to clone.
After Init or Clone, the project opens in a new window.
Inside a DevOps project
Flosum: Login sets the project credentials alias: pick one of the saved aliases or authorize a new one.
Flosum: Logout unsets the project credentials alias. Most project commands won't work until you log in again.
Flosum: Checkout Branch switches to another DevOps branch. Choose New Branch and enter a name to create a new branch on DevOps.
Flosum: Pull Branch retrieves the latest changes of the current branch from DevOps.
Flosum: View Pending Changes shows all local changes that aren't committed yet.
Flosum: Discard Changes reverts all uncommitted local changes.
Flosum: Commit Changes commits all local changes to the current DevOps branch.
Command results and errors are written to the Flosum output panel.
Troubleshooting
"Flosum CLI not found": make sure flosum --version works in a terminal. The extension runs the CLI through your login shell, so the CLI has to be on the PATH there (for example, when Node.js is installed with nvm).
"Workspace root not found" when running Init or Clone: this happens in extension versions before 0.0.6. Update the extension, or open any folder (File → Open Folder) before running the command.
Project commands don't show up in the Command Palette after Init or Clone: reload the window (Developer: Reload Window).