🛠️

Form Bio CLI SDK

Form 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 | iex

MacOS

# 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/formbio

Linux

# 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/formbio

Commands

formbio --help
formbio auth --help
formbio storage --help
formbio workflow run --help

Authentication

Login

formbio auth login --help

Example usage:

# logs the user in 
formbio auth login
Output
# logs the user in when they are already authenticated
formbio auth login
Output

Logout

formbio auth logout --help

Example usage:

# logs the user out
formbio auth logout
Output

Whoami

formbio auth whoami --help

Example usage:

# list currently authenticated user
formbio auth whoami
Output

Data Upload and Download

List

formbio storage ls --help

Example usage:

# list files in top level of project space
formbio storage ls \
   formbio://my-organization/my-project/
Output
# list files recursively in the "logs" directory
formbio storage ls -r \
   formbio://my-organization/my-project/logs/
Output

Upload / Download

formbio storage cp --help

Example usage:

# download a single file from the project into mylocaldir
formbio storage cp \
  formbio://my-organization/my-project/logs/my_file.txt \
  mylocaldir/
Output
# upload a single file to the project root
formbio storage cp \
  mylocaldir/my_file.txt \
  formbio://my-organization/my-project/
Output
# upload a local directory to a project subdirectory
formbio storage cp -r \
  mylocaldir \
  formbio://my-organization/my-project/subdir/
Output
# resume a partially completed upload
formbio storage cp -c \
  one_gig_file.txt \
  formbio://my-organization/my-project/large-files-dir/
Output
# 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
Output

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
Output

Run Workflows on Form Bio

Launch workflow run

formbio workflow run --help

Example command:

Get workflow run

formbio workflow-run get --help

Example command:

Legal Notices

The formbio CLI tool uses the following Open Source software libraries.

  1. github.com/gosimple/slug@1.12.0
  2. https://github.com/hashicorp/errwrap/tree/v1.1.0
  3. https://github.com/hashicorp/go-multierror/tree/v1.1.1
  4. 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