{"id":20390283,"url":"https://github.com/nonebot/nb-cli","last_synced_at":"2026-02-28T19:03:00.487Z","repository":{"id":40653648,"uuid":"290738792","full_name":"nonebot/nb-cli","owner":"nonebot","description":"NoneBot2 脚手架 / CLI for NoneBot2","archived":false,"fork":false,"pushed_at":"2024-04-12T12:38:06.000Z","size":1385,"stargazers_count":147,"open_issues_count":0,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-14T09:04:12.685Z","etag":null,"topics":["cli","nonebot2"],"latest_commit_sha":null,"homepage":"https://cli.nonebot.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nonebot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"open_collective":"nonebot","custom":["https://afdian.net/@nonebot"]}},"created_at":"2020-08-27T09:52:50.000Z","updated_at":"2024-04-16T05:38:04.505Z","dependencies_parsed_at":"2023-10-16T04:22:57.873Z","dependency_job_id":"ee2c4133-cb93-4bc1-983c-34035e59ce82","html_url":"https://github.com/nonebot/nb-cli","commit_stats":{"total_commits":331,"total_committers":20,"mean_commits":16.55,"dds":0.5256797583081572,"last_synced_commit":"40157b97790843982743f37744b9641f5fb85111"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fnb-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fnb-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fnb-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fnb-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonebot","download_url":"https://codeload.github.com/nonebot/nb-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294516,"owners_count":20915340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","nonebot2"],"created_at":"2024-11-15T03:24:00.748Z","updated_at":"2026-02-28T19:03:00.458Z","avatar_url":"https://github.com/nonebot.png","language":"Python","readme":"\u003c!-- markdownlint-disable MD033 MD041 --\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cli.nonebot.dev/\"\u003e\u003cimg src=\"https://cli.nonebot.dev/logo.png\" width=\"200\" height=\"200\" alt=\"nonebot\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# NB CLI\n\n_✨ NoneBot2 命令行工具 ✨_\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://raw.githubusercontent.com/nonebot/nb-cli/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/nonebot/nb-cli\" alt=\"license\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/nb-cli\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/nb-cli\" alt=\"pypi\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3.10+-blue\" alt=\"python\"\u003e\n  \u003ca href=\"https://github.com/nonebot/nb-cli/actions/workflows/website-deploy.yml\"\u003e\n    \u003cimg src=\"https://github.com/nonebot/nb-cli/actions/workflows/website-deploy.yml/badge.svg?branch=master\u0026event=push\" alt=\"site\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/j178/prek\"\u003e\n    \u003cimg src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json\" alt=\"prek\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://docs.basedpyright.com\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/basedpyright-checked-green?style=flat\u0026logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCBmaWxsPSIjZmZjMTA1IiB4PSIxIiB5PSI2IiB3aWR0aD0iNCIgaGVpZ2h0PSI0Ii8%2BPHJlY3QgZmlsbD0iI2ZmYzEwNSIgeD0iMTEiIHk9IjYiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiLz48cmVjdCBmaWxsPSIjZmZjMTA1IiB4PSI2IiB5PSI2IiB3aWR0aD0iNCIgaGVpZ2h0PSI0Ii8%2BPC9zdmc%2B\u0026labelColor=%23111\u0026link=https%3A%2F%2Fdocs.basedpyright.com%2Flatest%2F\" alt=\"basedpyright checked\"\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://jq.qq.com/?_wv=1027\u0026k=5OFifDh\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/QQ%E7%BE%A4-768887710-orange?style=flat-square\" alt=\"QQ Chat Group\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://qun.qq.com/qqweb/qunpro/share?_wv=3\u0026_wwv=128\u0026appChannel=share\u0026inviteCode=7b4a3\u0026appChannel=share\u0026businessType=9\u0026from=246610\u0026biz=ka\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/QQ%E9%A2%91%E9%81%93-NoneBot-5492ff?style=flat-square\" alt=\"QQ Channel\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://t.me/botuniverse\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/telegram-botuniverse-blue?style=flat-square\" alt=\"Telegram Channel\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://discord.gg/VKtE6Gdc4h\"\u003e\n    \u003cimg src=\"https://discordapp.com/api/guilds/847819937858584596/widget.png?style=shield\" alt=\"Discord Server\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cli.nonebot.dev/\"\u003e文档\u003c/a\u003e\n  ·\n  \u003ca href=\"https://cli.nonebot.dev/docs/guide/installation\"\u003e安装\u003c/a\u003e\n  ·\n  \u003ca href=\"https://nonebot.dev/\"\u003eNoneBot 文档\u003c/a\u003e\n\u003c/p\u003e\n\n## 功能\n\n- 创建新的 Nonebot 项目\n- 启动 Nonebot\n- 管理插件\n  - 创建新的插件\n  - 搜索/安装/更新/卸载在官方商店上发布的插件\n- 管理适配器\n  - 创建新的适配器\n  - 搜索/安装/更新/卸载在官方商店上发布的适配器\n- 管理驱动器\n  - 搜索/安装/更新/卸载在官方商店上发布的驱动器\n- 支持 CLI 插件和运行脚本\n\n## 使用\n\n完整使用文档请参考 [文档](https://cli.nonebot.dev/)。\n\n### 安装\n\n#### 使用 pipx 安装\n\n```shell\npipx install nb-cli\n```\n\n#### 使用 uv 安装\n\n```shell\nuv tool install nb-cli@latest\nuv tool update-shell\n```\n\n其中 `latest` 可以更改为指定的 CLI 版本\n\n#### 使用 Docker 安装\n\n```shell\ndocker pull nonebot/nb-cli:latest\n```\n\nDocker 镜像可以选择以下版本：\n\n- `latest`, `latest-slim`：最新的稳定版本\n- `latest-${python版本}`, `latest-${python版本}-slim`：指定 Python 版本的最新稳定版本\n- `${cli版本}`, `${cli版本}-slim`：指定 CLI 版本的最新稳定版本\n- `${cli版本}-${python版本}`, `${cli版本}-${python版本}-slim`：指定 CLI 和 Python 版本的最新稳定版本\n\n### 命令行使用\n\n```shell\nnb --help\n```\n\n\u003e **Warning**\n\u003e\n\u003e 如果找不到 `nb` 命令，请尝试 `pipx ensurepath` 来添加路径到环境变量\n\n- `nb create (init)` 创建新的 NoneBot 项目\n- `nb run` 在当前目录启动 NoneBot\n- `nb generate` 在当前目录生成启动脚本\n- `nb driver` 管理驱动器\n- `nb plugin` 管理插件\n- `nb adapter` 管理适配器\n- `nb self` 管理 CLI 内部环境\n- `nb \u003cscript\u003e` 运行脚本\n\n#### uv tool 使用\n\n```shell\nuvx --from nb-cli@latest nb --help\n```\n\n#### Docker 镜像使用\n\n```shell\ndocker run --rm -it -v ./:/workspaces nonebot/nb-cli:latest --help\n```\n\n挂载当前目录到容器的 `/workspaces` 目录，然后在容器中运行 `nb` 命令。\n\n### 交互式使用\n\n```shell\nnb\n```\n\n#### uv tool 使用\n\n```shell\nuvx --from nb-cli@latest nb\n# 或\nuv tool run --from nb-cli nb\n```\n\n#### Docker 镜像使用\n\n```shell\ndocker run --rm -it -v ./:/workspaces nonebot/nb-cli:latest\n```\n\n## 开发\n\n### 翻译\n\n生成模板\n\n```shell\npdm run extract\n```\n\n初始化语言翻译文件或者更新现有语言翻译文件\n\n```shell\npdm run init en_US\n```\n\n更新语言翻译文件\n\n```shell\npdm run update\n```\n\n编译语言翻译文件\n\n```shell\npdm run compile\n```\n","funding_links":["https://opencollective.com/nonebot","https://afdian.net/@nonebot"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fnb-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonebot%2Fnb-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fnb-cli/lists"}