compose, verify, and share form contracts at the command line
Pull request Compare This branch is 8 commits ahead, 25 commits behind commonform:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Compose, verify, and share form contracts at the command line.


At the command line, with npm installed:

npm --global install commonform-cli
commonform --help

commonform-cli is tested on the current Stable and Long Term Support (LTS) versions of Node.js. Please see the Travis CI configuration file.


You may like to download a few sample form documents to start:

$ git clone samples
$ cd samples

To format a form, say the Orrick Mutual NDA, for reading in the terminal:

$ commonform render Orrick-Mutual-NDA.commonform

To convert to OfficeOpenXML (.docx) for Microsoft Word:

$ commonform render --format docx Orrick-Mutual-NDA.commonform

And with a title:

$ commonform render --title "Mutual Nondisclosure Agreement" --format docx Orrick-Mutual-NDA.commonform

To check a form for technical errors:

$ commonform lint SAFE-MFN.commonform

To view automated style critiques:

$ commonform critique IBM-Cloud-Services-Agreement.commonform

To hash a form:

$ commonform hash Contract-Standards-TOS.commonform

To apply a different section-numbering scheme:

$ commonform render --title "Mutual Nondisclosure Agreement" --format docx --number decimal Orrick-Mutual-NDA.commonform

To see a list of additional subcommands and their options:

$ commonform --usage

Related Projects

For Vim users there is also vim-commonform with syntax highlighting and conveniences for Common Form markup.

Schema Validation

Does your context JSON fit the commonform? Are there unfilled blanks or type mismatches? You could define a JSON schema based on the form and validate the JSON against the schema. This functionality isn't part of the commonform-cli, and can be done separately by any number of schema validators. See the cftemplate repository for an example, in examples/SAFE.schema.json.