{"_id":"59ba768100b054001c3cf15d","project":"55faf11ba62ba1170021a9a7","version":{"_id":"55faf11ba62ba1170021a9aa","project":"55faf11ba62ba1170021a9a7","__v":45,"createdAt":"2015-09-17T16:58:03.490Z","releaseDate":"2015-09-17T16:58:03.490Z","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"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"5c22412594a2a5005cc9e919","project":"55faf11ba62ba1170021a9a7","version":"55faf11ba62ba1170021a9aa","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2018-12-25T14:39:33.459Z","from_sync":false,"order":31,"slug":"sb-cli","title":"SB Command Line Interface"},"user":"5613e4f8fdd08f2b00437620","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-09-14T12:30:57.746Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":0,"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\": \"curl https://igor.sbgenomics.com/downloads/sb/install.sh -sSf | sudo 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]","excerpt":"","slug":"command-line-interface","type":"basic","title":"Seven Bridges Command Line Interface"}

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": "curl https://igor.sbgenomics.com/downloads/sb/install.sh -sSf | sudo 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]