@crestron/ch5-utilities-cli

中文文档
2.19.0发布于 2026/08/25SEE LICENSE IN LICENSE.txtTypeScriptCommonJS近 30 天下载 5580

CH5 Utilities CLI for archiving and distribution

原始使用文档
文档目录9 节
  1. Table of Contents
  2. Background
  3. Setup
  4. Commands
  5. npm run publish:local
  6. Usage
  7. Authentication to Control System
  8. Examples
  9. License

CH5 Utilities CLI

Archiving and distribution utilities from the ch5-utilities library wrapped as CLI commands.

Table of Contents

Background

The purpose of the library is to expose the ch5-utilities archive and distribute functionality as two commands: archive and deploy.

Setup

Before going through these steps, make sure you have completed the setup section in ch5-utilities, since it is a dependency.

Install the required packages.

npm install

Add the ch5-utilities library.

npm link @crestron/ch5-utilities

Build the library.

npm run build

Publish the ch5-utilities-cli library for local usage.

npm run link

Commands

npm run publish:local

After the initial setup, you can use this command to rebuild and publish changes in the library.

Usage

The cli contains two commands: archive and deploy. After following the steps from above, just write ch5-cli in the terminal, and hit enter - it will display the default message for options and commands. For details about how to use the commands, you can write ch5-cli archive --help or ch5-cli deploy --help - this will display the options and what they mean.

First you would need to run the archive command to generate the ch5z file, then you need to run the deploy command giving the archive path ( relative or absolute ). The deploy command will prompt you for the SFTP user and password,

Authentication to Control System

There are multiple ways in which the user can provide credentials to the ch5-cli:

  • default values
  • environment variables (CH5CLI_DEPLOY_USER and CH5CLI_DEPLOY_PW)
  • a public/private key pair

The truth table below demonstrates the behavior depending on the parameters that are passed:

-u identityUser-i identityFile-p prompt for credentialsenv varsAuthenticate with
0000Default values
0001Environment variables
001XUser and password from user prompt
0100System username ($USER on unix, %USERNAME% on windows)
0101User and passphrase from environment variables
011XUser and passphrase from user prompt
10XXInvalid combination. Will display an error message
1100Provided identityUser and identityFile. If passphrase is required, an error message is shown
1101Passphrase from environment variable, if required
111XPassphrase from user prompt

Examples

> ch5-cli archive --project-name angular-demo-app --directory-name dist/NgIseCh5Demo --output-directory output-test
>
> ch5-cli archive -p my-project-v1.0.0 -d ./ -o /Users/${USERNAME}o/git/CH5UtilitiesCli -s shell-template.ch5z
>
> ch5-cli deploy output-test/angular-demo-app.ch5z --deviceHost 192.168.2.44 --deviceDirectory display --deviceType touchscreen

License

Copyright (C) 2018 to the present, Crestron Electronics, Inc. All rights reserved. No part of this software may be reproduced in any form, machine or natural, without the express written consent of Crestron Electronics. Use of this source code is subject to the terms of the Crestron Software Development Tools License Agreement under which you licensed this source code.

If you did not accept the terms of the license agreement, you are not authorized to use this software. For the terms of the license, please see the license agreement between you and Crestron at http://www.crestron.com/sla.

版本与发布记录

@crestron/ch5-utilities-cli 共发布 512 个版本,首次发布于 2019/06/05;过去 12 个月发布了 1 个版本。

版本发布日期距今
2.19.0latest2026/08/252 个月前
2.0.02022/08/224 年前
99.0.506latest-dev2021/07/315 年前
99.0.5052021/07/305 年前
99.0.5042021/07/295 年前
99.0.5032021/07/285 年前

其他发布通道:latest-beta → 0.1.50,latest-qe → 0.1.52,latest-dev → 99.0.506。

关于 @crestron/ch5-utilities-cli 的常见问题

@crestron/ch5-utilities-cli 是什么?

CH5 Utilities CLI for archiving and distribution

如何安装 @crestron/ch5-utilities-cli?

在项目目录运行 npm install @crestron/ch5-utilities-cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 ch5-cli,可以用 npx ch5-cli 直接运行。

@crestron/ch5-utilities-cli 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@crestron/ch5-utilities-cli 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@crestron/ch5-utilities-cli 可以商用吗?

@crestron/ch5-utilities-cli 使用 SEE LICENSE IN LICENSE.txt 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@crestron/ch5-utilities-cli 的下载量有多少?

根据 npm 官方下载统计,@crestron/ch5-utilities-cli 在 2026/10/11 – 2026/11/09 这 30 天内被下载 5,580 次,日均约 186 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@crestron/ch5-utilities-cli 还在维护吗?

最新版本 2.19.0 发布于 2026/08/25(2 个月前);至今共发布 512 个版本,其中过去 12 个月发布了 1 个;首次发布于 2019/06/05。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。