Skip to main content
Version: 0.3.x

CLI: model:* commands

The group of CLI model:* commands enables discovery of Models, as well as their creation and interactions with them

Command List

Usage

composedb model:list

Display a paginated list of models indexed on the connected ceramic node, which needs to be indexing model streams.

This currently is the main entry path to Composites Discovery

USAGE
$ composedb model:list

OPTIONS
--table display results as a table rather than as formatted JSON
-i, --indexer-url URL of a Ceramic API that indexes model streams.

composedb model:content

Load the contents of a model stream with a given ID.

You should use this command to check if an existing model found through Composites Discovery has the fields you need.

USAGE
$ composedb model:content STREAMID

ARGUMENTS
STREAMID ID of the stream

OPTIONS
-c, --ceramic-url Ceramic API URL
-o, --output Path to a file where the content should be saved

composedb model:controller

Load the model stream with a given ID and display its controller DID (identifier for the Ceramic Account that owns the model)

USAGE
$ composedb model:controller STREAMID

ARGUMENTS
STREAMID ID of the stream

OPTIONS
-c, --ceramic-url Ceramic API URL

composedb model:create

Create a model stream with given content.

Most of the time you shouldn't be using this command directly. Instead, you should first check if a model you need already exists, using Composites Discovery and only if you can't find a model that you need, you should create one indirectly by creating a Composite from a GraphQL Composite Schema.

USAGE
$ composedb model:create CONTENT

ARGUMENTS
CONTENT contents of the model encoded as JSON

OPTIONS
-c, --ceramic-url Ceramic API URL
-k, --did-private-key DID Private Key (you can generate a fresh private key using composedb did:generate-private-key)