安装与初始化
安裝
在linux使用
请确保在运行安装脚本前已安装 jq 工具。若未安装,可根据您的系统使用以下命令安装
sudo apt-get update && sudo apt-get install jq
安装好jq后使用下面命令行下载安装
curl -fL https://gym.lejurobot.com/manual/resources/install.sh -o install.sh
chmod +x install.sh
source install.sh
在mac使用
mac由于系统原因对指令响应较慢,推荐使用linux或windows系统 使用命令行下载
curl -fL https://gym.lejurobot.com/manual/resources/install_mac.sh | sh
在Windows上使用
Win+R输入cmd打开命令行运行以下命令。
powershell -NoProfile -Command "curl -Uri 'https://gym.lejurobot.com/manual/resources/install.bat' -OutFile '%temp%\install.bat'; Start-Process '%temp%\install.bat' -Verb RunAs"
初始化
获取帮助信息
使用gym --help确认命令行工具已经成功安装,并查看工具的基本用法。
Usage: gym [OPTIONS] COMMAND [ARGS]...
Gym - 数据管理命令行工具
用于配置、管理任务和数据的命令行接口
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
config 配置管理命令
data 数据管理命令
project 项目管理命令
scene 场景管理命令
task 任务管理命令
update 检查并提示最新脚本版本
⚠️ 注意: 所有命令的详细参数与功能均可使用gym [command] [subcommand] --help来查看。
更新至最新版本
gym update
登录
登录需要使用乐聚数采平台账号密码。
gym config login <username> <password>
查看账户信息可使用一下命令。
gym config show
可显示当前账户的配置信息。
当前配置:
用户ID: usrname
接口地址: http://gym.lejurobot.com
SSL验证: 开启
访问令牌: eyJ0***
退出登录和清理配置
gym config clear