Installing Cosma
Cosma is a command-line program and works with plain text files. It is available on any platform where you can install Node.js.
If this seems scary, don’t leave yet! We’ve put together a Getting Started page with a step-by-step guide to using the command-line and plain text files. If you’ve never opened a terminal, go ahead and check it. You can come back here later to install Cosma.
Pre-requisite
Download and install Node.js. Cosma requires version 12 or higher.
You can check whether Node.js is already installed on your machine by opening a terminal and using the following command:
node --version
If you see a version number, Node.js is installed.
NPM, the Node.js Package Manager, is installed automatically with Node.js. NPM can be used to install, update and uninstall Cosma.
Installing
You can install Cosma with NPM. We recommend you install globally using the -g
flag. This allows you to run Cosma from anywhere using the command cosma
.
npm install @graphlab-fr/cosma -g
Alternatively, you can also install Cosma as a dependency of a specific Node.js project. Use the following command from the root of the project:
npm install @graphlab-fr/cosma
When installed this way, use the command ./node_modules/.bin/cosma
from the root of the project to run Cosma.
Updating
You can check for outdated NPM packages with the following command:
npm outdated
If Cosma is mentioned, then it means a more recent version is available.
To update Cosma:
npm update cosma -g
Uninstalling
npm uninstall @graphlab-fr/cosma -g