@bitsocial/bitsocial-cli 0.19.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +706 -0
- package/bin/dev +20 -0
- package/bin/dev.cmd +3 -0
- package/bin/postinstall.js +125 -0
- package/bin/run +13 -0
- package/bin/run.cmd +3 -0
- package/dist/challenge-packages/challenge-utils.d.ts +24 -0
- package/dist/challenge-packages/challenge-utils.js +304 -0
- package/dist/cli/base-command.d.ts +11 -0
- package/dist/cli/base-command.js +45 -0
- package/dist/cli/commands/challenge/install.d.ts +12 -0
- package/dist/cli/commands/challenge/install.js +131 -0
- package/dist/cli/commands/challenge/list.d.ts +10 -0
- package/dist/cli/commands/challenge/list.js +37 -0
- package/dist/cli/commands/challenge/remove.d.ts +12 -0
- package/dist/cli/commands/challenge/remove.js +60 -0
- package/dist/cli/commands/community/create.d.ts +12 -0
- package/dist/cli/commands/community/create.js +54 -0
- package/dist/cli/commands/community/delete.d.ts +10 -0
- package/dist/cli/commands/community/delete.js +44 -0
- package/dist/cli/commands/community/edit.d.ts +12 -0
- package/dist/cli/commands/community/edit.js +74 -0
- package/dist/cli/commands/community/get.d.ts +9 -0
- package/dist/cli/commands/community/get.js +32 -0
- package/dist/cli/commands/community/list.d.ts +9 -0
- package/dist/cli/commands/community/list.js +30 -0
- package/dist/cli/commands/community/start.d.ts +13 -0
- package/dist/cli/commands/community/start.js +46 -0
- package/dist/cli/commands/community/stop.d.ts +10 -0
- package/dist/cli/commands/community/stop.js +44 -0
- package/dist/cli/commands/daemon.d.ts +14 -0
- package/dist/cli/commands/daemon.js +484 -0
- package/dist/cli/commands/logs.d.ts +24 -0
- package/dist/cli/commands/logs.js +199 -0
- package/dist/cli/commands/subplebbit/create.d.ts +12 -0
- package/dist/cli/commands/subplebbit/create.js +54 -0
- package/dist/cli/commands/subplebbit/edit.d.ts +12 -0
- package/dist/cli/commands/subplebbit/edit.js +73 -0
- package/dist/cli/commands/subplebbit/get.d.ts +9 -0
- package/dist/cli/commands/subplebbit/get.js +32 -0
- package/dist/cli/commands/subplebbit/list.d.ts +9 -0
- package/dist/cli/commands/subplebbit/list.js +30 -0
- package/dist/cli/commands/subplebbit/start.d.ts +10 -0
- package/dist/cli/commands/subplebbit/start.js +41 -0
- package/dist/cli/commands/subplebbit/stop.d.ts +10 -0
- package/dist/cli/commands/subplebbit/stop.js +43 -0
- package/dist/cli/commands/update/check.d.ts +6 -0
- package/dist/cli/commands/update/check.js +28 -0
- package/dist/cli/commands/update/install.d.ts +12 -0
- package/dist/cli/commands/update/install.js +63 -0
- package/dist/cli/commands/update/versions.d.ts +9 -0
- package/dist/cli/commands/update/versions.js +29 -0
- package/dist/cli/hooks/init/version-hook.d.ts +3 -0
- package/dist/cli/hooks/init/version-hook.js +43 -0
- package/dist/cli/hooks/prerun/parse-dynamic-flags-hook.d.ts +3 -0
- package/dist/cli/hooks/prerun/parse-dynamic-flags-hook.js +94 -0
- package/dist/cli/types.d.ts +4 -0
- package/dist/cli/types.js +1 -0
- package/dist/common-utils/data-migration.d.ts +1 -0
- package/dist/common-utils/data-migration.js +27 -0
- package/dist/common-utils/defaults.d.ts +9 -0
- package/dist/common-utils/defaults.js +10 -0
- package/dist/common-utils/resolvers.d.ts +2 -0
- package/dist/common-utils/resolvers.js +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/ipfs/startIpfs.d.ts +3 -0
- package/dist/ipfs/startIpfs.js +304 -0
- package/dist/seeder.d.ts +1 -0
- package/dist/seeder.js +83 -0
- package/dist/update/npm-registry.d.ts +6 -0
- package/dist/update/npm-registry.js +66 -0
- package/dist/update/semver.d.ts +5 -0
- package/dist/update/semver.js +29 -0
- package/dist/util.d.ts +31 -0
- package/dist/util.js +157 -0
- package/dist/webui/daemon-server.d.ts +10 -0
- package/dist/webui/daemon-server.js +140 -0
- package/package.json +143 -0
package/README.md
ADDED
|
@@ -0,0 +1,706 @@
|
|
|
1
|
+
[](http://commitizen.github.io/cz-cli/)
|
|
2
|
+
|
|
3
|
+
# bitsocial-cli: A Bitsocial Node with WebSocket and Command Line Interface
|
|
4
|
+
|
|
5
|
+
<p align="left">
|
|
6
|
+
<img src="./docs/assets/readme/cli-banner.jpg" alt="CLI banner" height="100" />
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
## Table of contents
|
|
10
|
+
|
|
11
|
+
- [What is Bitsocial?](#what-is-bitsocial)
|
|
12
|
+
- [What is bitsocial-cli?](#what-is-bitsocial-cli)
|
|
13
|
+
- [Install](#install)
|
|
14
|
+
- [Docker](#docker)
|
|
15
|
+
- [Usage](#usage)
|
|
16
|
+
- [Commands](#commands)
|
|
17
|
+
- [Contribution](#contribution)
|
|
18
|
+
- [Feedback](#feedback)
|
|
19
|
+
|
|
20
|
+
## What is Bitsocial?
|
|
21
|
+
|
|
22
|
+
Bitsocial is p2p and decentralized social media protocol built completely with IPFS/IPNS/pubsub. It doesn't use any central server, central database, public HTTP endpoint or DNS, it is pure peer to peer and fully content addressable. It will allow community owners to retain full ownership over their community. Whitepaper [here](https://github.com/plebbit/whitepaper/discussions/2)
|
|
23
|
+
|
|
24
|
+
## What is bitsocial-cli?
|
|
25
|
+
|
|
26
|
+
`bitsocial-cli` is an interface to the backend of PKC protocol using [pkc-js](https://github.com/pkcprotocol/pkc-js). Users can run and manage their communities using it. It is written in Typescript and designed to receive commands via CLI and WebSocket.
|
|
27
|
+
|
|
28
|
+
- Runs an IPFS and Bitsocial node
|
|
29
|
+
- Command Line interface to manage Bitsocial communities
|
|
30
|
+
- WebSocket RPC to access and control your communities and publications
|
|
31
|
+
- Includes Web UIs like Seedit where you can browse the network and manage your community
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
Requires [Node.js 22](https://nodejs.org/) or later.
|
|
36
|
+
|
|
37
|
+
```sh-session
|
|
38
|
+
npm install -g @bitsocial/bitsocial-cli
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
To install a specific version:
|
|
42
|
+
|
|
43
|
+
```sh-session
|
|
44
|
+
npm install -g @bitsocial/bitsocial-cli@0.19.39
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
To update to the latest version:
|
|
48
|
+
|
|
49
|
+
```sh-session
|
|
50
|
+
bitsocial update install
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Build from source (optional)
|
|
54
|
+
|
|
55
|
+
If you want to build from source directly:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
git clone https://github.com/bitsocialnet/bitsocial-cli
|
|
59
|
+
cd bitsocial-cli
|
|
60
|
+
npm ci
|
|
61
|
+
npm run build
|
|
62
|
+
npx oclif manifest
|
|
63
|
+
npm run ci:download-web-uis
|
|
64
|
+
./bin/run --help
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
After running the last command you should be able to run commands directly against `./bin/run`, for example `./bin/run daemon`
|
|
68
|
+
|
|
69
|
+
## Docker
|
|
70
|
+
|
|
71
|
+
You can run bitsocial-cli as a Docker container. The container runs the daemon and exposes the RPC + web UI on port 9138, the Kubo IPFS API on port 50019, and the IPFS Gateway on port 6473.
|
|
72
|
+
|
|
73
|
+
Once your container is running, you can use one of the bundled web UIs to browse the Bitsocial network and manage your communities -- no CLI commands needed. The web UIs provide a full-featured interface for creating communities, moderating, and browsing content entirely through your browser. All the Web UIs are interopable so you can post and read from whichever you like and you can see your own content on each client.
|
|
74
|
+
|
|
75
|
+
If you're a power user, you can also run CLI commands against the running container with `docker exec`:
|
|
76
|
+
|
|
77
|
+
```sh-session
|
|
78
|
+
docker exec bitsocial bitsocial community list
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Data paths inside the container
|
|
82
|
+
|
|
83
|
+
| Path | Description |
|
|
84
|
+
|---|---|
|
|
85
|
+
| `/data/bitsocial` | Bitsocial data directory |
|
|
86
|
+
| `/data/bitsocial/subplebbits` | Community SQLite databases |
|
|
87
|
+
| `/data/bitsocial/.bitsocial-cli.ipfs` | Kubo IPFS repository |
|
|
88
|
+
| `/logs/bitsocial` | Log files |
|
|
89
|
+
|
|
90
|
+
The Docker volumes `bitsocial-data:/data` and `bitsocial-logs:/logs` are mapped to `/data` and `/logs` inside the container. The `bitsocial` subdirectory is created automatically by the application.
|
|
91
|
+
|
|
92
|
+
### Docker Compose (recommended)
|
|
93
|
+
|
|
94
|
+
Copy the example compose file and start the node:
|
|
95
|
+
|
|
96
|
+
```sh-session
|
|
97
|
+
cp docker-compose.example.yml docker-compose.yml
|
|
98
|
+
docker compose up -d
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
View the startup logs to find your auth key URL:
|
|
102
|
+
|
|
103
|
+
```sh-session
|
|
104
|
+
docker compose logs -f
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The output will include lines like:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
plebbit rpc: listening on ws://localhost:9138/<auth-key> (secret auth key for remote connections)
|
|
111
|
+
WebUI (seedit - Similar to old reddit UI): http://<your-ip>:9138/<auth-key>/seedit (secret auth key for remote connections)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Open the WebUI URL in your browser to start using Bitsocial.
|
|
115
|
+
|
|
116
|
+
#### Viewing logs
|
|
117
|
+
|
|
118
|
+
There are two ways to view logs from a Docker container:
|
|
119
|
+
|
|
120
|
+
**Quick logs** — shows stdout output only (startup messages, errors):
|
|
121
|
+
|
|
122
|
+
```sh-session
|
|
123
|
+
docker compose logs -f # Docker Compose
|
|
124
|
+
docker logs -f bitsocial # Docker Run
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Full debug logs** — shows the complete daemon log including debug/trace output:
|
|
128
|
+
|
|
129
|
+
```sh-session
|
|
130
|
+
docker exec bitsocial bitsocial logs -f
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The `bitsocial logs` command supports several filtering flags:
|
|
134
|
+
|
|
135
|
+
```sh-session
|
|
136
|
+
docker exec bitsocial bitsocial logs -f # follow (stream new lines)
|
|
137
|
+
docker exec bitsocial bitsocial logs -n 100 # last 100 lines
|
|
138
|
+
docker exec bitsocial bitsocial logs --since 1h # entries from the last hour
|
|
139
|
+
docker exec bitsocial bitsocial logs --until 30m # entries up to 30 minutes ago
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Debug and trace logs are written only to the log file, not to stdout, so `docker logs` will not show them. Use `bitsocial logs` inside the container for the full picture.
|
|
143
|
+
|
|
144
|
+
#### Example docker-compose.yml
|
|
145
|
+
|
|
146
|
+
```yaml
|
|
147
|
+
services:
|
|
148
|
+
bitsocial:
|
|
149
|
+
image: ghcr.io/bitsocialnet/bitsocial-cli:latest
|
|
150
|
+
container_name: bitsocial
|
|
151
|
+
restart: unless-stopped
|
|
152
|
+
ports:
|
|
153
|
+
- "9138:9138" # PKC RPC + Web UI
|
|
154
|
+
- "50019:50019" # Kubo IPFS API
|
|
155
|
+
- "6473:6473" # IPFS Gateway
|
|
156
|
+
volumes:
|
|
157
|
+
- bitsocial-data:/data
|
|
158
|
+
- bitsocial-logs:/logs
|
|
159
|
+
environment:
|
|
160
|
+
- DEBUG=bitsocial*, pkc*, -pkc*trace
|
|
161
|
+
# Set a fixed auth key (useful for bookmarking the web UI URL).
|
|
162
|
+
# If left unset, a random key is generated on first start.
|
|
163
|
+
# - PKC_RPC_AUTH_KEY=your-custom-auth-key-here
|
|
164
|
+
# Override Kubo IPFS bind addresses / ports:
|
|
165
|
+
# - KUBO_RPC_URL=http://0.0.0.0:50019/api/v0
|
|
166
|
+
# - IPFS_GATEWAY_URL=http://0.0.0.0:6473
|
|
167
|
+
|
|
168
|
+
volumes:
|
|
169
|
+
bitsocial-data:
|
|
170
|
+
bitsocial-logs:
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Docker Run
|
|
174
|
+
|
|
175
|
+
```sh-session
|
|
176
|
+
docker run -d \
|
|
177
|
+
--name bitsocial \
|
|
178
|
+
--restart unless-stopped \
|
|
179
|
+
-p 9138:9138 \
|
|
180
|
+
-p 50019:50019 \
|
|
181
|
+
-p 6473:6473 \
|
|
182
|
+
-v bitsocial-data:/data \
|
|
183
|
+
-v bitsocial-logs:/logs \
|
|
184
|
+
ghcr.io/bitsocialnet/bitsocial-cli:latest
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
With a custom auth key:
|
|
188
|
+
|
|
189
|
+
```sh-session
|
|
190
|
+
docker run -d \
|
|
191
|
+
--name bitsocial \
|
|
192
|
+
--restart unless-stopped \
|
|
193
|
+
-p 9138:9138 \
|
|
194
|
+
-p 50019:50019 \
|
|
195
|
+
-p 6473:6473 \
|
|
196
|
+
-v bitsocial-data:/data \
|
|
197
|
+
-v bitsocial-logs:/logs \
|
|
198
|
+
-e PKC_RPC_AUTH_KEY=my-secret-key \
|
|
199
|
+
ghcr.io/bitsocialnet/bitsocial-cli:latest
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Building the Docker image locally
|
|
203
|
+
|
|
204
|
+
```sh-session
|
|
205
|
+
docker build -t bitsocial-cli .
|
|
206
|
+
docker run -p 9138:9138 -p 50019:50019 -p 6473:6473 bitsocial-cli
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Usage
|
|
210
|
+
|
|
211
|
+
### The data/config directory of Bitsocial
|
|
212
|
+
|
|
213
|
+
This is the default directory where bitsocial-cli will keep its config, as well as data for local communities:
|
|
214
|
+
|
|
215
|
+
- macOS: ~/Library/Application Support/bitsocial
|
|
216
|
+
- Windows: %LOCALAPPDATA%\bitsocial
|
|
217
|
+
- Linux: ~/.local/share/bitsocial
|
|
218
|
+
|
|
219
|
+
### The logs directory of Bitsocial
|
|
220
|
+
|
|
221
|
+
bitsocial-cli will keep logs in this directory, with a cap of 10M per log file.
|
|
222
|
+
|
|
223
|
+
- macOS: ~/Library/Logs/bitsocial
|
|
224
|
+
- Windows: %LOCALAPPDATA%\bitsocial\Log
|
|
225
|
+
- Linux: ~/.local/state/bitsocial
|
|
226
|
+
|
|
227
|
+
### Running Daemon
|
|
228
|
+
|
|
229
|
+
In Bash (or powershell if you're on Windows), run `bitsocial daemon` to able to connect to the network. You need to have the `bitsocial daemon` terminal running to be able to execute other commands.
|
|
230
|
+
|
|
231
|
+
```sh-session
|
|
232
|
+
$ bitsocial daemon
|
|
233
|
+
IPFS API listening on: http://localhost:5001/api/v0
|
|
234
|
+
IPFS Gateway listening on: http://localhost:6473
|
|
235
|
+
plebbit rpc: listening on ws://localhost:9138 (local connections only)
|
|
236
|
+
plebbit rpc: listening on ws://localhost:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL (secret auth key for remote connections)
|
|
237
|
+
Bitsocial data path: /root/.local/share/bitsocial
|
|
238
|
+
Communities in data path: [ 'pleblore.bso' ]
|
|
239
|
+
WebUI (plebones - A bare bones UI client): http://localhost:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/plebones (local connections only)
|
|
240
|
+
WebUI (plebones - A bare bones UI client): http://192.168.1.60:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/plebones (secret auth key for remote connections)
|
|
241
|
+
WebUI (seedit - Similar to old reddit UI): http://localhost:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/seedit (local connections only)
|
|
242
|
+
WebUI (seedit - Similar to old reddit UI): http://192.168.1.60:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/seedit (secret auth key for remote connections)
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Once `bitsocial daemon` is running, you can create and manage your communities through the web interfaces, either seedit or plebones. All the interfaces are interopable. If you're a power user and prefer CLI, then you can take a look at the commands below.
|
|
247
|
+
|
|
248
|
+
If you need to view detailed protocol or IPFS logs for debugging, you can use `bitsocial logs`. For example, `bitsocial logs --tail 50` shows the last 50 lines, or `bitsocial logs --since 1h` shows logs from the past hour.
|
|
249
|
+
|
|
250
|
+
#### Creating your first community
|
|
251
|
+
|
|
252
|
+
```sh-session
|
|
253
|
+
$ bitsocial community create --title "Hello World!" --description "This is gonna be great"
|
|
254
|
+
12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### Listing all your communities
|
|
258
|
+
|
|
259
|
+
```sh-session
|
|
260
|
+
$ bitsocial community list
|
|
261
|
+
Address Started
|
|
262
|
+
──────────────────────────────────────────────────── ───────
|
|
263
|
+
12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu true
|
|
264
|
+
business-and-finance.bso true
|
|
265
|
+
censorship-watch.bso true
|
|
266
|
+
health-nutrition-science.bso true
|
|
267
|
+
movies-tv-anime.bso true
|
|
268
|
+
pleblore.bso true
|
|
269
|
+
politically-incorrect.bso true
|
|
270
|
+
reddit-screenshots.bso false
|
|
271
|
+
videos-livestreams-podcasts.bso false
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
#### Adding a role moderator to your community
|
|
275
|
+
|
|
276
|
+
```sh-session
|
|
277
|
+
$ bitsocial community edit mysub.bso '--roles["author-address.bso"].role' moderator
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
#### Adding a role owner to your community
|
|
281
|
+
|
|
282
|
+
```sh-session
|
|
283
|
+
$ bitsocial community edit mysub.bso '--roles["author-address.bso"].role' owner
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
#### Adding a role admin to your community
|
|
287
|
+
|
|
288
|
+
```sh-session
|
|
289
|
+
$ bitsocial community edit mysub.bso '--roles["author-address.bso"].role' admin
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
#### Removing a role
|
|
293
|
+
|
|
294
|
+
```sh-session
|
|
295
|
+
$ bitsocial community edit mysub.bso '--roles["author-address.bso"]' null
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Commands
|
|
299
|
+
|
|
300
|
+
<!-- commands -->
|
|
301
|
+
* [`bitsocial challenge install PACKAGE`](#bitsocial-challenge-install-package)
|
|
302
|
+
* [`bitsocial challenge list`](#bitsocial-challenge-list)
|
|
303
|
+
* [`bitsocial challenge remove NAME`](#bitsocial-challenge-remove-name)
|
|
304
|
+
* [`bitsocial community create`](#bitsocial-community-create)
|
|
305
|
+
* [`bitsocial community delete ADDRESSES`](#bitsocial-community-delete-addresses)
|
|
306
|
+
* [`bitsocial community edit ADDRESS`](#bitsocial-community-edit-address)
|
|
307
|
+
* [`bitsocial community get ADDRESS`](#bitsocial-community-get-address)
|
|
308
|
+
* [`bitsocial community list`](#bitsocial-community-list)
|
|
309
|
+
* [`bitsocial community start ADDRESSES`](#bitsocial-community-start-addresses)
|
|
310
|
+
* [`bitsocial community stop ADDRESSES`](#bitsocial-community-stop-addresses)
|
|
311
|
+
* [`bitsocial daemon`](#bitsocial-daemon)
|
|
312
|
+
* [`bitsocial help [COMMAND]`](#bitsocial-help-command)
|
|
313
|
+
* [`bitsocial logs`](#bitsocial-logs)
|
|
314
|
+
|
|
315
|
+
## `bitsocial challenge install PACKAGE`
|
|
316
|
+
|
|
317
|
+
Install a challenge package (npm package name, git URL, tarball URL, or local path)
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
USAGE
|
|
321
|
+
$ bitsocial challenge install PACKAGE [--pkcOptions.dataPath <value>]
|
|
322
|
+
|
|
323
|
+
ARGUMENTS
|
|
324
|
+
PACKAGE Package specifier — anything npm can install (name, name@version, git URL, tarball URL, local path)
|
|
325
|
+
|
|
326
|
+
FLAGS
|
|
327
|
+
--pkcOptions.dataPath=<value> Data path to install the challenge into
|
|
328
|
+
|
|
329
|
+
DESCRIPTION
|
|
330
|
+
Install a challenge package (npm package name, git URL, tarball URL, or local path)
|
|
331
|
+
|
|
332
|
+
EXAMPLES
|
|
333
|
+
$ bitsocial challenge install @bitsocial/mintpass-challenge
|
|
334
|
+
|
|
335
|
+
$ bitsocial challenge install @bitsocial/mintpass-challenge@1.0.0
|
|
336
|
+
|
|
337
|
+
$ bitsocial challenge install github:user/repo
|
|
338
|
+
|
|
339
|
+
$ bitsocial challenge install https://example.com/my-challenge-1.0.0.tar.gz
|
|
340
|
+
|
|
341
|
+
$ bitsocial challenge install ./my-local-challenge
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
_See code: [src/cli/commands/challenge/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.38/src/cli/commands/challenge/install.ts)_
|
|
345
|
+
|
|
346
|
+
## `bitsocial challenge list`
|
|
347
|
+
|
|
348
|
+
List installed challenge packages
|
|
349
|
+
|
|
350
|
+
```
|
|
351
|
+
USAGE
|
|
352
|
+
$ bitsocial challenge list [-q] [--pkcOptions.dataPath <value>]
|
|
353
|
+
|
|
354
|
+
FLAGS
|
|
355
|
+
-q, --quiet Only display challenge names
|
|
356
|
+
--pkcOptions.dataPath=<value> Data path where challenges are installed
|
|
357
|
+
|
|
358
|
+
DESCRIPTION
|
|
359
|
+
List installed challenge packages
|
|
360
|
+
|
|
361
|
+
EXAMPLES
|
|
362
|
+
$ bitsocial challenge list
|
|
363
|
+
|
|
364
|
+
$ bitsocial challenge list -q
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
_See code: [src/cli/commands/challenge/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.38/src/cli/commands/challenge/list.ts)_
|
|
368
|
+
|
|
369
|
+
## `bitsocial challenge remove NAME`
|
|
370
|
+
|
|
371
|
+
Remove an installed challenge package
|
|
372
|
+
|
|
373
|
+
```
|
|
374
|
+
USAGE
|
|
375
|
+
$ bitsocial challenge remove NAME [--pkcOptions.dataPath <value>]
|
|
376
|
+
|
|
377
|
+
ARGUMENTS
|
|
378
|
+
NAME The challenge package name (e.g., my-challenge or @scope/my-challenge)
|
|
379
|
+
|
|
380
|
+
FLAGS
|
|
381
|
+
--pkcOptions.dataPath=<value> Data path where challenges are installed
|
|
382
|
+
|
|
383
|
+
DESCRIPTION
|
|
384
|
+
Remove an installed challenge package
|
|
385
|
+
|
|
386
|
+
EXAMPLES
|
|
387
|
+
$ bitsocial challenge remove my-challenge
|
|
388
|
+
|
|
389
|
+
$ bitsocial challenge remove @scope/my-challenge
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
_See code: [src/cli/commands/challenge/remove.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.38/src/cli/commands/challenge/remove.ts)_
|
|
393
|
+
|
|
394
|
+
## `bitsocial community create`
|
|
395
|
+
|
|
396
|
+
Create a community with specific properties. A newly created community will be started after creation and be able to receive publications. For a list of properties, visit https://github.com/pkcprotocol/pkc-js
|
|
397
|
+
|
|
398
|
+
```
|
|
399
|
+
USAGE
|
|
400
|
+
$ bitsocial community create --pkcRpcUrl <value> [--privateKeyPath <value>]
|
|
401
|
+
|
|
402
|
+
FLAGS
|
|
403
|
+
--pkcRpcUrl=<value> (required) [default: ws://localhost:9138/] URL to PKC RPC
|
|
404
|
+
--privateKeyPath=<value> Private key (PEM) of the community signer that will be used to determine address (if address
|
|
405
|
+
is not a domain). If it's not provided then PKC will generate a private key
|
|
406
|
+
|
|
407
|
+
DESCRIPTION
|
|
408
|
+
Create a community with specific properties. A newly created community will be started after creation and be able to
|
|
409
|
+
receive publications. For a list of properties, visit https://github.com/pkcprotocol/pkc-js
|
|
410
|
+
|
|
411
|
+
EXAMPLES
|
|
412
|
+
Create a community with title 'Hello Plebs' and description 'Welcome'
|
|
413
|
+
|
|
414
|
+
$ bitsocial community create --title 'Hello Plebs' --description 'Welcome'
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
_See code: [src/cli/commands/community/create.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.38/src/cli/commands/community/create.ts)_
|
|
418
|
+
|
|
419
|
+
## `bitsocial community delete ADDRESSES`
|
|
420
|
+
|
|
421
|
+
Delete a community permanently.
|
|
422
|
+
|
|
423
|
+
```
|
|
424
|
+
USAGE
|
|
425
|
+
$ bitsocial community delete ADDRESSES... --pkcRpcUrl <value>
|
|
426
|
+
|
|
427
|
+
ARGUMENTS
|
|
428
|
+
ADDRESSES... Addresses of communities to delete. Separated by space
|
|
429
|
+
|
|
430
|
+
FLAGS
|
|
431
|
+
--pkcRpcUrl=<value> (required) [default: ws://localhost:9138/] URL to PKC RPC
|
|
432
|
+
|
|
433
|
+
DESCRIPTION
|
|
434
|
+
Delete a community permanently.
|
|
435
|
+
|
|
436
|
+
EXAMPLES
|
|
437
|
+
$ bitsocial community delete plebbit.bso
|
|
438
|
+
|
|
439
|
+
$ bitsocial community delete 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
_See code: [src/cli/commands/community/delete.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.38/src/cli/commands/community/delete.ts)_
|
|
443
|
+
|
|
444
|
+
## `bitsocial community edit ADDRESS`
|
|
445
|
+
|
|
446
|
+
Edit a community's properties. For a list of properties, visit https://github.com/pkcprotocol/pkc-js
|
|
447
|
+
|
|
448
|
+
```
|
|
449
|
+
USAGE
|
|
450
|
+
$ bitsocial community edit ADDRESS --pkcRpcUrl <value>
|
|
451
|
+
|
|
452
|
+
ARGUMENTS
|
|
453
|
+
ADDRESS Address of the community to edit
|
|
454
|
+
|
|
455
|
+
FLAGS
|
|
456
|
+
--pkcRpcUrl=<value> (required) [default: ws://localhost:9138/] URL to PKC RPC
|
|
457
|
+
|
|
458
|
+
DESCRIPTION
|
|
459
|
+
Edit a community's properties. For a list of properties, visit https://github.com/pkcprotocol/pkc-js
|
|
460
|
+
|
|
461
|
+
EXAMPLES
|
|
462
|
+
Change the address of the community to a new domain address
|
|
463
|
+
|
|
464
|
+
$ bitsocial community edit 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu --address newAddress.bso
|
|
465
|
+
|
|
466
|
+
Add the author address 'esteban.bso' as an admin on the community
|
|
467
|
+
|
|
468
|
+
$ bitsocial community edit mysub.bso '--roles["esteban.bso"].role' admin
|
|
469
|
+
|
|
470
|
+
Add two challenges to the community. The first challenge will be a question and answer, and the second will be an
|
|
471
|
+
image captcha
|
|
472
|
+
|
|
473
|
+
$ bitsocial community edit mysub.bso --settings.challenges[0].name question \
|
|
474
|
+
--settings.challenges[0].options.question "what is the password?" --settings.challenges[0].options.answer \
|
|
475
|
+
thepassword --settings.challenges[1].name captcha-canvas-v3
|
|
476
|
+
|
|
477
|
+
Change the title and description
|
|
478
|
+
|
|
479
|
+
$ bitsocial community edit mysub.bso --title "This is the new title" --description "This is the new description"
|
|
480
|
+
|
|
481
|
+
Remove a role from a moderator/admin/owner
|
|
482
|
+
|
|
483
|
+
$ bitsocial community edit plebbit.bso --roles['rinse12.bso'] null
|
|
484
|
+
|
|
485
|
+
Enable settings.fetchThumbnailUrls to fetch the thumbnail of url submitted by authors
|
|
486
|
+
|
|
487
|
+
$ bitsocial community edit plebbit.bso --settings.fetchThumbnailUrls
|
|
488
|
+
|
|
489
|
+
disable settings.fetchThumbnailUrls
|
|
490
|
+
|
|
491
|
+
$ bitsocial community edit plebbit.bso --settings.fetchThumbnailUrls=false
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
_See code: [src/cli/commands/community/edit.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.38/src/cli/commands/community/edit.ts)_
|
|
495
|
+
|
|
496
|
+
## `bitsocial community get ADDRESS`
|
|
497
|
+
|
|
498
|
+
Fetch a local or remote community, and print its json in the terminal
|
|
499
|
+
|
|
500
|
+
```
|
|
501
|
+
USAGE
|
|
502
|
+
$ bitsocial community get ADDRESS --pkcRpcUrl <value>
|
|
503
|
+
|
|
504
|
+
ARGUMENTS
|
|
505
|
+
ADDRESS Address of the community to fetch
|
|
506
|
+
|
|
507
|
+
FLAGS
|
|
508
|
+
--pkcRpcUrl=<value> (required) [default: ws://localhost:9138/] URL to PKC RPC
|
|
509
|
+
|
|
510
|
+
DESCRIPTION
|
|
511
|
+
Fetch a local or remote community, and print its json in the terminal
|
|
512
|
+
|
|
513
|
+
EXAMPLES
|
|
514
|
+
$ bitsocial community get plebmusic.bso
|
|
515
|
+
|
|
516
|
+
$ bitsocial community get 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
_See code: [src/cli/commands/community/get.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.38/src/cli/commands/community/get.ts)_
|
|
520
|
+
|
|
521
|
+
## `bitsocial community list`
|
|
522
|
+
|
|
523
|
+
List your communities
|
|
524
|
+
|
|
525
|
+
```
|
|
526
|
+
USAGE
|
|
527
|
+
$ bitsocial community list --pkcRpcUrl <value> [-q]
|
|
528
|
+
|
|
529
|
+
FLAGS
|
|
530
|
+
-q, --quiet Only display community addresses
|
|
531
|
+
--pkcRpcUrl=<value> (required) [default: ws://localhost:9138/] URL to PKC RPC
|
|
532
|
+
|
|
533
|
+
DESCRIPTION
|
|
534
|
+
List your communities
|
|
535
|
+
|
|
536
|
+
EXAMPLES
|
|
537
|
+
$ bitsocial community list -q
|
|
538
|
+
|
|
539
|
+
$ bitsocial community list
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
_See code: [src/cli/commands/community/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.38/src/cli/commands/community/list.ts)_
|
|
543
|
+
|
|
544
|
+
## `bitsocial community start ADDRESSES`
|
|
545
|
+
|
|
546
|
+
Start a community
|
|
547
|
+
|
|
548
|
+
```
|
|
549
|
+
USAGE
|
|
550
|
+
$ bitsocial community start ADDRESSES... --pkcRpcUrl <value>
|
|
551
|
+
|
|
552
|
+
ARGUMENTS
|
|
553
|
+
ADDRESSES... Addresses of communities to start. Separated by space
|
|
554
|
+
|
|
555
|
+
FLAGS
|
|
556
|
+
--pkcRpcUrl=<value> (required) [default: ws://localhost:9138/] URL to PKC RPC
|
|
557
|
+
|
|
558
|
+
DESCRIPTION
|
|
559
|
+
Start a community
|
|
560
|
+
|
|
561
|
+
EXAMPLES
|
|
562
|
+
$ bitsocial community start plebbit.bso
|
|
563
|
+
|
|
564
|
+
$ bitsocial community start 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
|
|
565
|
+
|
|
566
|
+
Start all communities in your data path
|
|
567
|
+
|
|
568
|
+
$ bitsocial community start $(bitsocial community list -q)
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
_See code: [src/cli/commands/community/start.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.38/src/cli/commands/community/start.ts)_
|
|
572
|
+
|
|
573
|
+
## `bitsocial community stop ADDRESSES`
|
|
574
|
+
|
|
575
|
+
Stop a community. The community will not publish or receive any publications until it is started again.
|
|
576
|
+
|
|
577
|
+
```
|
|
578
|
+
USAGE
|
|
579
|
+
$ bitsocial community stop ADDRESSES... --pkcRpcUrl <value>
|
|
580
|
+
|
|
581
|
+
ARGUMENTS
|
|
582
|
+
ADDRESSES... Addresses of communities to stop. Separated by space
|
|
583
|
+
|
|
584
|
+
FLAGS
|
|
585
|
+
--pkcRpcUrl=<value> (required) [default: ws://localhost:9138/] URL to PKC RPC
|
|
586
|
+
|
|
587
|
+
DESCRIPTION
|
|
588
|
+
Stop a community. The community will not publish or receive any publications until it is started again.
|
|
589
|
+
|
|
590
|
+
EXAMPLES
|
|
591
|
+
$ bitsocial community stop plebbit.bso
|
|
592
|
+
|
|
593
|
+
$ bitsocial community stop Qmb99crTbSUfKXamXwZBe829Vf6w5w5TktPkb6WstC9RFW
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
_See code: [src/cli/commands/community/stop.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.38/src/cli/commands/community/stop.ts)_
|
|
597
|
+
|
|
598
|
+
## `bitsocial daemon`
|
|
599
|
+
|
|
600
|
+
Run a network-connected Bitsocial node. Once the daemon is running you can create and start your communities and receive publications from users. The daemon will also serve web ui on http that can be accessed through a browser on any machine. Within the web ui users are able to browse, create and manage their communities fully P2P.
|
|
601
|
+
|
|
602
|
+
```
|
|
603
|
+
USAGE
|
|
604
|
+
$ bitsocial daemon --pkcRpcUrl <value> --logPath <value> [--chainProviderUrls <value>...]
|
|
605
|
+
|
|
606
|
+
FLAGS
|
|
607
|
+
--chainProviderUrls=<value>... [default: viem,https://ethrpc.xyz] Ethereum RPC URL(s) for .bso/.eth name resolution.
|
|
608
|
+
Can be specified multiple times. Defaults to viem public transport and
|
|
609
|
+
https://ethrpc.xyz
|
|
610
|
+
--logPath=<value> (required) [default: /home/runner/.local/state/bitsocial] Specify a directory which
|
|
611
|
+
will be used to store logs
|
|
612
|
+
--pkcRpcUrl=<value> (required) [default: ws://localhost:9138/] Specify PKC RPC URL to listen on
|
|
613
|
+
|
|
614
|
+
DESCRIPTION
|
|
615
|
+
Run a network-connected Bitsocial node. Once the daemon is running you can create and start your communities and
|
|
616
|
+
receive publications from users. The daemon will also serve web ui on http that can be accessed through a browser on
|
|
617
|
+
any machine. Within the web ui users are able to browse, create and manage their communities fully P2P.
|
|
618
|
+
Options can be passed to the RPC's instance through flag --pkcOptions.optionName. For a list of pkc options
|
|
619
|
+
(https://github.com/pkcprotocol/pkc-js?tab=readme-ov-file#pkcoptions)
|
|
620
|
+
If you need to modify ipfs config, you should head to {bitsocial-data-path}/.ipfs-bitsocial-cli/config and modify the
|
|
621
|
+
config file
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
EXAMPLES
|
|
625
|
+
$ bitsocial daemon
|
|
626
|
+
|
|
627
|
+
$ bitsocial daemon --pkcRpcUrl ws://localhost:53812
|
|
628
|
+
|
|
629
|
+
$ bitsocial daemon --pkcOptions.dataPath /tmp/bitsocial-datapath/
|
|
630
|
+
|
|
631
|
+
$ bitsocial daemon --pkcOptions.kuboRpcClientsOptions[0] https://remoteipfsnode.com
|
|
632
|
+
|
|
633
|
+
$ bitsocial daemon --chainProviderUrls https://mainnet.infura.io/v3/YOUR_KEY
|
|
634
|
+
|
|
635
|
+
$ bitsocial daemon --chainProviderUrls viem --chainProviderUrls https://mainnet.infura.io/v3/YOUR_KEY
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
_See code: [src/cli/commands/daemon.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.38/src/cli/commands/daemon.ts)_
|
|
639
|
+
|
|
640
|
+
## `bitsocial help [COMMAND]`
|
|
641
|
+
|
|
642
|
+
Display help for bitsocial.
|
|
643
|
+
|
|
644
|
+
```
|
|
645
|
+
USAGE
|
|
646
|
+
$ bitsocial help [COMMAND...] [-n]
|
|
647
|
+
|
|
648
|
+
ARGUMENTS
|
|
649
|
+
[COMMAND...] Command to show help for.
|
|
650
|
+
|
|
651
|
+
FLAGS
|
|
652
|
+
-n, --nested-commands Include all nested commands in the output.
|
|
653
|
+
|
|
654
|
+
DESCRIPTION
|
|
655
|
+
Display help for bitsocial.
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.36/src/cli/commands/help.ts)_
|
|
659
|
+
|
|
660
|
+
## `bitsocial logs`
|
|
661
|
+
|
|
662
|
+
View the latest BitSocial daemon log file. By default dumps the full log and exits. Use --follow to stream new output in real-time (like tail -f).
|
|
663
|
+
|
|
664
|
+
```
|
|
665
|
+
USAGE
|
|
666
|
+
$ bitsocial logs [-f] [-n <value>] [--since <value>] [--until <value>]
|
|
667
|
+
|
|
668
|
+
FLAGS
|
|
669
|
+
-f, --follow Follow log output in real-time (like tail -f)
|
|
670
|
+
-n, --tail=<value> [default: all] Number of log entries to show from the end. Use "all" to show everything.
|
|
671
|
+
--since=<value> Show logs since timestamp (ISO 8601, e.g. 2026-01-02T13:23:37Z) or relative time (e.g. 30s, 42m,
|
|
672
|
+
2h, 1d)
|
|
673
|
+
--until=<value> Show logs before timestamp (ISO 8601, e.g. 2026-01-02T13:23:37Z) or relative time (e.g. 30s, 42m,
|
|
674
|
+
2h, 1d)
|
|
675
|
+
|
|
676
|
+
DESCRIPTION
|
|
677
|
+
View the latest BitSocial daemon log file. By default dumps the full log and exits. Use --follow to stream new output
|
|
678
|
+
in real-time (like tail -f).
|
|
679
|
+
|
|
680
|
+
EXAMPLES
|
|
681
|
+
$ bitsocial logs
|
|
682
|
+
|
|
683
|
+
$ bitsocial logs -f
|
|
684
|
+
|
|
685
|
+
$ bitsocial logs -n 50
|
|
686
|
+
|
|
687
|
+
$ bitsocial logs --since 5m
|
|
688
|
+
|
|
689
|
+
$ bitsocial logs --since 2026-01-02T13:23:37Z --until 2026-01-02T14:00:00Z
|
|
690
|
+
|
|
691
|
+
$ bitsocial logs --since 1h -f
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
_See code: [src/cli/commands/logs.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.38/src/cli/commands/logs.ts)_
|
|
695
|
+
<!-- commandsstop -->
|
|
696
|
+
|
|
697
|
+
## Contribution
|
|
698
|
+
|
|
699
|
+
We're always happy to receive pull requests. Few things to keep in mind:
|
|
700
|
+
|
|
701
|
+
- This repo follows [Angular commit conventions](https://github.com/angular/angular/blob/main/CONTRIBUTING.md). Easiest way to follow these conventions is by using `npm run commit` instead of `git commit`
|
|
702
|
+
- If you're adding a feature, make sure to add tests to your pull requests
|
|
703
|
+
|
|
704
|
+
## Feedback
|
|
705
|
+
|
|
706
|
+
We would love your feedback on our community channels
|