# @bitsocial/bitsocial-cli 中文文档

规范地址：https://npmcn.com/package/%40bitsocial/bitsocial-cli/

版本：0\.19\.124
npm 元数据更新时间：2026-11-05T12:17:57.078Z
中文译文更新时间：2026-11-08T04:47:39.585Z
软件包许可：GPL-3\.0-or-later

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40bitsocial/bitsocial-cli
原文对照：https://npmcn.com/package/%40bitsocial/bitsocial-cli/?lang=original
项目主页：https://github.com/bitsocialnet/bitsocial-cli
源码仓库：https://github.com/bitsocialnet/bitsocial-cli

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：622 kB，132 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- Node.js 要求：\>=22\.19\.0
- 运行依赖：25 个
- 首次发布：2026-04-17T13:27:29.568Z
- 最新版本发布：2026-11-05T12:17:55.963Z
- 近 30 天下载量：3955（2026-10-08 至 2026-11-06，npm 官方下载统计）
- 已发布版本数：86（近 12 个月 86 个）

## 中文简介

命令行界面到 Bitsocial API

## 安装

```sh
npm install @bitsocial/bitsocial-cli
```

也可以使用：`pnpm add @bitsocial/bitsocial-cli`、`yarn add @bitsocial/bitsocial-cli`、`bun add @bitsocial/bitsocial-cli`

## README

[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

# bitsocial-cli:带有WebSocket和命令行界面的 Bitsocial 节点

![CLI banner](https://npmcn.com/package/%40bitsocial/bitsocial-cli/docs/assets/readme/cli-banner.jpg)

## 目录

-   [Bitsocial是什么东西?](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-what-is-bitsocial)
-   [什么是bitsocial -cli吗?](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-what-is-bitsocial-cli)
-   [安装](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-install)
-   [夹克](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-docker)
-   [使用量](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-usage)
-   [图标](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-commands)
-   [捐款](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-contribution)
-   [反馈](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-feedback)

## Bitsocial是什么东西?

Bitsocial是p2p,分散的社交媒体协议完全由IPFS/IPNS/pubsub所建立. 它不使用任何中央服务器,中央数据库,公共HTTP端点或DNS,对等端是纯对等的,完全内容可处理. 它将使社区所有者能够保留对其社区的全部所有权。 学多点 [这里](https://bitsocial.net/)。 。 。 .

## 什么是bitsocial -cli吗?

`bitsocial-cli` 是 PKC 协议后端的接口,使用 [双关语](https://github.com/pkcprotocol/pkc-js)用户可以使用它运行和管理自己的社区。 它被写入Typescript并被设计为通过CLI和WebSocket接收命令.

-   运行 IPFS 和 Bitsocial 节点
-   管理 Bitsocial 社区的指令行界面
-   WebSocket RPC 访问并控制您的社区和出版物
-   包括像 Seedit 这样的 Web UIs, 您可以浏览网络和管理您的社区

## 安装

需要节点js 22.19 或以后. 我们建议使用 [数字](https://github.com/nvm-sh/nvm) 以安装和管理Node.js版本.

```sh-session
npm install -g @bitsocial/bitsocial-cli
```

要安装特定版本 :

```sh-session
npm install -g @bitsocial/bitsocial-cli@0.19.39
```

更新最新版本:

```sh-session
bitsocial update install
```

### 从源创建( 可选)

如果你想直接从源头构建:

```
git clone https://github.com/bitsocialnet/bitsocial-cli
cd bitsocial-cli
npm ci
npm run build
npx oclif manifest
npm run ci:download-web-uis
./bin/run --help
```

在运行最后一个命令后, 您应该能够直接运行针对的命令 `./bin/run`,例如 `./bin/run daemon`

## 夹克

作为多克容器,你可以运行 bitsocial-cli. 该容器运行守护进程并曝光了9138号口的RPC+网络UI,50019号口的Kubo IPFS API和6473号口的IPFS Gateway.

一旦您的容器运行了, 您可以使用一个捆绑的网络 UI 浏览 Bitsocial 网络并管理您的社区-- 不需要 CLI 命令 。 Web UI 完全通过您的浏览器为创建群落,调制和浏览内容提供全功能界面. 所有Web UI都是互通的,所以您可以随心所欲的发布和阅读,并在每个客户端上看到自己的内容.

如果您是一个电源用户, 您也可以运行 CLI 命令对运行中的容器 `docker exec`数字 :

```sh-session
docker exec bitsocial bitsocial community list
```

### 容器内的数据路径

| 路径 | 说明 |
| --- | --- |
| `/data/bitsocial` | Bitsocial 数据目录 |
| `/data/bitsocial/communities` | 社区 SQLite 数据库 |
| `/data/bitsocial/.bitsocial-cli.ipfs` | 库博IPFS存储器 |
| `/logs/bitsocial` | 日志文件 |

Docker 卷轴 `bitsocial-data:/data` 财务报告和审定财务报表 `bitsocial-logs:/logs` 被映射到 `/data` 财务报告和审定财务报表 `/logs` 在容器内。 这个 `bitsocial` 子目录由应用程序自动创建.

### Docker 编译( 建议)

复制示例文件并启动节点 :

```sh-session
cp docker-compose.example.yml docker-compose.yml
docker compose up -d
```

查看启动日志以找到您的认证密钥 URL :

```sh-session
docker compose logs -f
```

产出将包括下列项目:

```
pkc rpc: listening on ws://localhost:9138/<auth-key> (secret auth key for remote connections)
WebUI (seedit - Similar to old reddit UI): http://<your-ip>:9138/<auth-key>/seedit (secret auth key for remote connections)
```

在浏览器中打开WebUI URL开始使用Bitsocial.

#### 查看日志

从 Docker 容器查看日志有两种方法:

**快速日志** — 只显示 stdout 输出( 启动消息、 错误) :

```sh-session
docker compose logs -f          # Docker Compose
docker logs -f bitsocial        # Docker Run
```

**完整调试日志** - 显示包括调试/跟踪输出在内的完整守护进程日志 :

```sh-session
docker exec bitsocial bitsocial logs -f
```

这个 `bitsocial logs` 命令支持多个过滤旗:

```sh-session
docker exec bitsocial bitsocial logs -f              # follow (stream new lines)
docker exec bitsocial bitsocial logs -n 100           # last 100 lines
docker exec bitsocial bitsocial logs --since 1h       # entries from the last hour
docker exec bitsocial bitsocial logs --until 30m      # entries up to 30 minutes ago
```

调试和跟踪日志只写到日志文件中, 不写到 stdout, 所以 `docker logs` 不会让他们看到。 使用 `bitsocial logs` 装入容器里,全画面.

#### 实例

```yaml
services:
  bitsocial:
    image: ghcr.io/bitsocialnet/bitsocial-cli:latest
    container_name: bitsocial
    restart: unless-stopped
    ports:
      - "9138:9138"    # PKC RPC + Web UI
      - "50019:50019"  # Kubo IPFS API
      - "6473:6473"    # IPFS Gateway
    volumes:
      - bitsocial-data:/data
      - bitsocial-logs:/logs
    environment:
      - DEBUG=bitsocial*, pkc*, -pkc*trace
      # Set a fixed auth key (useful for bookmarking the web UI URL).
      # If left unset, a random key is generated on first start.
      # - PKC_RPC_AUTH_KEY=your-custom-auth-key-here
      # Override Kubo IPFS bind addresses / ports:
      # - KUBO_RPC_URL=http://0.0.0.0:50019/api/v0
      # - IPFS_GATEWAY_URL=http://0.0.0.0:6473

volumes:
  bitsocial-data:
  bitsocial-logs:
```

### 嵌入器运行

```sh-session
docker run -d \
  --name bitsocial \
  --restart unless-stopped \
  -p 9138:9138 \
  -p 50019:50019 \
  -p 6473:6473 \
  -v bitsocial-data:/data \
  -v bitsocial-logs:/logs \
  ghcr.io/bitsocialnet/bitsocial-cli:latest
```

带有自定义认证密钥 :

```sh-session
docker run -d \
  --name bitsocial \
  --restart unless-stopped \
  -p 9138:9138 \
  -p 50019:50019 \
  -p 6473:6473 \
  -v bitsocial-data:/data \
  -v bitsocial-logs:/logs \
  -e PKC_RPC_AUTH_KEY=my-secret-key \
  ghcr.io/bitsocialnet/bitsocial-cli:latest
```

### 本地构建 Docker 图像

```sh-session
docker build -t bitsocial-cli .
docker run -p 9138:9138 -p 50019:50019 -p 6473:6473 bitsocial-cli
```

## 使用量

### Bitsocial 的数据/配置目录

这是Bitsocial-cli保留其配置的默认目录, 以及本地社区的数据:

-   macOS:~/图书馆/应用支持/比特社会
-   视窗 :% LOCALAPDATA 社会
-   Linux: ~/. 本地/股/比特社会

### Bitsocial 日志目录

bitsocial-cli会保留此目录中的日志,每个日志文件的上限为10M.

-   macOS:~/图书馆/图书馆/图书馆/比特社会
-   视窗 :% LOCALAPDATA \\ bitsocial\\ Log
-   Linux: ~/. 本地/ 状态/比特社会

### 运行守护进程

在Bash(或如果在Windows上的话,用电壳)中,运行 `bitsocial daemon` 能够连接到网络。 你需要拥有 `bitsocial daemon` 终端运行可以执行其他命令.

```sh-session
$ bitsocial daemon
IPFS API listening on: http://localhost:5001/api/v0
IPFS Gateway listening on: http://localhost:6473
pkc rpc: listening on ws://localhost:9138 (local connections only)
pkc rpc: listening on ws://localhost:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL (secret auth key for remote connections)
Bitsocial data path: /root/.local/share/bitsocial
Communities in data path:  [ 'anime-and-manga.bso' ]
WebUI (5chan - Imageboard-style UI): http://localhost:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/5chan (local connections only)
WebUI (5chan - Imageboard-style UI): http://192.168.1.60:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/5chan (secret auth key for remote connections)
WebUI (seedit - Similar to old reddit UI): http://localhost:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/seedit (local connections only)
WebUI (seedit - Similar to old reddit UI): http://192.168.1.60:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/seedit (secret auth key for remote connections)

```

一次 `bitsocial daemon` 正在运行中, 您可以通过网络界面创建和管理您的社区, 无论是 sewdit 还是 5chan 。 所有接口都是互通的. 如果你是一个动力用户并且更喜欢CLI,那么你可以查看下面的指令.

如果您需要查看详细的协议或用于调试的 IPFS 日志, 您可以使用 `bitsocial logs`。例如, `bitsocial logs --tail 50` 显示最后50行,或 `bitsocial logs --since 1h` 显示过去一小时的日志.

#### 使您的节点可以从浏览器中到达

这设置了浏览器可以拨打节点的两种方式:需要证书浏览器信任的WebSocket Security和Web Transport. 如果没有两者之一,守护进程会在开始表示浏览器无法到达此节点时打印一行. 要修复, 请在守护进程运行时运行 :

```sh-session
$ bitsocial reachability setup
```

它找到这台机器的公共地址,请路由器通过 UPnP 转发端口,如果它位于 NAT 的后方,则会获得一个用于 IP 地址(或您的域名)的加密证书 `--domain`),配置kubo并检查结果. 重新运行是安全的。 守护进程然后让Caddy继续运行,更新证书并跟踪IP更改.

| 命令 | 它会做什么 |
| --- | --- |
| `bitsocial reachability setup` | 发现、配置、获取证书、验证 |
| `bitsocial reachability status` | 显示模式、地址、证书过期和最后一次检查( E)`--json` 用于脚本) |
| `bitsocial reachability enable` | 修复和打开存储的选择, 不要求任何东西 |
| `bitsocial reachability disable` | 停止服务,恢复库博配置. `--purge` 将状态移动到时间标记的备份 |

`status` 财务报告和审定财务报表 `setup` 请检查这台机器需要什么, 并说如何修复任何缺失的东西: 允许 Caddy 和 kubo 绑定端口 443( kubo 否则会一直运行, 并且默默不听 UDP 443), TCP 80, TCP 443 和 UDP 443 是否被另一个程序所持有, 一个活动程序 `ufw` 或者说 `firewalld`库博在听什么? 机器上没有任何东西可以证明进入的流量到达它,或者看到云提供商的防火墙,所以从另一个网络进行测试.

**已经服务 WSS 不 `setup`? 吗?** 如果您运行了自己的反向代理, 或者 kubo 拥有 AutotLS 地址, 您不需要 `setup`。 。 。 . `status` 而守护进程尝试一个真实的 libp2p 握手方式,每个 WSS 地址 kubo 宣布并报告结果,他们只说如果每个握手方式绝对失败,浏览器无法到达节点. 握手从这台机器上走来,因此成功并不能证明其他网络可以连接,而路由器后面的故障只能得到警告,因为路由器可能不会将机器连接到自己的公共地址上.

-   **443已使用端口 :** 通过 `--domain`,然后为 nginx 、 Apache 或 Caddy 打印一个片段,将名称转发给 kubo 。 那就通过 `--announce` 您的服务器的地址 。 只有在真正的 libp2p 握手成功后才宣布.
-   **Linux, 不为根 :** Caddy和kubo都需要捆绑港口443. `sudo sysctl -w net.ipv4.ip_unprivileged_port_start=443` 两者都包括在内 `/etc/sysctl.d/`设置备案 `setcap` ,并打印出如果无法绑定 UDP 443 需要的 kubo .
-   **嵌入器 :** 添加 `cap_add: [NET_BIND_SERVICE]` 发表 `443:443/tcp`, (中文(简体) ), `443:443/udp` 财务报告和审定财务报表 `80:80/tcp`。 。 。 .
-   **窗口 :** 设置要添加的防火墙规则.
-   **测试 :** `--staging` 使用Let's加密中继 CA,其证书浏览器不信任.

见 [文件/可获取性](https://npmcn.com/package/%40bitsocial/bitsocial-cli/docs/reachability.md) 选择一条路和解决问题.

卡迪在第一个下载 `setup` 从GitHub的释放中,并对照这个寄存器中被钉住的活塞检查。 国家生活 `<data path>/reachability/`运行 `setup` 表示接受 [让我们加密订阅者协议](https://letsencrypt.org/repository/);没有发送电子邮件地址.

#### 创建您的第一个社区

```sh-session
$ bitsocial community create --title "Hello World!" --description "This is gonna be great"
12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
```

#### 列出您的所有社区

```sh-session
$ bitsocial community list
Address                                              Started
 ──────────────────────────────────────────────────── ───────
 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu true
 business-and-finance.bso                             true
 censorship-watch.bso                                 true
 health-nutrition-science.bso                         true
 movies-tv-anime.bso                                  true
 anime-and-manga.bso                                  true
 politically-incorrect.bso                            true
 reddit-screenshots.bso                               false
 videos-livestreams-podcasts.bso                      false
```

#### 在您的社区中添加角色主持人

```sh-session
$ bitsocial community edit mysub.bso '--roles["author-address.bso"].role' moderator
```

#### 在您的社区中添加角色所有者

```sh-session
$ bitsocial community edit mysub.bso '--roles["author-address.bso"].role' owner
```

#### 在您的社区中添加一个角色管理员

```sh-session
$ bitsocial community edit mysub.bso '--roles["author-address.bso"].role' admin
```

#### 删除一个角色

```sh-session
$ bitsocial community edit mysub.bso '--roles["author-address.bso"]' null
```

## 图标

-   [`bitsocial challenge add PACKAGE`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-challenge-add-package)
-   [`bitsocial challenge i PACKAGE`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-challenge-i-package)
-   [`bitsocial challenge install PACKAGE`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-challenge-install-package)
-   [`bitsocial challenge list`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-challenge-list)
-   [`bitsocial challenge ls`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-challenge-ls)
-   [`bitsocial challenge remove NAME`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-challenge-remove-name)
-   [`bitsocial challenge rm NAME`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-challenge-rm-name)
-   [`bitsocial challenge un NAME`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-challenge-un-name)
-   [`bitsocial challenge uninstall NAME`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-challenge-uninstall-name)
-   [`bitsocial community create`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-community-create)
-   [`bitsocial community delete ADDRESSES`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-community-delete-addresses)
-   [`bitsocial community edit ADDRESS`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-community-edit-address)
-   [`bitsocial community export [ADDRESS]`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-community-export-address)
-   [`bitsocial community get [ADDRESS]`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-community-get-address)
-   [`bitsocial community list`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-community-list)
-   [`bitsocial community start ADDRESSES`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-community-start-addresses)
-   [`bitsocial community stop ADDRESSES`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-community-stop-addresses)
-   [`bitsocial daemon`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-daemon)
-   [`bitsocial help [COMMAND]`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-help-command)
-   [`bitsocial logs`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-logs)
-   [`bitsocial page-sort add PACKAGE`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-page-sort-add-package)
-   [`bitsocial page-sort i PACKAGE`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-page-sort-i-package)
-   [`bitsocial page-sort install PACKAGE`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-page-sort-install-package)
-   [`bitsocial page-sort list`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-page-sort-list)
-   [`bitsocial page-sort ls`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-page-sort-ls)
-   [`bitsocial page-sort remove NAME`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-page-sort-remove-name)
-   [`bitsocial page-sort rm NAME`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-page-sort-rm-name)
-   [`bitsocial page-sort un NAME`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-page-sort-un-name)
-   [`bitsocial page-sort uninstall NAME`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-page-sort-uninstall-name)
-   [`bitsocial reachability disable`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-reachability-disable)
-   [`bitsocial reachability enable`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-reachability-enable)
-   [`bitsocial reachability setup`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-reachability-setup)
-   [`bitsocial reachability status`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-reachability-status)
-   [`bitsocial update check`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-update-check)
-   [`bitsocial update install [VERSION]`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-update-install-version)
-   [`bitsocial update versions`](https://npmcn.com/package/%40bitsocial/bitsocial-cli/#readme-bitsocial-update-versions)

## `bitsocial challenge add PACKAGE`

安装挑战包( npm 包名、 git URL、 tarball URL 或本地路径)

```
USAGE
  $ bitsocial challenge add PACKAGE --pkcRpcUrl <value> [--pkcOptions.dataPath <value>]

ARGUMENTS
  PACKAGE  Package specifier — anything npm can install (name, name@version, git URL, tarball URL, local path)

FLAGS
  --pkcOptions.dataPath=<value>  Data path to install the challenge into
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Install a challenge package (npm package name, git URL, tarball URL, or local path)

ALIASES
  $ bitsocial challenge i
  $ bitsocial challenge add

EXAMPLES
  $ bitsocial challenge install @bitsocial/mintpass-challenge

  $ bitsocial challenge install @bitsocial/mintpass-challenge@1.0.0

  $ bitsocial challenge install github:user/repo

  $ bitsocial challenge install https://example.com/my-challenge-1.0.0.tar.gz

  $ bitsocial challenge install ./my-local-challenge
```

## `bitsocial challenge i PACKAGE`

安装挑战包( npm 包名、 git URL、 tarball URL 或本地路径)

```
USAGE
  $ bitsocial challenge i PACKAGE --pkcRpcUrl <value> [--pkcOptions.dataPath <value>]

ARGUMENTS
  PACKAGE  Package specifier — anything npm can install (name, name@version, git URL, tarball URL, local path)

FLAGS
  --pkcOptions.dataPath=<value>  Data path to install the challenge into
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Install a challenge package (npm package name, git URL, tarball URL, or local path)

ALIASES
  $ bitsocial challenge i
  $ bitsocial challenge add

EXAMPLES
  $ bitsocial challenge install @bitsocial/mintpass-challenge

  $ bitsocial challenge install @bitsocial/mintpass-challenge@1.0.0

  $ bitsocial challenge install github:user/repo

  $ bitsocial challenge install https://example.com/my-challenge-1.0.0.tar.gz

  $ bitsocial challenge install ./my-local-challenge
```

## `bitsocial challenge install PACKAGE`

安装挑战包( npm 包名、 git URL、 tarball URL 或本地路径)

```
USAGE
  $ bitsocial challenge install PACKAGE --pkcRpcUrl <value> [--pkcOptions.dataPath <value>]

ARGUMENTS
  PACKAGE  Package specifier — anything npm can install (name, name@version, git URL, tarball URL, local path)

FLAGS
  --pkcOptions.dataPath=<value>  Data path to install the challenge into
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Install a challenge package (npm package name, git URL, tarball URL, or local path)

ALIASES
  $ bitsocial challenge i
  $ bitsocial challenge add

EXAMPLES
  $ bitsocial challenge install @bitsocial/mintpass-challenge

  $ bitsocial challenge install @bitsocial/mintpass-challenge@1.0.0

  $ bitsocial challenge install github:user/repo

  $ bitsocial challenge install https://example.com/my-challenge-1.0.0.tar.gz

  $ bitsocial challenge install ./my-local-challenge
```

_参见代码 : [命令/挑战/安装](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/challenge/install.ts)_

## `bitsocial challenge list`

列出已安装的挑战包

```
USAGE
  $ bitsocial challenge list [-q] [--pkcOptions.dataPath <value>]

FLAGS
  -q, --quiet                        Only display challenge names
      --pkcOptions.dataPath=<value>  Data path where challenges are installed

DESCRIPTION
  List installed challenge packages

ALIASES
  $ bitsocial challenge ls

EXAMPLES
  $ bitsocial challenge list

  $ bitsocial challenge list -q
```

_参见代码 : [命令/挑战/清单](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/challenge/list.ts)_

## `bitsocial challenge ls`

列出已安装的挑战包

```
USAGE
  $ bitsocial challenge ls [-q] [--pkcOptions.dataPath <value>]

FLAGS
  -q, --quiet                        Only display challenge names
      --pkcOptions.dataPath=<value>  Data path where challenges are installed

DESCRIPTION
  List installed challenge packages

ALIASES
  $ bitsocial challenge ls

EXAMPLES
  $ bitsocial challenge list

  $ bitsocial challenge list -q
```

## `bitsocial challenge remove NAME`

删除已安装的挑战软件包 。 在社区设置时拒绝 。 挑战仍然命名它,除非 -- 武力通过

```
USAGE
  $ bitsocial challenge remove NAME --pkcRpcUrl <value> [--pkcOptions.dataPath <value>] [--force]

ARGUMENTS
  NAME  The challenge package name (e.g., my-challenge or @scope/my-challenge)

FLAGS
  --force                        Remove without checking whether communities still use it (the daemon is not contacted
                                 for the check)
  --pkcOptions.dataPath=<value>  Data path where challenges are installed
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Remove an installed challenge package. Refuses while a community's settings.challenges still names it, unless --force
  is passed

ALIASES
  $ bitsocial challenge uninstall
  $ bitsocial challenge rm
  $ bitsocial challenge un

EXAMPLES
  $ bitsocial challenge remove my-challenge

  $ bitsocial challenge remove @scope/my-challenge

  $ bitsocial challenge remove my-challenge --force
```

_参见代码 : [命令/挑战/移动](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/challenge/remove.ts)_

## `bitsocial challenge rm NAME`

删除已安装的挑战软件包 。 在社区设置时拒绝 。 挑战仍然命名它,除非 -- 武力通过

```
USAGE
  $ bitsocial challenge rm NAME --pkcRpcUrl <value> [--pkcOptions.dataPath <value>] [--force]

ARGUMENTS
  NAME  The challenge package name (e.g., my-challenge or @scope/my-challenge)

FLAGS
  --force                        Remove without checking whether communities still use it (the daemon is not contacted
                                 for the check)
  --pkcOptions.dataPath=<value>  Data path where challenges are installed
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Remove an installed challenge package. Refuses while a community's settings.challenges still names it, unless --force
  is passed

ALIASES
  $ bitsocial challenge uninstall
  $ bitsocial challenge rm
  $ bitsocial challenge un

EXAMPLES
  $ bitsocial challenge remove my-challenge

  $ bitsocial challenge remove @scope/my-challenge

  $ bitsocial challenge remove my-challenge --force
```

## `bitsocial challenge un NAME`

删除已安装的挑战软件包 。 在社区设置时拒绝 。 挑战仍然命名它,除非 -- 武力通过

```
USAGE
  $ bitsocial challenge un NAME --pkcRpcUrl <value> [--pkcOptions.dataPath <value>] [--force]

ARGUMENTS
  NAME  The challenge package name (e.g., my-challenge or @scope/my-challenge)

FLAGS
  --force                        Remove without checking whether communities still use it (the daemon is not contacted
                                 for the check)
  --pkcOptions.dataPath=<value>  Data path where challenges are installed
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Remove an installed challenge package. Refuses while a community's settings.challenges still names it, unless --force
  is passed

ALIASES
  $ bitsocial challenge uninstall
  $ bitsocial challenge rm
  $ bitsocial challenge un

EXAMPLES
  $ bitsocial challenge remove my-challenge

  $ bitsocial challenge remove @scope/my-challenge

  $ bitsocial challenge remove my-challenge --force
```

## `bitsocial challenge uninstall NAME`

删除已安装的挑战软件包 。 在社区设置时拒绝 。 挑战仍然命名它,除非 -- 武力通过

```
USAGE
  $ bitsocial challenge uninstall NAME --pkcRpcUrl <value> [--pkcOptions.dataPath <value>] [--force]

ARGUMENTS
  NAME  The challenge package name (e.g., my-challenge or @scope/my-challenge)

FLAGS
  --force                        Remove without checking whether communities still use it (the daemon is not contacted
                                 for the check)
  --pkcOptions.dataPath=<value>  Data path where challenges are installed
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Remove an installed challenge package. Refuses while a community's settings.challenges still names it, unless --force
  is passed

ALIASES
  $ bitsocial challenge uninstall
  $ bitsocial challenge rm
  $ bitsocial challenge un

EXAMPLES
  $ bitsocial challenge remove my-challenge

  $ bitsocial challenge remove @scope/my-challenge

  $ bitsocial challenge remove my-challenge --force
```

## `bitsocial community create`

创建具有特定属性的社区. 新创建的社区将在创建后开始,能够接收出版物。 财产列表请访问 [https://github.com/pkcprotocol/pkc-js (中文(简体) )](https://github.com/pkcprotocol/pkc-js)

```
USAGE
  $ bitsocial community create --pkcRpcUrl <value> [--privateKeyPath <value>] [-f <value>]

FLAGS
  -f, --jsonFile=<value>        Path to a JSON/JSONC file containing create options (supports comments)
      --pkcRpcUrl=<value>       (required) [default: ws://localhost:9138/] URL to PKC RPC
      --privateKeyPath=<value>  Private key (PEM) of the community signer that will be used to determine address (if
                                address is not a domain). If it's not provided then PKC will generate a private key

DESCRIPTION
  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

EXAMPLES
  Create a community with title 'Hello Plebs' and description 'Welcome'

    $ bitsocial community create --title 'Hello Plebs' --description 'Welcome'

  Create a community using options from a JSON/JSONC file

    $ bitsocial community create --jsonFile ./create-options.json
```

_参见代码 : [src/cli/命令/社区/创建.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/community/create.ts)_

## `bitsocial community delete ADDRESSES`

永久删除社区 .

```
USAGE
  $ bitsocial community delete ADDRESSES... --pkcRpcUrl <value>

ARGUMENTS
  ADDRESSES...  Addresses of communities to delete. Separated by space

FLAGS
  --pkcRpcUrl=<value>  (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Delete a community permanently.

EXAMPLES
  $ bitsocial community delete plebbit.bso

  $ bitsocial community delete 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
```

_参见代码 : [src/cli/命令/社区/删除](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/community/delete.ts)_

## `bitsocial community edit ADDRESS`

编辑社区属性 。 财产列表请访问 [https://github.com/pkcprotocol/pkc-js (中文(简体) )](https://github.com/pkcprotocol/pkc-js)

```
USAGE
  $ bitsocial community edit ADDRESS --pkcRpcUrl <value> [-f <value>]

ARGUMENTS
  ADDRESS  Address of the community to edit. It could be the name domain, or a public key

FLAGS
  -f, --jsonFile=<value>   Path to a JSON/JSONC file containing edit options (supports comments)
      --pkcRpcUrl=<value>  (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Edit a community's properties. For a list of properties, visit https://github.com/pkcprotocol/pkc-js

  Merge behavior with CLI flags:
  - Objects are merged with the community's current state (new keys are added, existing keys are overwritten).
  - Arrays are extended: new values are prepended to the existing array.
  - Setting a value to null removes it (e.g. --roles['mod.bso'] null).

  Merge behavior with --jsonFile:
  - Objects are merged the same way as CLI flags.
  - Arrays are replaced entirely (RFC 7396 JSON Merge Patch semantics).
  - When both --jsonFile and CLI flags are provided, CLI flags take priority.

  For modifying complex settings like challenges, consider using a web UI instead:
  https://bitsocial.net/projects?category=apps

EXAMPLES
  Change the name of the community

    $ bitsocial community edit 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu --name newName.bso

  Add the author address 'esteban.bso' as an admin on the community

    $ bitsocial community edit mycommunity.bso '--roles["esteban.bso"].role' admin

  Add two challenges to the community. The first challenge will be a question and answer, and the second will be a
  math question

    $ bitsocial community edit mycommunity.bso '--settings.challenges[0].name' question \
      '--settings.challenges[0].options.question' "what is the password?" '--settings.challenges[0].options.answer' \
      thepassword '--settings.challenges[1].name' text-math

  Use an installed page sort package (bitsocial page-sort install @pkcprotocol/active-page-sort) as the preloaded
  posts sort, where replies containing 'sage' do not bump a thread

    $ bitsocial community edit mycommunity.bso '--settings.pages.posts[0].name' @pkcprotocol/active-page-sort \
      '--settings.pages.posts[0].options.noBumpKeywords' sage '--settings.pages.posts[0].preloaded' true

  Change the title and description

    $ bitsocial community edit mycommunity.bso --title "This is the new title" --description "This is the new \
      description"

  Remove a role from a moderator/admin/owner

    $ bitsocial community edit bitsocial.bso '--roles["rinse12.bso"]' null

  Enable settings.fetchThumbnailUrls to fetch the thumbnail of url submitted by authors

    $ bitsocial community edit bitsocial.bso --settings.fetchThumbnailUrls

  disable settings.fetchThumbnailUrls

    $ bitsocial community edit bitsocial.bso --settings.fetchThumbnailUrls=false

  Edit a community using options from a JSON/JSONC file

    $ bitsocial community edit bitsocial.bso --jsonFile ./edit-options.json
```

_参见代码 : [src/cli/命令/社区/编辑.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/community/edit.ts)_

## `bitsocial community export [ADDRESS]`

导出本地社区到 SQLite 快照文件 。 导出运行在 RPC 服务器( daemon) 上; 一旦完成快照下载, 并验证其sha256 校验和 。 Pass -- 包括PrivateKey, 以生成一个保存社区地址的可替换备份 .

```
USAGE
  $ bitsocial community export [ADDRESS] --pkcRpcUrl <value> [--name <value>] [--publicKey <value>] [-o <value>]
    [--includePrivateKey] [--force] [-q]

ARGUMENTS
  [ADDRESS]  Address of the community to export

FLAGS
  -o, --path=<value>       Destination file for the downloaded snapshot (default:
                           <dataPath>/exports/<address>_<datetime>.sqlite)
  -q, --quiet              Suppress progress output; only print the path of the downloaded snapshot
      --force              Overwrite the destination file if it already exists
      --includePrivateKey  Ask the RPC server to include the community signer's private key in the export. Required for
                           a restorable backup that keeps the same community address. The daemon may refuse (see
                           `bitsocial daemon --no-allowPrivateKeyExport`)
      --name=<value>       Name of the community to export
      --pkcRpcUrl=<value>  (required) [default: ws://localhost:9138/] URL to PKC RPC
      --publicKey=<value>  Public key of the community to export

DESCRIPTION
  Export a local community to a SQLite snapshot file. The export runs on the RPC server (daemon); once finished the
  snapshot is downloaded and its sha256 checksum is verified. Pass --includePrivateKey to produce a restorable backup
  that keeps the community's address.

EXAMPLES
  $ bitsocial community export plebmusic.bso

  $ bitsocial community export plebmusic.bso --includePrivateKey -o ./backups/plebmusic.sqlite

  $ bitsocial community export --name my-community

  $ bitsocial community export --publicKey 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
```

_参见代码 : [src/cli/命令/社区/出口.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/community/export.ts)_

## `bitsocial community get [ADDRESS]`

获取本地或远程社区,并在终端打印其json

```
USAGE
  $ bitsocial community get [ADDRESS] --pkcRpcUrl <value> [--name <value>] [--publicKey <value>]

ARGUMENTS
  [ADDRESS]  Address of the community to fetch

FLAGS
  --name=<value>       Name of the community to fetch
  --pkcRpcUrl=<value>  (required) [default: ws://localhost:9138/] URL to PKC RPC
  --publicKey=<value>  Public key of the community to fetch

DESCRIPTION
  Fetch a local or remote community, and print its json in the terminal

EXAMPLES
  $ bitsocial community get plebmusic.bso

  $ bitsocial community get 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu

  $ bitsocial community get --name my-community

  $ bitsocial community get --publicKey 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
```

_参见代码 : [src/cli/命令/社区/get.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/community/get.ts)_

## `bitsocial community list`

列出您的社区

```
USAGE
  $ bitsocial community list --pkcRpcUrl <value> [-q]

FLAGS
  -q, --quiet              Only display community addresses, one per line
      --pkcRpcUrl=<value>  (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  List your communities

EXAMPLES
  $ bitsocial community list -q

  $ bitsocial community list
```

_参见代码 : [src/cli/命令/社区/列表.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/community/list.ts)_

## `bitsocial community start ADDRESSES`

启动社区

```
USAGE
  $ bitsocial community start ADDRESSES... --pkcRpcUrl <value> [--concurrency <value>]

ARGUMENTS
  ADDRESSES...  Addresses of communities to start. Separated by space

FLAGS
  --concurrency=<value>  [default: 5] Number of communities to start in parallel
  --pkcRpcUrl=<value>    (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Start a community

EXAMPLES
  $ bitsocial community start plebbit.bso

  $ bitsocial community start 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu

  Start all communities in your data path

    $ bitsocial community start $(bitsocial community list -q)

  Start communities sequentially (no concurrency)

    $ bitsocial community start $(bitsocial community list -q) --concurrency 1
```

_参见代码 : [src/cli/命令/社区/启动.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/community/start.ts)_

## `bitsocial community stop ADDRESSES`

停止一个社区。 社区将不再出版或接受任何出版物,直到重新开始.

```
USAGE
  $ bitsocial community stop ADDRESSES... --pkcRpcUrl <value>

ARGUMENTS
  ADDRESSES...  Addresses of communities to stop. Separated by space

FLAGS
  --pkcRpcUrl=<value>  (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Stop a community. The community will not publish or receive any publications until it is started again.

EXAMPLES
  $ bitsocial community stop plebbit.bso

  $ bitsocial community stop Qmb99crTbSUfKXamXwZBe829Vf6w5w5TktPkb6WstC9RFW
```

_参见代码 : [src/cli/命令/社区/站点](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/community/stop.ts)_

## `bitsocial daemon`

运行一个网络连接的Bitsocial节点. 守护进程运行后, 您可以创建和启动您的社区, 并接收用户的出版物 。 守护进程还将在 http 上提供可通过任何机器上的浏览器访问的web ui 。 在网络用户内部,他们能够浏览、创建和管理自己的社区.

```
USAGE
  $ bitsocial daemon --pkcRpcUrl <value> --logPath <value> [--chainProviderUrls <value>...] [--enableIpfsGc]
    [--ipfsGcIntervalMinutes <value>] [--allowPrivateKeyExport]

FLAGS
  --[no-]allowPrivateKeyExport     Allow RPC clients to request community exports that include the community signer's
                                   private key (`bitsocial community export --includePrivateKey`). Disable with
                                   --no-allowPrivateKeyExport when exposing the RPC to untrusted clients
  --chainProviderUrls=<value>...   [default:
                                   https://eth.drpc.org,https://ethereum.publicnode.com,https://ethereum-rpc.publicnode.
                                   com,https://rpc.mevblocker.io,https://1rpc.io/eth,https://eth-pokt.nodies.app] RPC
                                   URL(s) for .bso name resolution. Can be specified multiple times.
  --[no-]enableIpfsGc              Periodically garbage-collect the IPFS repo over the kubo RPC API while the daemon is
                                   up. Only reclaims unpinned blocks — pinned data and MFS are never collected. Disable
                                   with --no-enableIpfsGc
  --ipfsGcIntervalMinutes=<value>  [default: 60] How often to garbage-collect the IPFS repo, in minutes
  --logPath=<value>                (required) [default: /home/runner/.local/state/bitsocial] Specify a directory which
                                   will be used to store logs
  --pkcRpcUrl=<value>              (required) [default: ws://localhost:9138/] Specify PKC RPC URL to listen on

DESCRIPTION
  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.
  Options can be passed to the RPC's instance through flag --pkcOptions.optionName. For a list of pkc options
  (https://github.com/pkcprotocol/pkc-js?tab=readme-ov-file#pkcoptions)
  If you need to modify ipfs config, you should head to {bitsocial-data-path}/.bitsocial-cli.ipfs/config (or
  $IPFS_PATH/config if set) and modify the config file


EXAMPLES
  $ bitsocial daemon

  $ bitsocial daemon --pkcRpcUrl ws://localhost:53812

  $ bitsocial daemon --pkcOptions.dataPath /tmp/bitsocial-datapath/

  $ bitsocial daemon '--pkcOptions.kuboRpcClientsOptions[0]' https://remoteipfsnode.com

  $ bitsocial daemon --chainProviderUrls https://mainnet.infura.io/v3/YOUR_KEY

  $ bitsocial daemon --no-allowPrivateKeyExport
```

_参见代码 : [src/cli/命令/守护进程](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/daemon.ts)_

## `bitsocial help [COMMAND]`

为 bitsocial 显示帮助 .

```
USAGE
  $ bitsocial help [COMMAND...] [-n]

ARGUMENTS
  [COMMAND...]  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for bitsocial.
```

_参见代码 : [@oclif/plugin-帮助](https://github.com/oclif/plugin-help/blob/v6.2.36/src/cli/commands/help.ts)_

## `bitsocial logs`

查看最新的 BitSocial 守护进程日志文件 。 默认情况下会倾倒完整的日志和出站. 使用 -- follow to stream 新的实时输出( 如尾- f) .

```
USAGE
  $ bitsocial logs [-f] [-n <value>] [--since <value>] [--until <value>] [--logPath <value>] [--stdout |
    --stderr]

FLAGS
  -f, --follow           Follow log output in real-time (like tail -f)
  -n, --tail=<value>     [default: all] Number of log entries to show from the end. Use "all" to show everything.
      --logPath=<value>  Specify the directory containing log files
      --since=<value>    Show logs since timestamp (ISO 8601, e.g. 2026-01-02T13:23:37Z) or relative time (e.g. 30s,
                         42m, 2h, 1d)
      --stderr           Show only stderr log entries (output of pkc-logger library)
      --stdout           Show only stdout log entries
      --until=<value>    Show logs before timestamp (ISO 8601, e.g. 2026-01-02T13:23:37Z) or relative time (e.g. 30s,
                         42m, 2h, 1d)

DESCRIPTION
  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).

EXAMPLES
  $ bitsocial logs

  $ bitsocial logs -f

  $ bitsocial logs -n 50

  $ bitsocial logs --since 5m

  $ bitsocial logs --since 2026-01-02T13:23:37Z --until 2026-01-02T14:00:00Z

  $ bitsocial logs --since 1h -f

  $ bitsocial logs --stdout

  $ bitsocial logs --stderr

  $ bitsocial logs --stdout -f
```

_参见代码 : [src/cli/命令/日志.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/logs.ts)_

## `bitsocial page-sort add PACKAGE`

安装页面排序包( npm 软件包名称、 git URL、 tarball URL 或本地路径)

```
USAGE
  $ bitsocial page-sort add PACKAGE --pkcRpcUrl <value> [--pkcOptions.dataPath <value>]

ARGUMENTS
  PACKAGE  Package specifier — anything npm can install (name, name@version, git URL, tarball URL, local path)

FLAGS
  --pkcOptions.dataPath=<value>  Data path to install the page sort into
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Install a page sort package (npm package name, git URL, tarball URL, or local path)

ALIASES
  $ bitsocial page-sort i
  $ bitsocial page-sort add

EXAMPLES
  $ bitsocial page-sort install @pkcprotocol/active-page-sort

  $ bitsocial page-sort install @pkcprotocol/active-page-sort@1.0.0

  $ bitsocial page-sort install ./my-local-page-sort
```

## `bitsocial page-sort i PACKAGE`

安装页面排序包( npm 软件包名称、 git URL、 tarball URL 或本地路径)

```
USAGE
  $ bitsocial page-sort i PACKAGE --pkcRpcUrl <value> [--pkcOptions.dataPath <value>]

ARGUMENTS
  PACKAGE  Package specifier — anything npm can install (name, name@version, git URL, tarball URL, local path)

FLAGS
  --pkcOptions.dataPath=<value>  Data path to install the page sort into
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Install a page sort package (npm package name, git URL, tarball URL, or local path)

ALIASES
  $ bitsocial page-sort i
  $ bitsocial page-sort add

EXAMPLES
  $ bitsocial page-sort install @pkcprotocol/active-page-sort

  $ bitsocial page-sort install @pkcprotocol/active-page-sort@1.0.0

  $ bitsocial page-sort install ./my-local-page-sort
```

## `bitsocial page-sort install PACKAGE`

安装页面排序包( npm 软件包名称、 git URL、 tarball URL 或本地路径)

```
USAGE
  $ bitsocial page-sort install PACKAGE --pkcRpcUrl <value> [--pkcOptions.dataPath <value>]

ARGUMENTS
  PACKAGE  Package specifier — anything npm can install (name, name@version, git URL, tarball URL, local path)

FLAGS
  --pkcOptions.dataPath=<value>  Data path to install the page sort into
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Install a page sort package (npm package name, git URL, tarball URL, or local path)

ALIASES
  $ bitsocial page-sort i
  $ bitsocial page-sort add

EXAMPLES
  $ bitsocial page-sort install @pkcprotocol/active-page-sort

  $ bitsocial page-sort install @pkcprotocol/active-page-sort@1.0.0

  $ bitsocial page-sort install ./my-local-page-sort
```

_参见代码 : [src/cli/命令/页面类型/安装](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/page-sort/install.ts)_

## `bitsocial page-sort list`

列出已安装的页面排序包

```
USAGE
  $ bitsocial page-sort list [-q] [--pkcOptions.dataPath <value>]

FLAGS
  -q, --quiet                        Only display page sort names
      --pkcOptions.dataPath=<value>  Data path where page sorts are installed

DESCRIPTION
  List installed page sort packages

ALIASES
  $ bitsocial page-sort ls

EXAMPLES
  $ bitsocial page-sort list

  $ bitsocial page-sort list -q
```

_参见代码 : [src/cli/命令/页面类型/列表.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/page-sort/list.ts)_

## `bitsocial page-sort ls`

列出已安装的页面排序包

```
USAGE
  $ bitsocial page-sort ls [-q] [--pkcOptions.dataPath <value>]

FLAGS
  -q, --quiet                        Only display page sort names
      --pkcOptions.dataPath=<value>  Data path where page sorts are installed

DESCRIPTION
  List installed page sort packages

ALIASES
  $ bitsocial page-sort ls

EXAMPLES
  $ bitsocial page-sort list

  $ bitsocial page-sort list -q
```

## `bitsocial page-sort remove NAME`

删除已安装的页面排序软件包 。 在社区设置时拒绝 。 页面仍为它命名, 除非 -- force通过

```
USAGE
  $ bitsocial page-sort remove NAME --pkcRpcUrl <value> [--pkcOptions.dataPath <value>] [--force]

ARGUMENTS
  NAME  The page sort package name (e.g., my-page-sort or @scope/my-page-sort)

FLAGS
  --force                        Remove without checking whether communities still use it (the daemon is not contacted
                                 for the check)
  --pkcOptions.dataPath=<value>  Data path where page sorts are installed
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Remove an installed page sort package. Refuses while a community's settings.pages still names it, unless --force is
  passed

ALIASES
  $ bitsocial page-sort uninstall
  $ bitsocial page-sort rm
  $ bitsocial page-sort un

EXAMPLES
  $ bitsocial page-sort remove @pkcprotocol/active-page-sort

  $ bitsocial page-sort remove @pkcprotocol/active-page-sort --force
```

_参见代码 : [src/cli/commands/页面排序/移动.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/page-sort/remove.ts)_

## `bitsocial page-sort rm NAME`

删除已安装的页面排序软件包 。 在社区设置时拒绝 。 页面仍为它命名, 除非 -- force通过

```
USAGE
  $ bitsocial page-sort rm NAME --pkcRpcUrl <value> [--pkcOptions.dataPath <value>] [--force]

ARGUMENTS
  NAME  The page sort package name (e.g., my-page-sort or @scope/my-page-sort)

FLAGS
  --force                        Remove without checking whether communities still use it (the daemon is not contacted
                                 for the check)
  --pkcOptions.dataPath=<value>  Data path where page sorts are installed
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Remove an installed page sort package. Refuses while a community's settings.pages still names it, unless --force is
  passed

ALIASES
  $ bitsocial page-sort uninstall
  $ bitsocial page-sort rm
  $ bitsocial page-sort un

EXAMPLES
  $ bitsocial page-sort remove @pkcprotocol/active-page-sort

  $ bitsocial page-sort remove @pkcprotocol/active-page-sort --force
```

## `bitsocial page-sort un NAME`

删除已安装的页面排序软件包 。 在社区设置时拒绝 。 页面仍为它命名, 除非 -- force通过

```
USAGE
  $ bitsocial page-sort un NAME --pkcRpcUrl <value> [--pkcOptions.dataPath <value>] [--force]

ARGUMENTS
  NAME  The page sort package name (e.g., my-page-sort or @scope/my-page-sort)

FLAGS
  --force                        Remove without checking whether communities still use it (the daemon is not contacted
                                 for the check)
  --pkcOptions.dataPath=<value>  Data path where page sorts are installed
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Remove an installed page sort package. Refuses while a community's settings.pages still names it, unless --force is
  passed

ALIASES
  $ bitsocial page-sort uninstall
  $ bitsocial page-sort rm
  $ bitsocial page-sort un

EXAMPLES
  $ bitsocial page-sort remove @pkcprotocol/active-page-sort

  $ bitsocial page-sort remove @pkcprotocol/active-page-sort --force
```

## `bitsocial page-sort uninstall NAME`

删除已安装的页面排序软件包 。 在社区设置时拒绝 。 页面仍为它命名, 除非 -- force通过

```
USAGE
  $ bitsocial page-sort uninstall NAME --pkcRpcUrl <value> [--pkcOptions.dataPath <value>] [--force]

ARGUMENTS
  NAME  The page sort package name (e.g., my-page-sort or @scope/my-page-sort)

FLAGS
  --force                        Remove without checking whether communities still use it (the daemon is not contacted
                                 for the check)
  --pkcOptions.dataPath=<value>  Data path where page sorts are installed
  --pkcRpcUrl=<value>            (required) [default: ws://localhost:9138/] URL to PKC RPC

DESCRIPTION
  Remove an installed page sort package. Refuses while a community's settings.pages still names it, unless --force is
  passed

ALIASES
  $ bitsocial page-sort uninstall
  $ bitsocial page-sort rm
  $ bitsocial page-sort un

EXAMPLES
  $ bitsocial page-sort remove @pkcprotocol/active-page-sort

  $ bitsocial page-sort remove @pkcprotocol/active-page-sort --force
```

## `bitsocial reachability disable`

停止服务浏览器并恢复 kubo 配置 。 国家被保留,所以 `enable` 不需要新证书

```
USAGE
  $ bitsocial reachability disable [--pkcOptions.dataPath <value>] [--purge]

FLAGS
  --pkcOptions.dataPath=<value>  Data path of the node
  --purge                        Also move the state directory, including the ACME account and certificates, to a
                                 timestamped backup

DESCRIPTION
  Stop serving browsers and restore the kubo config. State is kept, so `enable` does not need new certificates

EXAMPLES
  $ bitsocial reachability disable

  $ bitsocial reachability disable --purge
```

_参见代码 : [src/cli/命令/可达性/残疾](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/reachability/disable.ts)_

## `bitsocial reachability enable`

恢复可达性:从存储的选择中重新运行发现和修复,而无需询问任何东西

```
USAGE
  $ bitsocial reachability enable [--pkcOptions.dataPath <value>]

FLAGS
  --pkcOptions.dataPath=<value>  Data path of the node

DESCRIPTION
  Turn reachability back on: re-run discovery and repair from the stored choices, without asking anything

EXAMPLES
  $ bitsocial reachability enable
```

_参见代码 : [scli/命令/可达到/可达到](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/reachability/enable.ts)_

## `bitsocial reachability setup`

从浏览器中使这个节点可拨号:发现公共地址,获得证书,配置kubo并验证. 重新运行的安全性

```
USAGE
  $ bitsocial reachability setup [--pkcOptions.dataPath <value>] [--domain <value>] [--announce <value>] [--force]
    [--staging] [--non-interactive]

FLAGS
  --announce=<value>             A multiaddr your own proxy serves, e.g. /dns4/node.example/tcp/443/tls/ws. Announced
                                 only after a real libp2p dial succeeds
  --domain=<value>               A domain pointing at this machine, to get a certificate for or to forward through your
                                 own proxy
  --force                        Continue when the domain does not resolve to this machine, for proxies in front of it
  --non-interactive              Never ask. Exit non-zero with the reason if an answer would be needed
  --pkcOptions.dataPath=<value>  Data path of the node
  --staging                      Use the Let's Encrypt staging CA. Its certificates are not trusted by browsers

DESCRIPTION
  Make this node dialable from browsers: discover public addresses, obtain a certificate, configure kubo and verify.
  Safe to rerun

EXAMPLES
  $ bitsocial reachability setup

  $ bitsocial reachability setup --staging

  $ bitsocial reachability setup --domain node.example

  $ bitsocial reachability setup --domain node.example --announce /dns4/node.example/tcp/443/tls/ws

  $ bitsocial reachability setup --non-interactive
```

_参见代码 : [src/cli/命令/可达到/设置.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/reachability/setup.ts)_

## `bitsocial reachability status`

显示浏览器能否到达此节点: 模式、 已宣布地址、 证书过期、 上次检查, 以及是否满足每项要求, 包括绑定 UDP 443 的权限

```
USAGE
  $ bitsocial reachability status [--json] [--pkcOptions.dataPath <value>]

FLAGS
  --pkcOptions.dataPath=<value>  Data path of the node

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Show whether browsers can reach this node: mode, announced addresses, certificate expiry, last checks, and whether
  each requirement is met, including permission to bind UDP 443

EXAMPLES
  $ bitsocial reachability status

  $ bitsocial reachability status --json
```

_参见代码 : [src/cli/命令/可达到性/状态.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/reachability/status.ts)_

## `bitsocial update check`

请检查npm上是否有更新的比特社会版本

```
USAGE
  $ bitsocial update check

DESCRIPTION
  Check if a newer version of bitsocial is available on npm

EXAMPLES
  $ bitsocial update check
```

_参见代码 : [src/cli/命令/更新/检查.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/update/check.ts)_

## `bitsocial update install [VERSION]`

从 npm 安装特定的位社会化版本

```
USAGE
  $ bitsocial update install [VERSION] [--force] [--restart-daemons]

ARGUMENTS
  [VERSION]  [default: latest] Version to install (e.g. "0.19.40" or "latest")

FLAGS
  --force                 Reinstall even if already on the requested version
  --[no-]restart-daemons  Stop all running daemons, update, and restart them with the same settings

DESCRIPTION
  Install a specific version of bitsocial from npm

EXAMPLES
  $ bitsocial update install

  $ bitsocial update install latest

  $ bitsocial update install 0.19.40

  $ bitsocial update install --force

  $ bitsocial update install --no-restart-daemons
```

_参见代码 : [scli/命令/更新/安装](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/update/install.ts)_

## `bitsocial update versions`

在 npm 上列出可用的比特社会版本

```
USAGE
  $ bitsocial update versions [--limit <value>]

FLAGS
  --limit=<value>  [default: 20] Maximum number of versions to display

DESCRIPTION
  List available bitsocial versions on npm

EXAMPLES
  $ bitsocial update versions

  $ bitsocial update versions --limit 5
```

_参见代码 : [src/cli/命令/更新/版本.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.124/src/cli/commands/update/versions.ts)_

## 捐款

我们总是很高兴收到拉票请求 很少有事情需要记住:

-   此还原随从 [角承诺公约](https://github.com/angular/angular/blob/main/CONTRIBUTING.md)遵循这些公约的最简单方法是: `npm run commit` 改为 `git commit`
-   如果您要添加一个功能, 请确保您在拉请求中添加测试

## 反馈

我们想听听你对我们社区频道的反馈

## 常见问题

### @bitsocial/bitsocial-cli 是什么？

命令行界面到 Bitsocial API

### 如何安装 @bitsocial/bitsocial-cli？

在项目目录运行 npm install @bitsocial/bitsocial-cli，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 bitsocial，可以用 npx bitsocial 直接运行。

### @bitsocial/bitsocial-cli 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @bitsocial/bitsocial-cli 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @bitsocial/bitsocial-cli 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=22\.19\.0。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @bitsocial/bitsocial-cli 可以商用吗？

@bitsocial/bitsocial-cli 使用 GPL-3\.0-or-later 许可。强 Copyleft：分发包含该代码的软件时，整个作品需以 GPL-3\.0 兼容许可开源，并附带专利与反锁定条款。仅内部使用不触发此义务。以上为概括，不构成法律意见，请以许可原文为准。

### @bitsocial/bitsocial-cli 的下载量有多少？

根据 npm 官方下载统计，@bitsocial/bitsocial-cli 在 2026/10/08 – 2026/11/06 这 30 天内被下载 3,955 次，日均约 132 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @bitsocial/bitsocial-cli 还在维护吗？

最新版本 0\.19\.124 发布于 2026/11/05（2 天前）；至今共发布 86 个版本，其中过去 12 个月发布了 86 个；首次发布于 2026/04/17。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

