Skip to content
/CreatorBox/images/jms_logo.png

终端命令 🖥️

字数
850 字
阅读
5 分钟

终端命令行工具

使用帮助

bash
uv run cli.py --help
bash
Usage: cli.py [OPTIONS] COMMAND [ARGS]...

  CreatorBox CLI

Options:
  --help  Show this message and exit.

Commands:
  auth     认证鉴权 Authentication
  install  扩展安装 Extension Installation
  proxy    网络代理 Proxy settings
  start    启动服务 Start service
  update   检查更新 Check for updates

注意

  • 激活环境后操作
bash
D: & cd "D:\Program Files\CreatorBox" & "D:\Program Files\CreatorBox\creatorbox\.venv\Scripts\activate"

终端命令

1. 扩展安装

bash
# iopaint
uv run cli.py install -n iopaint -p 8001 --start
# stable-diffusion-webui
uv run cli.py install -n stable-diffusion-webui -p 8002 --start
# cosyvoice
uv run cli.py install -n cosyvoice -p 8003 --start
# index_tts
uv run cli.py install -n index_tts -p 8004 --start
# gpt_sovits
uv run cli.py install -n gpt_sovits -p 8005 --start

正常返回结果

log
Python 3.10.19
Using extensions/iopaint/.venv/scripts/python.exe
📦 Installing extension 'iopaint'...
Checked 106 packages in 2ms
All installed packages are compatible
Audited 24 packages in 7ms
✅ Installation complete.
🚀 Starting extension 'iopaint'...
extensions/iopaint/.venv/scripts/python.exe main.py start --config D:\Program Files\CreatorBox\creatorbox\webapp\extensions\iopaint\data\iopaint.json
2025-11-02 18:35:13.875 | INFO     | src.utils.cbinstaller:start:206 - ✅ iopaint 已启动(PID: 1904
2025-11-02 18:35:14.182 | INFO     | iopaint.runtime:setup_model_dir:81 - Model directory: D:\Program Files\CreatorBox\creatorbox\models
...
2025-11-02 18:35:14.225 | INFO     | iopaint.cli:start:166 - Image will be saved to D:\Program Files\CreatorBox\creatorbox\webapp\extensions\iopaint\result
...
2025-11-02 18:35:17.419 | INFO     | iopaint.api:_build_file_manager:369 - Input is directory, initialize file manager D:\Program Files\CreatorBox\creatorbox\webapp\extensions\iopaint\picture
2025-11-02 18:35:17.428 | INFO     | iopaint.model_manager:init_model:47 - Loading model: lama
2025-11-02 18:35:17.430 | INFO     | iopaint.helper:load_jit_model:107 - Loading model from: D:\Program Files\CreatorBox\creatorbox\models\torch\hub\checkpoints\big-lama.pt
INFO:     Started server process [2588]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit)

2. 网络代理

  • 默认
bash
uv run cli.py proxy -h 127.0.0.1 -p 10808
  • 用户认证
bash
uv run cli.py proxy -h 127.0.0.1 -p 10810 -u admin -pwd 123456
  • 指定站点
bash
uv run cli.py proxy -h 127.0.0.1 -p 10810 -u admin -pwd 123456 -s https://www.youtube.com -t 5

正常返回结果

log
🌐 Starting proxy verify. -> https://www.youtube.com
✅ Proxy verified successfully.

提示

  • 代理验证成功后无需开启 v2rayN 全局模式
  • 支持 --proxy 命令行工具均可使用此参数

3. 启动服务

  • 默认
bash
uv run cli.py start
  • 指定 host + 端口
bash
uv run cli.py start -h 0.0.0.0 -p 80
  • 开启内网透传
bash
uv run cli.py start -h 0.0.0.0 -p 80 -nh toucan-real-informally.ngrok-free.app -np 80 --ngrok

正常返回结果

log
✅ Ngrok tunnel started: NgrokTunnel: "https://toucan-real-informally.ngrok-free.app" -> "http://localhost:80"
🚀 Starting service... http://0.0.0.0:8000
   _____                _            ______
  /  __ \              | |           | ___ \
  | /  \/_ __ ___  __ _| |_ ___  _ __| |_/ / _____  __
  | |   | '__/ _ \/ _` | __/ _ \| '__| ___ \/ _ \ \/ /
  | \__/\ | |  __/ (_| | || (_) | |  | |_/ / (_) >  <
   \____/_|  \___|\__,_|\__\___/|_|  \____/ \___/_/\_\   v1.0.26.f83bdbff

2025-11-27 16:04:54.355 | INFO  2616  main.py:113 - Build on master at 2025-11-26 21:21:28 started run successfully (5.98 seconds)
2025-11-27 16:04:54.356 | INFO  2616  main.py:124 - Running on CPU device using Windows OS located in CN.
2025-11-27 16:04:54.356 | INFO  2616  main.py:126 - Running with Python 3.11.11 and Torch 2.6.0+cpu.
2025-11-27 16:04:54.357 | INFO  2616  main.py:128 - Startup 7 app completed.
2025-11-27 16:04:54.358 | INFO  2616  main.py:129 - http://127.0.0.1:8000

注意

认证鉴权

1. 邮箱注册

  • 随机密码
bash
uv run cli.py auth -a register -e xiesx123@gmail.com
  • 指定密码
bash
uv run cli.py auth -a register -e xiesx123@gmail.com -p 123456
  • 指定密码 + 使用代理
bash
uv run cli.py auth -a register -e xiesx123@gmail.com -p 123456 --proxy

正常返回结果

log
😊 Starting register -> xiesx123@gmail.com
✅ register successfully. please check your email to verify.

2.修改密码

  • 默认
bash
uv run cli.py auth -a resetpwd -e xiesx123@gmail.com
  • 使用代理
bash
uv run cli.py auth -a resetpwd -e xiesx123@gmail.com --proxy

正常返回结果

log
😊 Starting resetpwd -> xiesx123@gmail.com
✅ Resetpwd successfully. please check your email to reset your password.

注意

  • 程序不会记录保存密码信息
  • 授权认证过程中,邮箱注册密码重置 时会通过 Google Firebase 发出邮件进行认证
邮箱验证密码重置
firebase_auth_user_verify_mailfirebase_auth_user_verify_mail

3. 账号登录

  • 默认
bash
uv run cli.py auth -a login -e xiesx123@gmail.com -p 123456
  • 使用代理
bash
uv run cli.py auth -a login -e xiesx123@gmail.com -p 123456 --proxy

正常返回结果

log
😊 Starting login -> xiesx123@gmail.com
✅ Login successfully. token -> eyJhbGciOiJSUzI1NiIsImtpZCI6IjJiN2JhZ
hZmIyZjEwY2FlMmIxZjA3ZjM4MTZjNTQyMmJlY2NhNWMyMjMiLCJ0eXAiOiJKV1QifQXX
eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vdGVzdC1mOWQxMSIsI
CI6InRlc3QtZjlkMTEiLCJhdXRoX3RpbWUiOjE3NTUxNjE4NzEsInVzZXJfaWQiOiJYdj
dROUFpZnNUVUhuTXo2WmRIZWhvYndUb0czIiwic3ViIjoiWHY3UTlBaWZzVFVIbk16Nlp
....
kSGVob2J3VG9HMyIsImlhdCI6MTc1NTE2MTg3MSwiZXhwIjoxNzU1MTY1NDcxLCJlbWFp