Installation

Requirements

Installation and use of materials_commons.cli requires Python 3, for instance from https://www.python.org.

Install using pip

pip install materials-commons-cli

or, to install in your user directory:

pip install --user materials-commons-cli

If installing to a user directory, you may need to set your PATH to find the installed mc program. This can be done using:

export PATH=$PATH:`python -m site --user-base`/bin

Install from source

  1. Clone the repository:

cd /path/to/
git clone https://github.com/materials-commons/mccli.git
cd mccli
  1. Checkout the branch/tag containing the version you wish to install. Latest is master:

git checkout master
  1. From the root directory of the repository:

pip install .

or, to install in your user directory:

pip install --user .

If installing to a user directory, you may need to set your PATH to find the installed scripts. This can be done using:

export PATH=$PATH:`python -m site --user-base`/bin

Checking installation

When materials_commons.cli is installed correctly you should be to run the mc program and view the help menu:

$ mc --help
usage: mc <command> [<args>]

The standard mc commands are:
  remote     List servers                            
  proj       List projects                           
  dataset    List datasets                           
  expt       List experiments                        
  init       Initialize a new project                
  clone      Clone an existing project               
  ls         List directory contents                 
  mkdir      Make directories                        
  rm         Remove files and directories            
  mv         Move files                              
  up         Upload files                            
  down       Download files                          
  globus     Manage Globus uploads and downloads     
  versions   List file versions                      
  config     Configure `mc`                          

Materials Commons command line interface

positional arguments:
  command     Subcommand to run

optional arguments:
  -h, --help  show this help message and exit