Skip to main content

Working with CLI

The Command-Line interface is a vital part for the Frictionless Framework. While working within Python provides more flexibility, CLI is the easist way to interact with Frictionless.

Install#

To install the package please follow the Quick Start guide. Usually, a simple installation using Pip or Anaconda will install the frictionless binary on your computer so you don't need to install CLI aditionally.

Commands#

The frictionless binary requires providing a command like describe or validate:

CLI
frictionless describe # to describe your data
frictionless extract # to extract your data
frictionless validate # to validate your data
frictionless transform # to transform your data
frictionless --help # to get list of the command
frictionless --version # to get the version

Arguments#

All the arguments for the main CLI command are the same as they are in Python. You can read Guides and use almost all the information from there within the command-line. There is an important different in how arguments are written (note the dashes):

Python: validate('data/table.csv', limit_errors=1)
CLI: $ validate data/table.csv --limit-errors 1

To get help for a command and its arguments you can use the help flag with the command:

CLI
frictionless describe --help # to get help for describe
frictionless extract --help # to get help for extract
frictionless validate --help # to get help for validate
frictionless transform --help # to get help for transform

Outputs#

Usually, Frictionless commands returns pretty-formatted tabular data like extract or validate do. For the describe command you get a metadata back and you can choose in what format to return it:

CLI
frictionless describe # default YAML with a commented front-matter
frictionless describe --yaml # standard YAML
frictionless describe --json # standard JSON

Errors#

The Frictionless' CLI interface should not fail with any internal Python errors with a traceback (a long listing of related code). If you see something like this please create an issue in the Issue Tracker.