With brainlife CLI, you can ..
- Upload/download data from your computer.
- Upload data stored in BIDS format.
- Submit Apps, and monitor (you can fully script data processing through brainlife)
- Query projects, data, datatypes, etc.
Brainlife CLI is distributed through npm (node package manager) which is a part of nodejs. You will need to have nodejs/npm installed on your machine before you can install brainlife CLI command. Most operation systems support nodejs through their software distribution systems. You can find the nodejs installation document here.
On ubuntu/debian machines, you can run the following command to install nodejs 14 (current LTS).
For other OSs, please see Installing node.js page.
For Windows Users
In order to use brainlife CLI on Windows, you will first need to install WSL (Windows Subsyste for Linux) and run all commands inside the Ubuntu terminal.
Apart from WSL, we recommend the following software packages installed on Windows systems.
On IU Karst / Carbonate / RED, brainlife CLI is already installed as part of nodejs module. Please run
module load nodejs and skip this installation step.
Once you have nodejs/npm installed, you can then run the following command to install brainlife CLI on your environment.
You can then check the installation by
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Updating the CLI¶
We are making a lot of bug fixes/updates. If you run into any problem, please try updating the CLI by running the following.
Before you can start using bl tool, you should login to brainlife by running the following command.
If you don't have a brainlife account, please Sign Up before proceeding.
1 2 3 4
--ttl 7 will request brainlife to keep you logged in for 7 days. Please adjust this number if necessary.
bl login command will store your access token under the following path
brainlife CLI itself does not provide a capability to sign out natively, but you can remove this file if you wish to sign out before your token expires.
You can use brainlife CLI hosted as a docker container via Singularity by running the following command.
If you don't want to type
singularity run docker://brainlife/cli every time you run brainlife CLI, you could add something like this to your
1 2 3
depending on how your environment is configured, you might need to add this on each bash script you are executing (or do
source ~/.bashrc in your script)
You can install brainlife CLI on Google Colab by running
!npm install brainlife -g with a code block. All brainlife CLI should work, except for the
bl login command.
The login command will not work as it requires TTY to prompt for password and Colab does not support it.
For now, please copy and paste the following python snippet to perform the login operation
and issue JWT token used by other
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
The issued token will be stored on
/root/.config/brainlife.io/.jwt. This directory is no persisted,
so each user will need to run the code above to login, or each time the VM used to host your notebook