2026-07-14 16:10:08 +08:00

41 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# PicoBot 常用命令
```bash
# 编译
cargo build
# 启动网关 (默认 127.0.0.1:19876)
cargo run -- gateway
# 启动 CLI 客户端 (连接 ws://127.0.0.1:19876/ws)
cargo run -- chat
# 安装并启动 Linux systemd 用户服务
picobot service install
picobot service start
# 查看、重启或停止服务
picobot service status
picobot service restart
picobot service stop
# 停止、禁用并删除服务
picobot service uninstall
# 运行单元测试
cargo test --lib
# 运行离线集成/协议测试
cargo test --test test_scheduler
cargo test --test test_request_format
# 运行代码检查Rust 修改必跑)
cargo clippy --all-targets --all-features -- -D warnings
# 运行模型 API 集成测试(需配置 tests/test.env
cargo test --test test_integration -- --ignored
cargo test --test test_tool_calling -- --ignored
```
`test_scheduler``test_request_format` 不需要 API Key也没有标记 `#[ignore]`。只有会真实调用 Provider 的测试需要从 `tests/test.env.example` 创建 `tests/test.env` 后使用 `-- --ignored`