文档 · 安装 · NoneBot 文档
功能
- 创建新的 Nonebot 项目
- 启动 Nonebot
- 管理插件
- 创建新的插件
- 搜索/安装/更新/卸载在官方商店上发布的插件
- 管理适配器
- 创建新的适配器
- 搜索/安装/更新/卸载在官方商店上发布的适配器
- 管理驱动器
- 搜索/安装/更新/卸载在官方商店上发布的驱动器
- 支持 CLI 插件和运行脚本
使用
完整使用文档请参考 文档。
安装
使用 pipx 安装
pipx install nb-cli
使用 uv 安装
uv tool install nb-cli@latest
uv tool update-shell
其中 latest 可以更改为指定的 CLI 版本
使用 Docker 安装
docker pull nonebot/nb-cli:latest
Docker 镜像可以选择以下版本:
latest,latest-slim:最新的稳定版本latest-${python版本},latest-${python版本}-slim:指定 Python 版本的最新稳定版本${cli版本},${cli版本}-slim:指定 CLI 版本的最新稳定版本${cli版本}-${python版本},${cli版本}-${python版本}-slim:指定 CLI 和 Python 版本的最新稳定版本
命令行使用
nb --help
Warning
如果找不到
nb命令,请尝试pipx ensurepath来添加路径到环境变量
nb create (init)创建新的 NoneBot 项目nb run在当前目录启动 NoneBotnb generate在当前目录生成启动脚本nb driver管理驱动器nb plugin管理插件nb adapter管理适配器nb self管理 CLI 内部环境nb <script>运行脚本
uv tool 使用
uvx --from nb-cli@latest nb --help
Docker 镜像使用
docker run --rm -it -v ./:/workspaces nonebot/nb-cli:latest --help
挂载当前目录到容器的 /workspaces 目录,然后在容器中运行 nb 命令。
交互式使用
nb
uv tool 使用
uvx --from nb-cli@latest nb
# 或
uv tool run --from nb-cli nb
Docker 镜像使用
docker run --rm -it -v ./:/workspaces nonebot/nb-cli:latest
开发
翻译
生成模板
pdm run extract
初始化语言翻译文件或者更新现有语言翻译文件
pdm run init en_US
更新语言翻译文件
pdm run update
编译语言翻译文件
pdm run compile
Metadata
Release files for nb-cli 1.7.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nb_cli-1.7.4.tar.gz | 70.4 kB | Without provenance | Details for nb_cli-1.7.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nb_cli-1.7.4-py3-none-any.whl | Python 3 | none | any | Details for nb_cli-1.7.4-py3-none-any.whl |
Total release size: 169.3 kB
Release files / nb_cli-1.7.4.tar.gz
| Download URL | nb_cli-1.7.4.tar.gz |
|---|---|
| Size | 70.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9df07f9ecc9f0e42713d871466939bee8aef84cff8693d309ec98d3039159397
|
|
BLAKE2b-256 checksum How to use checksums |
306b2a9978ddd452be63323a160f924f3cdcafbd364dc54c30455085fd65a184
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.26.8 CPython/3.10.20 Linux/6.17.0-1010-azure
|
Release files / nb_cli-1.7.4-py3-none-any.whl
| Download URL | nb_cli-1.7.4-py3-none-any.whl |
|---|---|
| Size | 98.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5024c106e986109b4d5cc83e76041e525db1ad77e7901a0a01ce1efee8b7fb04
|
|
BLAKE2b-256 checksum How to use checksums |
be61af6e67389f17e423bf31c32cac0a5bacf90496ba3c1e0b56a4e0a80b3b46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.26.8 CPython/3.10.20 Linux/6.17.0-1010-azure
|
Security for nb-cli 1.7.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.