{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[]},"params":[]},"next":{"description":"","pages":[]},"title":"Seven Bridges Command Line Interface","type":"basic","slug":"command-line-interface","excerpt":"","body":"##Overview\n\nUse the Seven Bridges Command Line Interface (SB CLI) to programmatically access and automate your interaction with the CGC via the API. The CLI is called by a simple command: `sb`.\n\nThe Seven Bridges Command Line Interface can be installed using an automated procedure or manually, as shown below.\n \n##Automated installation for Linux and macOS\n\nPerform an automated installation with the following command:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"bash -c 'curl https://igor.sbgenomics.com/downloads/sb/install.sh -sSf | sudo -H sh'\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nDuring the installation, the script will:\n\n1. Download the SB binary.\n2. Install the SB binary.\n3. Enable `bash` completion for SB. Note that this only works with `bash` completion version 4, which should have been previously installed.\n4. Add `man` pages for SB.\n\nDuring 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.\n\n##Manual installation for Linux, macOS, and FreeBSD\n\n1. Download the SB executable file for your environment:\n **Linux** \n  * [64-bit Intel](https://igor.sbgenomics.com/downloads/sb/linux-amd64/sb) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/linux-amd64/sb.shasum))\n  * [32-bit Intel](https://igor.sbgenomics.com/downloads/sb/sb/linux-386/sb) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/linux-386/sb.shasum))\n  * [64-bit ARM](https://igor.sbgenomics.com/downloads/sb/linux-arm64/sb) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/linux-arm64/sb.shasum))\n  * [32 bit ARM](https://igor.sbgenomics.com/downloads/sb/linux-arm/sb) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/linux-arm/sb.shasum))\n \n **macOS**\n  * [macOS](https://igor.sbgenomics.com/downloads/sb/darwin-amd64/sb) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/darwin-amd64/sb.shasum))\n\n **FreeBSD**\n  * [FreeBSD](https://igor.sbgenomics.com/downloads/sb/freebsd-amd64/sb) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/freebsd-amd64/sb.shasum))\n\n2. Change file permissions so you are able to run the executable `(chmod +x sb)`.\n3. *(Optional) *Manually add bash completion for SB: \n    a) for Linux\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sb gen completion - -type bash - -completionfile /etc/bash_completion.d/sb.bash-completion\",\n      \"language\": \"text\",\n      \"name\": \"bash completion\"\n    }\n  ]\n}\n[/block]\n    b) for macOS with Brew installed\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sb gen completion - -type bash - -completionfile $(brew - -prefix)/etc/bash_completion.d/sb.bash-completion\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n4. *(Optional)* Add manual pages for SB: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sb gen man - -dir `manpath | cut -d ':' -f 1`\",\n      \"language\": \"text\",\n      \"name\": \"add man pages\"\n    }\n  ]\n}\n[/block]\n##Windows Installation\n\n1. Download the SB executable file for Windows:\n  * [32-bit Windows](https://igor.sbgenomics.com/downloads/sb/windows-386/sb.exe) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/windows-amd64/sb.shasum))\n  * [64-bit Windows](https://igor.sbgenomics.com/downloads/sb/windows-amd64/sb.exe) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/windows-386/sb.shasum))\n\n##Configure credentials\n\nPrior to using the Seven Bridges Command Line Interface, you must enter your credentials to authenticate with the CGC. For this, you will need to know the following information:\n* API endpoint for the CGC: `https://cgc-api.sbgenomics.com/v2/\n* Your [authentication token](get-your-authentication-token).\n\n1. Launch the command line and enter the following:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sb configure\",\n      \"language\": \"text\",\n      \"name\": \"Configure\"\n    }\n  ]\n}\n[/block]\n2. Enter the API endpoint when prompted.\n3. Enter your authentication token.\n\nLearn more about [storing your credentials in a unified configuration file](doc:store-credentials-to-access-seven-bridges-client-applications-and-libraries).\n\n##Specify your profiles\n\nThe 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.  \n\nUse the following option to specify a profile:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"- -profile <profile_name>\",\n      \"language\": \"text\",\n      \"name\": \"Specify a profile\"\n    }\n  ]\n}\n[/block]\n## Upgrade\n\nIf 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.\n\n## Uninstall\n\nDepending 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.\n\nIn case you installed the Seven Bridges Command Line Interface manually, follow the procedure for manual uninstallation.\n\n### Automatic uninstallation\n\nTo automatically uninstall the Seven Bridges Command Line Interface, issue the following command:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"bash -c 'curl https://igor.sbgenomics.com/downloads/sb/install.sh -sSf | sudo sh -s – --uninstall'\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nThe automated procedure will be started and will perform all the necessary steps for uninstalling the Seven Bridges Command Line Interface.\n\n### Manual uninstallation\nFor manual uninstallation, you should reverse all the steps done during the manual installation procedure.\n\n## Troubleshooting\n\nUsing the `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 ([support:::at:::sbgenomics.com](mailto:[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.\n\nUsage:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sb troubleshoot [flags]\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nFlags:\n\n* `h`, `--help` - Help for the troubleshoot command","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"59ba768100b054001c3cf15d","project":"55faf11ba62ba1170021a9a7","version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["55faf11ca62ba1170021a9ab","55faf8f4d0e22017005b8272","55faf91aa62ba1170021a9b5","55faf929a8a7770d00c2c0bd","55faf932a8a7770d00c2c0bf","55faf94b17b9d00d00969f47","55faf958d0e22017005b8274","55faf95fa8a7770d00c2c0c0","55faf96917b9d00d00969f48","55faf970a8a7770d00c2c0c1","55faf98c825d5f19001fa3a6","55faf99aa62ba1170021a9b8","55faf99fa62ba1170021a9b9","55faf9aa17b9d00d00969f49","55faf9b6a8a7770d00c2c0c3","55faf9bda62ba1170021a9ba","5604570090ee490d00440551","5637e8b2fbe1c50d008cb078","5649bb624fa1460d00780add","5671974d1b6b730d008b4823","5671979d60c8e70d006c9760","568e8eef70ca1f0d0035808e","56d0a2081ecc471500f1795e","56d4a0adde40c70b00823ea3","56d96b03dd90610b00270849","56fbb83d8f21c817002af880","573c811bee2b3b2200422be1","576bc92afb62dd20001cda85","5771811e27a5c20e00030dcd","5785191af3a10c0e009b75b0","57bdf84d5d48411900cd8dc0","57ff5c5dc135231700aed806","5804caf792398f0f00e77521","58458b4fba4f1c0f009692bb","586d3c287c6b5b2300c05055","58ef66d88646742f009a0216","58f5d52d7891630f00fe4e77","59a555bccdbd85001bfb1442","5a2a81f688574d001e9934f5","5b080c8d7833b20003ddbb6f","5c222bed4bc358002f21459a","5c22412594a2a5005cc9e919","5c41ae1c33592700190a291e","5c8a525e2ba7b2003f9b153c","5cbf14d58c79c700ef2b502e","5db6f03a6e187c006f667fa4","5f894c7d3b0894006477ca01"],"_id":"55faf11ba62ba1170021a9aa","releaseDate":"2015-09-17T16:58:03.490Z","createdAt":"2015-09-17T16:58:03.490Z","project":"55faf11ba62ba1170021a9a7","__v":47},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"SB Command Line Interface","slug":"sb-cli","order":31,"from_sync":false,"reference":false,"_id":"5c22412594a2a5005cc9e919","project":"55faf11ba62ba1170021a9a7","version":"55faf11ba62ba1170021a9aa","createdAt":"2018-12-25T14:39:33.459Z","__v":0},"user":"5613e4f8fdd08f2b00437620","createdAt":"2017-09-14T12:30:57.746Z","githubsync":"","__v":0,"parentDoc":null}

Seven Bridges Command Line Interface


##Overview Use the Seven Bridges Command Line Interface (SB CLI) to programmatically access and automate your interaction with the CGC via the API. The CLI is called by a simple command: `sb`. The Seven Bridges Command Line Interface can be installed using an automated procedure or manually, as shown below. ##Automated installation for Linux and macOS Perform an automated installation with the following command: [block:code] { "codes": [ { "code": "bash -c 'curl https://igor.sbgenomics.com/downloads/sb/install.sh -sSf | sudo -H sh'", "language": "text" } ] } [/block] During the installation, the script will: 1. Download the SB binary. 2. Install the SB binary. 3. Enable `bash` completion for SB. Note that this only works with `bash` completion version 4, which should have been previously installed. 4. Add `man` pages 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. ##Manual installation for Linux, macOS, and FreeBSD 1. Download the SB executable file for your environment: **Linux** * [64-bit Intel](https://igor.sbgenomics.com/downloads/sb/linux-amd64/sb) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/linux-amd64/sb.shasum)) * [32-bit Intel](https://igor.sbgenomics.com/downloads/sb/sb/linux-386/sb) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/linux-386/sb.shasum)) * [64-bit ARM](https://igor.sbgenomics.com/downloads/sb/linux-arm64/sb) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/linux-arm64/sb.shasum)) * [32 bit ARM](https://igor.sbgenomics.com/downloads/sb/linux-arm/sb) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/linux-arm/sb.shasum)) **macOS** * [macOS](https://igor.sbgenomics.com/downloads/sb/darwin-amd64/sb) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/darwin-amd64/sb.shasum)) **FreeBSD** * [FreeBSD](https://igor.sbgenomics.com/downloads/sb/freebsd-amd64/sb) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/freebsd-amd64/sb.shasum)) 2. Change file permissions so you are able to run the executable `(chmod +x sb)`. 3. *(Optional) *Manually add bash completion for SB: a) for Linux [block:code] { "codes": [ { "code": "sb gen completion - -type bash - -completionfile /etc/bash_completion.d/sb.bash-completion", "language": "text", "name": "bash completion" } ] } [/block] b) for macOS with Brew installed [block:code] { "codes": [ { "code": "sb gen completion - -type bash - -completionfile $(brew - -prefix)/etc/bash_completion.d/sb.bash-completion", "language": "text" } ] } [/block] 4. *(Optional)* Add manual pages for SB: [block:code] { "codes": [ { "code": "sb gen man - -dir `manpath | cut -d ':' -f 1`", "language": "text", "name": "add man pages" } ] } [/block] ##Windows Installation 1. Download the SB executable file for Windows: * [32-bit Windows](https://igor.sbgenomics.com/downloads/sb/windows-386/sb.exe) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/windows-amd64/sb.shasum)) * [64-bit Windows](https://igor.sbgenomics.com/downloads/sb/windows-amd64/sb.exe) ([sha1sum](https://igor.sbgenomics.com/downloads/sb/windows-386/sb.shasum)) ##Configure credentials Prior to using the Seven Bridges Command Line Interface, you must enter your credentials to authenticate with the CGC. For this, you will need to know the following information: * API endpoint for the CGC: `https://cgc-api.sbgenomics.com/v2/ * Your [authentication token](get-your-authentication-token). 1. Launch the command line and enter the following: [block:code] { "codes": [ { "code": "sb configure", "language": "text", "name": "Configure" } ] } [/block] 2. Enter the API endpoint when prompted. 3. Enter your authentication token. Learn more about [storing your credentials in a unified configuration file](doc:store-credentials-to-access-seven-bridges-client-applications-and-libraries). ##Specify your profiles 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: [block:code] { "codes": [ { "code": "- -profile <profile_name>", "language": "text", "name": "Specify a profile" } ] } [/block] ## Upgrade 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. ## Uninstall 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. ### Automatic uninstallation To automatically uninstall the Seven Bridges Command Line Interface, issue the following command: [block:code] { "codes": [ { "code": "bash -c 'curl https://igor.sbgenomics.com/downloads/sb/install.sh -sSf | sudo sh -s – --uninstall'", "language": "shell" } ] } [/block] The automated procedure will be started and will perform all the necessary steps for uninstalling the Seven Bridges Command Line Interface. ### Manual uninstallation For manual uninstallation, you should reverse all the steps done during the manual installation procedure. ## Troubleshooting Using the `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]](mailto:[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. Usage: [block:code] { "codes": [ { "code": "sb troubleshoot [flags]", "language": "shell" } ] } [/block] Flags: * `h`, `--help` - Help for the troubleshoot command