Skip to content

CLI Installation

The CLI provides a way to start a JavaScript Ceramic node and interact with it from the command line. This page describes how to set up your CLI.

If you are looking to spin up a hosted node for other use cases such as for use with the JS HTTP Client or as a secondary node for redundant stream pinning and replication, see Hosting a node.

Requirements

Installing the CLI requires a console, Node.js v14, and npm v6. Make sure to have these installed on your machine.

While npm v7 is not officially supported, you may still be able to get it to work. You will need to install the node-pre-gyp package globally. This is required until node-webrtc which IPFS depends on is upgraded.

npm install -g node-pre-gyp

1. Install the CLI

Open your console and install the CLI using npm.

npm install -g @ceramicnetwork/cli

2. Start the Ceramic node

This starts a local JavaScript Ceramic node on the Clay Testnet at https://localhost:7007.

ceramic daemon

This localhost setup allows you to read streams from other nodes connected on the same network, but writes to your local node will only be available on your local node and on other nodes found on the peerlist. They will not be available to every node on the network. For greater connectivity, you might want to connect your CLI to a remote long-lived Ceramic node.

3. Configure a network

(Optional) By default, the JS CLI starts a node on the Clay Testnet. If you would like to use a different network, you can specify this using the --network option. View available networks. Note, the CLI can not yet be used with Mainnet.

4. Configure a node URL

(Optional) It is possible to use the CLI with a remote Ceramic node over HTTP, instead of a local node. To do this, use the config set command to set the ceramicHost variable to the URL of the node you wish to use.

ceramic config set ceramicHost 'https://yourceramicnode.com'

When using the CLI with a remote node, you have a few options:

Authentication

By default, the CLI is authenticated using the Key DID Provider. The seed for this DID is stored in ~/.ceramic/config.json. If this file is not present on startup a new DID will be randomly generated. It's currently not possible to use the Ceramic CLI with other DID methods.