Skip to content

由 WildboarG 贡献,Ai-Thinker 进行整理

给Ai-WB2写了一个快速生成工程的小工具

WB2-CLI


一个快速生成Ai-Thinker-WB2工程的cli工具

依赖


需要安装WB2的SDK到本机

安装


  1. 手动构建

    • 下载
📜 点击展开完整代码
html
git clone [https://github.com/WildboarG/WB2-CLI.git](https://github.com/WildboarG/WB2-CLI.git)
 cd WB2-CLI
  • 编译
📜 点击展开完整代码
html
go build .
  1. 或安装发行版

    • 下载(以linux为例)
📜 点击展开完整代码
html
wget -O wb2-cli [https://github.com/WildboarG/wb2-cli/releases/download/v0.0.1/wb2-cli-linux-amd64](https://github.com/WildboarG/wb2-cli/releases/download/v0.0.1/wb2-cli-linux-amd64)
  • 提权
📜 点击展开完整代码
html
chmod +x wb2-cli
  • 移动到系统目录
📜 点击展开完整代码
html
sudo mv wb2-cli /usr/bin/.

使用

  • 查看帮助:
📜 点击展开完整代码
html
wb2-cli  -h
📜 点击展开完整代码
html
NAME:
   wb2-cli - wb2-cli [commands]

USAGE:
   wb2-cli [global options] command [command options]

VERSION:
   v0.0.1

COMMANDS:
   init     Initialize a  WB2 SDK PATH
   create   Create a new project
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version
  • 初始化:
  • 根据提示输入安装sdk的路径
  • 建议将路径保存在系统环境变量下(2,3,4),这样就不用每次创建工程再次初始化
📜 点击展开完整代码
html
wb2-cli init
  • 创建一个新工程:
    • 根据提示输出工程名字即可
📜 点击展开完整代码
html
wb2-cli create

Released under the MIT License. Build Time 2026-09-11 14:52:23