# @calltelemetry/cli 中文文档

规范地址：https://npmcn.com/package/%40calltelemetry/cli/

版本：0\.15\.1
npm 元数据更新时间：2026-11-02T14:33:13.038Z
中文译文更新时间：2026-11-09T00:21:18.520Z
软件包许可：UNLICENSED

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40calltelemetry/cli
原文对照：https://npmcn.com/package/%40calltelemetry/cli/?lang=original
项目主页：https://github.com/calltelemetry/ct-cli#readme
源码仓库：https://github.com/calltelemetry/ct-cli

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：4.3 MB，1278 个文件
- 模块格式：ES Module
- TypeScript 类型：未声明
- Node.js 要求：\>=20
- 运行依赖：14 个
- 首次发布：2026-02-20T12:39:22.492Z
- 最新版本发布：2026-11-02T14:33:12.755Z
- 近 30 天下载量：2118（2026-10-09 至 2026-11-07，npm 官方下载统计）
- 已发布版本数：122（近 12 个月 122 个）

## 中文简介

调用遥测设备管理 CLI

## 安装

```sh
npm install @calltelemetry/cli
```

也可以使用：`pnpm add @calltelemetry/cli`、`yarn add @calltelemetry/cli`、`bun add @calltelemetry/cli`

## README

# @ calltilemeterm/ cli (英语)

设备管理CLI [调用遥测](https://calltelemetry.com/). 从单一工具管理更新、数据库、联网、证书、多克服务以及思科JTAPI集成.

```
   ______      ____   ______     __                    __
  / ____/___ _/ / /  /_  __/__  / /__  ____ ___  ___  / /________  __
 / /   / __ `/ / /    / / / _ \/ / _ \/ __ `__ \/ _ \/ __/ ___/ / / /
/ /___/ /_/ / / /    / / /  __/ /  __/ / / / / /  __/ /_/ /  / /_/ /
\____/\__,_/_/_/    /_/  \___/_/\___/_/ /_/ /_/\___/\__/_/   \__, /
                                                            /____/
```

## 安装

```bash
npm install -g @calltelemetry/cli
```

需要节点.js 20+.

## 使用量

运行 `ct` 没有参数可以启动交互式 TUI 菜单,或者直接使用命令 :

```bash
ct                  # Interactive menu
ct status           # Show system health
ct health report    # Managed health report with JSON export
ct update           # Update to latest stable version
ct db status        # Database overview
```

## 文档

完整回存文件生活在 [`docs/`](https://npmcn.com/package/%40calltelemetry/cli/docs/README.md)数字 :

-   [`docs/cli-reference.md`](https://npmcn.com/package/%40calltelemetry/cli/docs/cli-reference.md) 覆盖每个直接 CLI 命令组、 子命令和选项 `src/commands`。 。 。 .
-   [`docs/health-report.md`](https://npmcn.com/package/%40calltelemetry/cli/docs/health-report.md) 覆盖 `ct health report`,JSON导出,磁盘基准默认值,以及 `ct diag showtech` 相关性.
-   [`docs/tui-and-shell.md`](https://npmcn.com/package/%40calltelemetry/cli/docs/tui-and-shell.md) 覆盖了全屏TUI和IOS风格的文本外壳.
-   [`docs/testing-and-coverage.md`](https://npmcn.com/package/%40calltelemetry/cli/docs/testing-and-coverage.md) 涵盖测试和覆盖工作流程.

## 图标

### 状态

```bash
ct status                           # System health dashboard
ct health report                    # Managed health report TUI
ct health report --json ./health.json  # Export support-ready JSON
ct health report --skip-disk-benchmark --json ./health.json
```

### 更新

```bash
ct update                           # Update to latest stable
ct update 0.8.6                     # Update to specific version
ct update --latest                  # Include pre-releases
ct update --force-upgrade           # Skip RAM/disk checks
ct update --no-cleanup              # Skip Docker cleanup after update
ct update --ipv6                    # Enable IPv6 support
ct rollback                         # Roll back to previous version
```

执行飞行前检查(RAM QQ 7.2 GB,磁盘QQ 10%免费,Docker 26+),备份当前作曲文件,拉出图像,并重启服务.

### 数据库

```bash
ct db                               # Show status (default)
ct db status                        # Connection and version info
ct db backup                        # Create a backup
ct db restore <file>                # Restore from backup
ct db list                          # List available backups
ct db compact                       # Vacuum and optimize
ct db tables [name]                 # Table sizes (optional filter)
ct db purge <table> <days>          # Purge records older than N days
ct db size                          # Database size on disk
ct db performance                   # WAL timing, IO timing, and pgmetrics latency
```

### 移徙

```bash
ct migrate                          # Show migration status (default)
ct migrate status                   # Pending and applied migrations
ct migrate run                      # Run pending migrations
ct migrate rollback [steps]         # Roll back N migrations (default: 1)
ct migrate history                  # Last 10 applied migrations
ct migrate watch --interval 5       # Poll migration progress
```

### 秘诀

```bash
ct secrets                          # Show secrets status (default)
ct secrets setup                    # Interactive configuration wizard
ct secrets reset                    # Revert to defaults
ct secrets reset-password           # Reset service password (PostgreSQL/Minio)
ct secrets reset-password --service postgres --env-only
```

管理PostgreSQL,NATS,和Minio的证书. 带有三级优先级的值:默认值, `.env` 文件,然后是环境变量。 这个 `.env` 文件以 `0600` 权限和一个 Docker 编译上加自动生成.

### 用户

```bash
ct users reset-password             # Reset a user account password (interactive)
ct users reset-password --org 1     # Pre-select organization
ct users reset-password --org 1 --user 1  # Pre-select org and user
```

通过 RPC 查询运行中的应用程序以列出组织和用户,然后重回选定的用户密码. 关闭于网络用户界面时用于管理员账户恢复 .

### 配置

```bash
ct logging                          # Show current log level
ct logging info                     # Set level (debug|info|warning|error)

ct ipv6                             # Show IPv6 status
ct ipv6 enable                      # Enable IPv6
ct ipv6 disable                     # Disable IPv6

ct postgres status                  # Show PostgreSQL version, profile, and timing status
ct postgres set 17                  # Set version for next update
ct postgres upgrade 17              # Full upgrade with backup/restore

ct certs status                     # Show certificate details
ct certs generate                   # Generate self-signed certificates
ct certs reset                      # Remove and regenerate
```

PostgreSQL 升级完成一个完整的备份,交换容器版本,并恢复数据. 支持版本:14,15,16,17,18.

### 夹克

```bash
ct docker                           # Container status (default)
ct docker status                    # Containers, images, and networks
ct docker prune                     # Clean up unused resources
ct docker network                   # Network configuration
```

### 服务

```bash
ct services                         # Interactive service dashboard
ct services logs <service>          # Service logs
ct services start <service>         # Start a service
ct services stop <service>          # Stop a service
ct services restart <service>       # Restart a service
```

### 诊断

```bash
ct diag network                     # Interfaces, DNS, gateway, connectivity
ct diag service                     # Systemd and container logs
ct diag database                    # PostgreSQL diagnostics
ct diag showtech                    # Support bundle with embedded health report
ct diag showtech --skip-disk-benchmark
ct diag tesla <ipv4|ipv6> <url>     # Test HTTP connectivity to endpoint
ct diag db-watch --interval 2       # Live database activity monitor
ct diag capture <seconds> [filter]  # Packet capture via tcpdump
```

### JTAPI(Cisco电话控制)

```bash
ct jtapi                            # Show status (default)
ct jtapi status                     # Sidecar connection status
ct jtapi enable                     # Enable the JTAPI sidecar
ct jtapi disable                    # Disable the JTAPI sidecar
ct jtapi troubleshoot               # Run 9-point diagnostic check
```

### 离线/空中部署

```bash
ct offline fetch <version>          # Download config bundle (fast, no images)
ct offline download <version>       # Full bundle with Docker images
ct offline apply <bundle>           # Install bundle on target machine
ct offline list                     # List images in current compose file
```

`fetch` 只下载配置. `download` 建立全线脱机档案,包括所有Docker图像,用于空中安装.

### OS 更新

```bash
ct os-updates                       # Automatic OS update status
ct os-updates enable weekly         # Enable daily, weekly, or monthly updates
ct os-updates disable               # Disable automatic updates
ct os-updates run                   # Run OS update now
ct os-updates log                   # Recent OS update history
```

### 观察和储存

```bash
ct otel status                      # Observability profile status
ct otel enable                      # Enable Prometheus/Grafana/Loki/Tempo/exporters
ct otel disable                     # Disable observability stack

ct storage status                   # SeaweedFS profile status
ct storage enable                   # Enable S3-compatible object storage
ct storage disable                  # Disable object storage
```

### 网络

```bash
ct network                          # Show interfaces, gateway, DNS
ct network address eth0 192.168.10.50/24 192.168.10.1
ct network dns-servers 8.8.8.8 1.1.1.1
ct network domain corp.local
ct network dhcp eth0
```

### 库伯涅斯

```bash
ct k8s status                       # Node, pod, app health, and Helm overview
ct k8s pods                         # List pods
ct k8s nodes                        # List nodes
ct k8s logs <pod> --lines 100       # Pod logs
ct k8s restart <deployment>         # Rollout restart
ct k8s scale <deployment> 2         # Scale deployment replicas
ct k8s diff                         # Helmfile diff
ct k8s sync                         # Helmfile sync
ct k8s runbook                      # Deployment validation checklist
```

### 应用程序

```bash
ct appliance status                 # Appliance migration summary
ct appliance migrations             # Migration table
ct appliance migrate                # Run pending appliance migrations
ct appliance history                # Completed migration history
ct appliance hardware-check disk    # fio disk hardware benchmark
```

### 真纸

```bash
ct truespam validate --username user --password pass
ct truespam rescore --org-id 1 --from 2026-07-07T00:00:00Z --to 2026-07-10T17:00:00Z
ct truespam rescore --org-id 1 --from 2026-07-07T00:00:00Z --to 2026-07-10T17:00:00Z --execute --max-queries 5000
```

`rescore` 包装 `Cdrcisco.Maintenance.TruespamRescore.run/4` 通过网络RPC. 默认为干燥; 需要运行 `--execute` 财务报告和审定财务报表 `--max-queries`. 需要包括模块(0.8.6.9+/0.8.7并带有后端口)在内的设备建设.

### 装入测试

```bash
ct loadtest                         # CURRI policy load tester
ct loadtest xcc                     # Stateful Cisco CUBE XCC load tester
ct loadtest xcc --plain --target-url http://cube.example/xcc
```

### 种子数据

```bash
ct seed list                        # Supported seed presets
ct seed run <preset> --org-id 1     # Seed demo/load-test data
ct seed status --org-id 1           # Seed counts and recent runs
ct seed cleanup --org-id 1 --all    # Remove seeded data
```

## 互动 TUI

当在TTY上没有争论的情况下, `ct` 使用 [墨迹](https://github.com/vadimdemedes/ink)。以箭头键导航,用 Enter 选择,用退出 `q`。 。 。 .

类别:状态、更新、服务、数据库、迁移、安全、OS更新、诊断、设置、离线模式、工具、工具、应用程序、壳牌、电源和K3s模式启用时的Kubernetes.

使用 `ct shell --cli` 用于IOS风格的文本外壳.

## 发展

```bash
git clone https://github.com/calltelemetry/ct-cli.git
cd ct-cli
yarn install
yarn dev                # Run from source via tsx
yarn build              # Compile TypeScript
yarn test               # Run tests
yarn test:watch         # Watch mode
```

## 许可证

UNLICENSED - 呼叫遥测的专有软件.

发布元数据以及使用的电器捆 `https://get.calltelemetry.com`。 。 。 . 没有替代存储主机或倒置: 失败的获取被报告 已配置释放服务 . `CT_RELEASE_BASE_URL` 和现有的释放服务 优先选择服务.

## 常见问题

### @calltelemetry/cli 是什么？

调用遥测设备管理 CLI

### 如何安装 @calltelemetry/cli？

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

### @calltelemetry/cli 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/calltelemetry\_\_cli 是否存在。

### @calltelemetry/cli 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @calltelemetry/cli 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=20。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @calltelemetry/cli 可以商用吗？

@calltelemetry/cli 使用 UNLICENSED 许可。作者声明为 UNLICENSED，即不授予公开使用许可（与公共领域的 Unlicense 不同）。使用前需获得作者授权。以上为概括，不构成法律意见，请以许可原文为准。

### @calltelemetry/cli 的下载量有多少？

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

### @calltelemetry/cli 还在维护吗？

最新版本 0\.15\.1 发布于 2026/11/02（6 天前）；至今共发布 122 个版本，其中过去 12 个月发布了 122 个；首次发布于 2026/02/20。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

