Skip to content
[Pre-alpha] Workflow helper for Common Workflow Language
Python TypeScript
Branch: master
Clone or download

Benten (pre-alpha)

This is a language server for Common Workflow Language documents.

Many advanced CWL users are comfortable creating tools and workflows "by hand" using a plain text editor. When creating complex enough workflows navigating and editing the resultant document and sub-documents can get tedious. Keeping track of the bigger picture (what components have been added, what connections have been set) can also get hard.

Benten is a language server that offers help with code snippets, navigation and syntax checking of CWL documents.

Benten is written using Python3 and developed against VS Code. The language server component will work with any editor/IDE that offers language server support. Syntax highlighting is currently only available for the VS Code extension. The VS Code extension is written in Typescript.

Tests codecov

Features Implemented (version 2019.05.31)


  • CWL syntax highlighting, CWL grammar parsing (1)
  • Embedded JS expression highlighting (2)
  • Navigate to linked sub-workflows (3)
  • Outline view (Symbols) + Step symbols (4)
  • Code snippets for process types, inputs, requirements
  • Error squiggles indicating YAML and CWL issues
  • File path autocomplete for linked files in run field

Server installation

Benten requires Python 3.7 or later

If you will be installing from source you will need git on your system

A neat way to install benten in a virtual env (isolating it from your system python) and still be able to call it as a regular executable is to use pipx

pip3 install pipx  # in case you don't have pipx
pipx install --spec git+ benten

Note: pipx installs the executables in $HOME/.local/bin (%HOMEPATH%\.local\bin for Windows). This needs to be added to your PATH env variable

To install from develop branch (or some other branch):

pipx install -spec git+ benten

Or, if you have cloned the repository and want to play with the server code itself:

pipx install -e benten

Install VS Code extension

  • Download the VS Code extension file (.vsix) from the releases page
  • In the extensions pane on VS Code use "Install from VSIX..." to install this .vsix file

Using with VI/Vim

See this page please.

Tips and Tricks

Benten attaches onto your regular text editor and offers help by way of auto-completions and document validations, so most of its functionality is exposed naturally via the editor's regular UI, and a specialized tutorial is not necessary, but some helpful tips and tricks are listed in this page.

For developers

See the development documentation


Apache 2.0


The low level client-server communication code is taken from Sourcegraph's (now defunct) Python Language Server as is the VS Code client code (which was based originally off Microsoft's example code). The CWL preview uses vis.js

What's in a name?

Saraswati is the Hindu goddess of learning and knowledge and a long time ago she visited Japan, where she is known as Benzaiten (Benten for short) and her sitar has morphed into a Japanese biwa but she has kept some of her many arms.

Benzaiten is the goddess of everything that flows: water, time, words, speech, eloquence, music and by extension, knowledge. Therefore Benten is an appropriate goddess for scientific workflow developers.


(c) 2019 Seven Bridges Genomics. Rabix is a registered trademark of Seven Bridges Genomics
You can’t perform that action at this time.