Use the Seven Bridges Command Line Interface (SB CLI) to programmatically access and automate your interaction with the Platform via the API. The CLI is called by a simple command:
The Seven Bridges Command Line Interface can be installed using an automated procedure or manually, as shown below.
Perform an automated installation with the following command:
bash -c 'curl https://igor.sbgenomics.com/downloads/sb/install.sh -sSf | sudo -H sh'
During the installation, the script will:
- Download the SB binary.
- Install the SB binary.
bashcompletion for SB. Note that this only works with
bashcompletion version 4, which should have been previously installed.
manpages for SB.
During the procedure you will see information on whether each of the steps were successful or not. Upon completion, the script will inform you if SB has been successfully installed.
- Download the SB executable file for your environment:
- Change file permissions so you are able to run the executable
(chmod +x sb).
- _(Optional) _Manually add bash completion for SB:
a) for Linux
sb gen completion --type bash --completionfile /etc/bash_completion.d/sb.bash-completion
b) for macOS with Brew installed
sb gen completion --type bash --completionfile $(brew --prefix)/etc/bash_completion.d/sb.bash-completion
- (Optional) Add manual pages for SB:
sb gen man --dir `manpath | cut -d ':' -f 1`
- Download the SB executable file for Windows:
Prior to using the Seven Bridges Command Line Interface, you must enter your credentials to authenticate with the Platform. For this, you will need to know the following information:
- The API endpoint for the Seven Bridges Platform, which you can obtain by following these steps:
1. Click Developer in the main menu.
2. Choose Authentication token.
3. Find the endpoint in the API endpoint section.
- Your authentication token.
- Launch the command line and enter the following:
- Enter the API endpoint when prompted.
- Enter your authentication token.
Learn more about storing your credentials in a unified configuration file.
The Seven Bridges Command Line Interface allows you to use profiles for the credentials allowing you to access multiple user accounts. Each profile contains an endpoint and an auth token. The profiles are set up within the configuration file.
Use the following option to specify a profile:
If a new version of the Seven Bridges Command Line Interface is available, you will be notified when issuing any of the commands while using the CLI. To install the new version, just follow the procedure for installing the Seven Bridges Command Line Interface again.
Depending on the procedure you have followed to install the Seven Bridges Command Line Interface, you need to follow the corresponding procedure to uninstall it. If you have followed the automatic installation procedure, follow the procedure for automatic uninstallation.
In case you installed the Seven Bridges Command Line Interface manually, follow the procedure for manual uninstallation.
To automatically uninstall the Seven Bridges Command Line Interface, issue the following command:
bash -c 'curl https://igor.sbgenomics.com/downloads/sb/install.sh -sSf | sudo sh -s – --uninstall'
The automated procedure will be started and will perform all the necessary steps for uninstalling the Seven Bridges Command Line Interface.
For manual uninstallation, you should reverse all the steps done during the manual installation procedure.
sb troubleshoot command is an easy way to report a problem with the Seven Bridges Command Line Interface, with all relevant information included. This command generates a debug file on a specific location (on your local machine), so that you can send it to the Seven Bridges Support Team ([email protected]) along with the description of the problem. The location of the generated file is
$HOME/.sevenbridges/sb/report.tar.gz and it will contain relevant information that should help Seven Bridges engineers identify the problem.
sb troubleshoot [flags]
--help- Help for the troubleshoot command.
Once you’ve installed and configured the Seven Bridges Command Line Interface as described above, check out our Seven Bridges Command Line Interface Reference to get started.
Updated 2 months ago