rokidos-cli

0.10.2 • Public • Published

rokidos-cli

RokidOS极客们量身打造的命令行工具,主要用于安装、构建、测试以及发布你的RokidOS应用。

Usage: rokid/ro [command]
 
ro help                 Get helps
ro devices              List connected devices
ro run [file]           Run scripts on device
ro shell <command>      Wait for an connectable device and shell
ro test <dir>           Run tests on your device
ro log <filter>         Show the logs of connected device by comma-based filter
ro install <dir>        Install the Rokid App from directory
ro build <dir>          Build the Rokid App to .rpp
 
rokid@${VERSION}

如何安装

我们通过npm提供该工具包,因此确保你成功安装了Node.js环境后:

$ npm install rokidos-cli -g

已支持命令

在该章节,我们将会介绍一些基本用法。

应用相关

使用下面的命令可以在本地构建命令

$ ro build ./

然后使用ro install安装到设备中。

脚本运行
$ ro run /path/to/your/js/file

上述命令会将你电脑中的脚本推到设备中的临时文件夹,再运行该文件

shell

使用ro shell可以直接进入设备终端

测试

测试你的应用,首先你需要在当前目录下创建一个tests目录,然后在测试脚本中的代码样例如下:

test('test voice play', (t) => {
  t.send(<asr>, <nlp>, <action>);
  t.assert(<event>, <value>, (data) => {
    // got event
    t.done();
  });
});
日志

使用如下命令可以输出所有日志:

$ ro log

如果想输出特定进程的日志,则:

$ ro log ams

一般调试应用查看日志可以使用:

$ ro log ams,zygote

会输出所有ams以及应用进程的日志。

授权

Rokid, Inc @ Copyright

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.10.2
    1
    • latest

Version History

Package Sidebar

Install

npm i rokidos-cli

Weekly Downloads

13

Version

0.10.2

License

MIT

Last publish

Collaborators

  • yorkie