Nemo Bridge Command Line Utility
Last updated 6 months ago by kpollock .
ISC · Repository · Original npm · Tarball · package.json
$ cnpm install @nowtilus/nemo-cli 
SYNC missed versions from official npm registry.

[N]emo [B]ridge [C]ommand [L]ine [U]tility

pipeline status coverage report

This project represents the Nemo CLI, which will allow you to operate and execute certain functions of the Nemo Bridge from your favourite Shell.

Getting Started


Install NodeJS version 10 or above from: https://nodejs.org

To install or update nemo-cli to the latest version use:

npm i -g @nowtilus/nemo-cli

Note: On Linux and MacOS systems you may have to run the command as root to allow th eglobal installation

sudo npm i -g @nowtilus/nemo-cli


After the installation process has finished you can use the tool like

# General usage
nemo <resource> <action> [options] <file>

# Example
nemo contracts export --studio "Awesome studio" path/to/contracts/directory # Will generate a contracts export to the specified directory

If you are not sure how to use the tool for a resource or action you can get help on every level:

nemo -h # lists all the available resources
nemo <resource> -h # lists the actions for that resource
nemo <resource> <action> -h # explains how to use that action and lists the available options

Environment Variables

To tell the cli-tool which nemo endpoint to connect to and which credentials to use there are some environment variables:

  • NEMO_USER - nemo API user ID / client ID
  • NEMO_PASSWORD - nemo API user password / client secret
  • NEMO_ORIGIN - HTTP endpoint of Nemo API

You can either use them preceding to the programm call like (not recommended):

NEMO_USER=user \
NEMO_PASSWORD=password \
NEMO_ORIGIN=https://some-nemo.nowtilus.tv \
nemo <resource> <action> [options] <file>

Or you can create a .env file containing this variables (recommended). The file should be called .env and contain the following content:


You can edit the file with any text editor you like. Note: All values need to be changed according to the system you are requesting.

If the file is in the same folder you are running the nemo-cli it will be automatically detected. Otherwise you can specify it with the CONFIG environment variable:

# If there is a .env file in your present working directory
nemo <resource> <action> [options] <file>

# If the .env file is else where on your system
# MacOS & Linux:
CONFIG=/path/to/.env nemo <resource> <action> [options] <file>
# Windows:
set CONFIG=/path/to/.env
nemo <resource> <action> [options] <file>

This is espacially usefull if you want to switch between multiple environments like staging and production.



Generate titles in Nemo from an order list

nemo orders importTitles -t <type> <file>
  • Prepare your work folder - have CSV files for season, series, episodes, movies and collections to order


# Import movies from an order list
nemo orders importTitles --type movie files/movie-orders-title.csv

# Import collections from an order list
nemo orders importTitles -t collection files/collection-orders-title.csv

# Import seasons from an order list
nemo orders importTitles -t episode files/episode-orders-title.csv

# Import seasons from an order list
nemo orders importTitles -t season files/season-orders-title.csv

# Import series from an order list
nemo orders importTitles -t series files/series-orders-title.csv



nemo licenses export -s <studio> -c <concurrency> <file>


# export all titles with license
nemo licenses export files/license-report.csv

# export with 4 concurrent requests
nemo licenses export -c 4 files/license-report.csv

# only export titles for the given studio
nemo licenses export -s "20th Century Fox" files/fox-license-report.csv


<<<<<<< HEAD ./cli.js -c order -e staging -h "https://talktalk-nemo-staging.nowtilus.tv" --episodeInput Nowtilus_Order_Form_TVOD_EST_Movie_TV_2018-10-12_EPISODE.csv --clientId admin --clientSecret n0wt1lus

Create a License CSV Export


Pomotions Export


The export will produce a list of all current promotions in the system. This list can be changes and imported again later


nemo promotions export files/promotions.csv

Pomotions Import

To import a list of promotions you have to specify a CSV file containing all the promotions you want to insert or update in the system. Note: Always follow the CSV layout (including the correct head line names) defined in the example file: src/promotions/fixtures/promotions.csv


nemo promotions import files/promotions.csv


Contracts Export

The export will produce a XLSX file for every contract in the system. This XLSX can be changes and imported again later.


# export all contracts as seperate files to a folder
nemo contracts export files/contracts-folder

# export only contracts for a given licensor
nemo contracts export -l "20th Century Fox" files/contracts-folder

Contracts Import

To Import a collection of contract XLSX files or a dedicated one follow the examples below


# Import all XLSX files from the given folder
nemo contracts import files/contracts-folder

# Import one dedicated contract
nemo contracts import files/contracts-folder/STUDIO_X.xlsx

WSR corrections

nemo wsr format -o <outputPath> -s <separator> -e <ending> <inputPath>

# separator (optional) - refers to the input file, defaults to ","
# ending (optional) - line ending for output file - defaults to "\n"

Will take all csv files in inputPath (assuming export from Azure wsrTbExport) and reformat them as we require for Talk-Talk and save as csv in outputPath.


	nemo wsr format -o 'C:\data\WSR\output\transformed' 'C:\data\WSR\output\actual'

NOTE THAT THE output folder comes first with a -o flag !!!

Split avails file

nemo avails split -o <outputPath> -s <sheetName> -l <columnHeadersLine> -i <titleColumn> -m <maxLinesPerFile> <file>

# outputPath, [optional] outputPath for results, defaults to same as file.
# sheetName, [optional] worksheet name, defaults to "Avails". You can also use an index (like 0) instead of sheet name,
# columnHeadersLine [required] the line number of the line on the spreadsheet that has the column names.
# titleColumn [required] Column name that is present for all titles and uniquely identifies a title.
# maxLinesPerFile [required] maximum lines per output file. A title will never span files, so files can possibly be larger.

Will split avails file into smaller chunks to stop AvMa failing. Files are named after the input file e.g. for input file sampleAvails.0.xlsx, you get sampleAvails.0.xlsx, sampleAvails.1.xlsx etc...


	nemo avails split -o 'C:\data\availsplit\output\' -l 14 -i 'Title Name' -m 3000 'C:\data\avails\sampleAvails.xlsx'

Current Tags

  • 2.0.12                                ...           latest (6 months ago)

14 Versions

  • 2.0.12                                ...           6 months ago
  • 2.0.11                                ...           9 months ago
  • 2.0.10                                ...           9 months ago
  • 2.0.9                                ...           a year ago
  • 2.0.8                                ...           a year ago
  • 2.0.7                                ...           a year ago
  • 2.0.6                                ...           a year ago
  • 2.0.5                                ...           a year ago
  • 2.0.4                                ...           a year ago
  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (2)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (17)
Dev Dependencies (10)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |