CLI

This document describes the current command-line surface of this repository.

The CLI entrypoint is:

node bin.js <command>

When installed globally, the same surface is exposed through the package binaries.

Most common commands

Start the server

node bin.js start

This starts the SSB server, HTTP UI, websocket support, and loaded plugins.

You can pass config overrides after --:

node bin.js start -- --port 9009 --ws.port 9989

Identify the current feed

node bin.js whoami

Inspect peers

node bin.js gossip.peers

Create invites

node bin.js invite.create 1
node bin.js invite.create 5

Rebuild the web UI

npm run build:web

Resync archived scuttlebot docs from vendored source

npm run sync:scuttlebot-docs

Command groups

The exact command list is available with:

node bin.js list-commands

In practice, the command surface falls into a few main groups.

Core message and feed commands

These cover message publication and reading:

Blob commands

These cover content-addressed file storage:

Social graph commands

These cover follows, blocks, and graph inspection:

Gossip and replication commands

These cover peers and replication-related surfaces:

Invite commands

These cover invite creation and acceptance:

Configuration and discovery commands

These cover server identity and surface inspection:

How command help works

The repo includes curated CLI help entries in lib/cli-help.js.

For many commands, the fastest way to understand current usage is:

node bin.js help <command>

Examples:

node bin.js help publish
node bin.js help gossip.peers
node bin.js help invite.create

Notes on current behavior

Prefer current working surfaces

The CLI should be understood in terms of the current implementation in this repo.

In particular, current workflows should prefer the APIs and commands that are backed by the current database layer, such as:

Legacy query-related surfaces

Some legacy or compatibility-oriented command/API surfaces may still appear in manifests or command listings. If they are not part of the intended primary interface of this repo, they should not be treated as the main way to use the system.

The primary docs should focus on the current supported path, not on legacy indexing internals.

Recommended mental model

Use the CLI for three main jobs:

For web use, the CLI and the HTTP UI are complementary: