Support

Workflows

Quickly create, execute, and share shell workflows

Fig Workflows is the easiest way to create terminal UIs and automate common shell workflows. You can then execute these workflows anywhere by running fig run <workflow>

😎 Have questions/feedback/ideas for Workflows?
Email matt@fig.io

Execute a Workflow

Run fig run to open the workflow picker, or fig run <workflow> to run the workflow directly!

Fig workflows terminal UI demo

Create a Workflow

Run fig, then click on the Workflows tab in the sidebar.

Creating a Fig workflow

Syntax

Workflow syntax is a superset of bash. This means that any existing shell script is a valid workflow.

You can extend scripts by declaring certain variables as "parameters".

For instance, the following workflow requires a "branch".

git push origin {{branch}}

Wrapping "branch" inside of double curly-braces signals that it is a input to the script. Any time the workflow is executed, the user will be prompted to specify a value for "branch".

You can reuse parameters many times in a script; the user will only be prompted for the value once.

cat {{path-to-file}}
rm {{path-to-file}}

Input Types

By default, a parameter will accept any Text provided by the user. However, you can constrain what input is allowed by defining a more specific type.

Making a "Conventional Commit" Workflow

Let's use the following "convention commit" workflow to illustrate how to use different input types.

You can define additional properties, like a custom Label or a Description on all Input types. These fields help to document the script so it is clear what the inputs are and how they'll be used.

Executing the "Conventional Commit" Workflow

This is how the example workflow will appear when executed in the terminal.

Roadmap

  • Multiselect component
  • Filepicker component
  • Associate Workflows with specific projects
  • Configure environment variables in parent shell
  • Support for more scripting languages
  • Are we missing something? Create a feature request →