Reference
CGT
Support
Contact SupportForm Bio CLI/SDK
formbio is a high-level command line tool for managing Form Bio workflows and projects.
- Form Bio CLI/SDK
- Installing and Updating the formbio CLI tool
- Windows
- MacOS
- Linux
- Commands
- Authentication
- Login
- Logout
- Whoami
- Data Upload and Download
- List
- Upload / Download
- Create Directory
- Run Workflows on Form Bio
- Launch workflow run
- Get workflow run
- Legal Notices
The Form Bio CLI SDK is under active development and subject to change.
Installing and Updating the formbio CLI tool
To install the latest version of the formbio CLI tool or update your existing installation with the latest you can run the following depending on your operating system.
Windows
# Install via PowerShell
iwr https://cli.formbio.com/public/latest/install/windows | iexMacOS
# Install via command line
curl -sSL https://cli.formbio.com/public/latest/install/macos | bash
sudo mkdir -p /usr/local/bin/
# Make it available on your $PATH (only need to do this the first time you install)
sudo ln -s $HOME/.local/bin/formbio /usr/local/bin/formbioLinux
# Install via command line
curl -sSL https://cli.formbio.com/public/latest/install/linux | bash
# Make it available on your $PATH (only need to do this the first time you install)
sudo ln -s $HOME/.local/bin/formbio /usr/local/bin/formbioCommands
โฃ
formbio --helpโฃ
formbio auth --help โฃ
formbio storage --helpโฃ
formbio workflow run --helpAuthentication
Login
โฃ
formbio auth login --helpExample usage:
# logs the user in
formbio auth loginโฃ
# logs the user in when they are already authenticated
formbio auth loginโฃ
Logout
โฃ
formbio auth logout --helpExample usage:
# logs the user out
formbio auth logoutโฃ
Whoami
โฃ
formbio auth whoami --helpExample usage:
# list currently authenticated user
formbio auth whoamiโฃ
Data Upload and Download
List
โฃ
formbio storage ls --helpExample usage:
# list files in top level of project space
formbio storage ls \
formbio://my-organization/my-project/โฃ
# list files recursively in the "logs" directory
formbio storage ls -r \
formbio://my-organization/my-project/logs/โฃ
Upload / Download
โฃ
formbio storage cp --helpExample usage:
# download a single file from the project into mylocaldir
formbio storage cp \
formbio://my-organization/my-project/logs/my_file.txt \
mylocaldir/โฃ
# upload a single file to the project root
formbio storage cp \
mylocaldir/my_file.txt \
formbio://my-organization/my-project/โฃ
# upload a local directory to a project subdirectory
formbio storage cp -r \
mylocaldir \
formbio://my-organization/my-project/subdir/โฃ
# resume a partially completed upload
formbio storage cp -c \
one_gig_file.txt \
formbio://my-organization/my-project/large-files-dir/โฃ
# downloads files that match the wildcard
# workaround for wildcard support which will come soon:
# formbio storage cp formbio://path/*.txt .
formbio storage ls \
formbio://my-organization/my-project/logs | grep txt |rev| cut -f 1 -d ' ' | rev | awk '{print "formbio storage cp",$1,"."}' |shโฃ
Create Directory
# use the -p (--parents) flag to create several nested directories at once
formbio storage mkdir \
-p \
formbio://my-organization/my-project/existing_dir/new_dir/also_newโฃ
Run Workflows on Form Bio
Launch workflow run
โฃ
formbio workflow run --helpExample command:
# For a given Form Bio Org / Project e.g. Org=form-bio-solutions / Project=rna-seq
# https://form.bio/organizations/form-bio-solutions/projects/rna-seq/home/
# for JSON output, use the --response-format=JSON flag
$ formbio workflow run \
--env prod \
--org form-bio-solutions \
--project rna-seq \
--repo nf-rnaseq \
--workflow expressiondetective \
--version v1.0.0 \
--run-name 'runRNASEq' \
-- \
--design=formbio://form-bio-solutions/rna-seq/SRP045500.design.txt \
--input=formbio://form-bio-solutions/rna-seq/pipeline-outputs/getncbi/2023-05-06T00_24_44Z_90a32859-6a83-4fec-882d-38df4147a4aa/output/ \
--genomeid=GRCh38 \
--genoannotver=latest \
--version=rnaseq_v1.0.0 \
--trim=true \
--cancer=false \
--aligner=star \
--repoDir=/seqprg \
--markdups=skip \
--stranded=U \
--readorigin=F \
--sourceType=cts \
--orientation=I \
--genomes_bucket=gs://bioinfo-workflow-references/genomes \
--taxid=9606
Creating the workflow...
Your run output is available at:
https://form.bio/organizations/form-bio-solutions/projects/rna-seqUsage:
formbio workflow run --org org --project project --repo repo --version version --runName runName -- [--paramName <param-value>] [--paramName2 <param-value>] [flags]Get workflow run
โฃ
formbio workflow-run get --helpExample command:
# for JSON output, use the --response-format=JSON flag
$ formbio workflow-run get 9dc2d02a-b8eb-438c-9bb7-2f61fdf5066e
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| ID | 9dc2d02a-b8eb-438c-9bb7-2f61fdf5066e |
| Name | runRNASEq |
| Repository | expressiondetective |
| User | A. N. Nother |
| Status | FAILED |
| Created | 2024-02-29 21:10:56 |
| Updated | 2024-02-29 21:15:11 |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Web links for this workflow run
To view workflow run:
https://formbio.com/organizations/form-bio-solutions/projects/rna-seq/workflow-runs/9dc2d02a-b8eb-438c-9bb7-2f61fdf5066e/
To view workflow run output files in data manager:
(may not work immediately)
https://formbio.com/organizations/form-bio-solutions/projects/rna-seq/vault/?path=pipeline-outputs%2Fexpressiondetective%2F2024-02-29T21_10_56Z_9dc2d02a-b8eb-438c-9bb7-2f61fdf5066e
# CLI commands for this workflow run
To get details about this workflow run:
formbio workflow-run get a9bc9dae-742b-496b-a4b4-4ee4daf9c95b
To list the workflow output directories and files:
(may not work immediately)
formbio storage ls formbio://form-bio-solutions/rna-seq/pipeline-outputs/developerdecoy/2024-02-29T21_10_56Z_a9bc9dae-742b-496b-a4b4-4ee4daf9c95b/
Legal Notices
The formbio CLI tool uses the following Open Source software libraries.
- github.com/gosimple/slug@1.12.0
- https://github.com/hashicorp/errwrap/tree/v1.1.0
- https://github.com/hashicorp/go-multierror/tree/v1.1.1
- github.com/hashicorp/hcl/json/parser@1.0.0
โ Previous
Add link here
Next โ
Add link here
On this page
- Form Bio CLI/SDK
- Installing and Updating the formbio CLI tool
- Windows
- MacOS
- Linux
- Commands
- Authentication
- Login
- Logout
- Whoami
- Data Upload and Download
- List
- Upload / Download
- Create Directory
- Run Workflows on Form Bio
- Launch workflow run
- Get workflow run
- Legal Notices