Metadata-Version: 2.1
Name: nb-cli
Version: 0.5.0
Summary: CLI for nonebot2
Home-page: https://github.com/nonebot/nb-cli
License: MIT
Keywords: bot,qq,nonebot
Author: yanyongyu
Author-email: yanyongyu_1@126.com
Requires-Python: >=3.7.3,<4.0.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Robot Framework
Classifier: Framework :: Robot Framework :: Library
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Provides-Extra: deploy
Provides-Extra: docker
Requires-Dist: click (>=8.0.0,<9.0.0)
Requires-Dist: colorama (>=0.4.3,<0.5.0)
Requires-Dist: cookiecutter (>=1.7.2,<2.0.0)
Requires-Dist: docker-compose (>=1.29.2,<1.30.0); extra == "deploy" or extra == "docker"
Requires-Dist: httpx (>=0.18.0,<0.19.0)
Requires-Dist: nonebot2 (>=2.0.0-alpha.14,<3.0.0)
Requires-Dist: prompt-toolkit (>=3.0.19,<4.0.0)
Requires-Dist: pyfiglet (>=0.8.post1,<0.9)
Requires-Dist: tomlkit (>=0.7.0,<0.8.0)
Project-URL: Repository, https://github.com/nonebot/nb-cli
Description-Content-Type: text/markdown

# nb-cli

[English](./README_en.md) | **中文**

NoneBot2 的命令行工具

## 功能

- 创建新的 Nonebot 项目
- 启动 Nonebot
- 部署 NoneBot 到 Docker
- 管理插件
  - 创建新的插件
  - 搜索/安装/更新/卸载在官方商店上发布的插件
- 管理适配器
  - 创建新的适配器
  - 搜索/安装/更新/卸载在官方商店上发布的适配器

## 使用

### 安装

```shell
pip install nb-cli
```

或者，带有可选的 `deploy` 依赖项

```shell
pip install nb-cli[deploy]
```

### 命令行使用

```shell
nb --help
```

- `nb init (create)` 创建新的 Nonebot 项目
- `nb run` 在当前目录启动 Nonebot
- `nb plugin` 管理插件
  - `nb plugin new (create)` 创建新的插件
  - `nb plugin list` 列出官方商店的所有插件
  - `nb plugin search` 在官方商店搜索插件
  - `nb plugin install (add)` 安装插件
  - `nb plugin update` 更新插件
  - `nb plugin uninstall (remove)` 卸载插件
- `nb adapter` 管理适配器
  - `nb adapter new (create)` 创建新的适配器
  - `nb adapter list` 列出官方商店的所有适配器
  - `nb adapter search` 在官方商店搜索适配器
  - `nb adapter install (add)` 安装适配器
  - `nb adapter update` 更新适配器
  - `nb adapter uninstall (remove)` 卸载适配器

#### 以下功能需要 [deploy] 依赖

- `nb build` 在当前目录构建 Docker 镜像
- `nb deploy (up)` 在当前目录构建、创建并运行 Docker 容器
- `nb exit (down)` 在当前目录停止并删除 Docker 容器

### 交互式使用

```shell
nb
```

### CookieCutter 使用

#### 安装 cookiecutter

```shell
pip install cookiecutter
```

#### 创建项目

```shell
cookiecutter https://github.com/nonebot/nb-cli.git --directory="nb_cli/project"
```

#### 创建插件

```shell
cookiecutter https://github.com/nonebot/nb-cli.git --directory="nb_cli/plugin"
```

#### 创建适配器

```shell
cookiecutter https://github.com/nonebot/nb-cli.git --directory="nb_cli/adapter"
```

