Skip to main content

CLI for nonebot2

Project description

nonebot

NB CLI

✨ NoneBot2 命令行工具 ✨

license pypi python site pre-commit
QQ Chat Group QQ Channel Telegram Channel Discord Server

文档 · 安装 · NoneBot 文档

功能

  • 创建新的 Nonebot 项目
  • 启动 Nonebot
  • 管理插件
    • 创建新的插件
    • 搜索/安装/更新/卸载在官方商店上发布的插件
  • 管理适配器
    • 创建新的适配器
    • 搜索/安装/更新/卸载在官方商店上发布的适配器
  • 管理驱动器
    • 搜索/安装/更新/卸载在官方商店上发布的驱动器
  • 支持 CLI 插件和运行脚本

使用

完整使用文档请参考 文档

安装

使用 pipx 安装

pipx install nb-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 在当前目录启动 NoneBot
  • nb generate 在当前目录生成启动脚本
  • nb driver 管理驱动器
  • nb plugin 管理插件
  • nb adapter 管理适配器
  • nb self 管理 CLI 内部环境
  • nb <script> 运行脚本

Docker 镜像使用

docker run --rm -it -v ./:/workspaces nonebot/nb-cli:latest --help

挂载当前目录到容器的 /workspaces 目录,然后在容器中运行 nb 命令。

交互式使用

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nb_cli-1.7.0.tar.gz (68.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nb_cli-1.7.0-py3-none-any.whl (97.9 kB view details)

Uploaded Python 3

File details

Details for the file nb_cli-1.7.0.tar.gz.

File metadata

  • Download URL: nb_cli-1.7.0.tar.gz
  • Upload date:
  • Size: 68.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.6 CPython/3.10.19 Linux/6.11.0-1018-azure

File hashes

Hashes for nb_cli-1.7.0.tar.gz
Algorithm Hash digest
SHA256 7acd31530070042ea5910d8b789b616d867216db34720726cc8a1587e4ed2740
MD5 7d2725fb72df7dee0624b6e7990b1b94
BLAKE2b-256 1e01b0f679397c07695a6bf46fe018b5527069c9c96279f2ab2c00ec25e5b8d8

See more details on using hashes here.

File details

Details for the file nb_cli-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: nb_cli-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 97.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.6 CPython/3.10.19 Linux/6.11.0-1018-azure

File hashes

Hashes for nb_cli-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 032605794f9ad3423db920963f0d957edfb1a47235f1e7dcc1eae7a547d1c35d
MD5 41113e06e7481671edd536ef360809f5
BLAKE2b-256 4d3920fa99c7cf693cf64c63fe3efb26fed5cf6ec9b047588e543f7804d963e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page