temps-cli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTemps CLI - Complete Reference
Temps CLI - 完整参考手册
Temps CLI is the command-line interface for the Temps deployment platform. It provides full control over projects, deployments, services, domains, monitoring, and platform configuration.
Temps CLI是Temps部署平台的命令行界面,可全面管控项目、部署、服务、域名、监控及平台配置。
Installation
安装
bash
undefinedbash
undefinedRun directly without installing
无需安装直接运行
npx @temps-sdk/cli --version
bunx @temps-sdk/cli --version
npx @temps-sdk/cli --version
bunx @temps-sdk/cli --version
Or install globally
或全局安装
npm install -g @temps-sdk/cli
bun add -g @temps-sdk/cli
undefinednpm install -g @temps-sdk/cli
bun add -g @temps-sdk/cli
undefinedConfiguration
配置
bash
undefinedbash
undefinedInteractive configuration wizard
交互式配置向导
bunx @temps-sdk/cli configure
bunx @temps-sdk/cli configure
Set API URL
设置API地址
bunx @temps-sdk/cli configure set apiUrl https://your-server.example.com:3000
bunx @temps-sdk/cli configure set apiUrl https://your-server.example.com:3000
Set default output format (table, json, minimal)
设置默认输出格式(table、json、minimal)
bunx @temps-sdk/cli configure set outputFormat table
bunx @temps-sdk/cli configure set outputFormat table
View current configuration
查看当前配置
bunx @temps-sdk/cli configure show
bunx @temps-sdk/cli configure show
List all config values
列出所有配置项
bunx @temps-sdk/cli configure list
bunx @temps-sdk/cli configure list
Reset to defaults
重置为默认配置
bunx @temps-sdk/cli configure reset
**Config file**: `~/.temps/config.json`
**Credentials file**: `~/.temps/.secrets` (mode 0600)
**Environment variables** (override config):
| Variable | Description |
|---|---|
| `TEMPS_API_URL` | Override API endpoint |
| `TEMPS_TOKEN` | API token (highest priority) |
| `TEMPS_API_TOKEN` | API token (CI/CD) |
| `TEMPS_API_KEY` | API key |
| `NO_COLOR` | Disable colored output |bunx @temps-sdk/cli configure reset
**配置文件**:`~/.temps/config.json`
**凭据文件**:`~/.temps/.secrets`(权限模式0600)
**环境变量**(覆盖配置文件):
| 变量名 | 描述 |
|---|---|
| `TEMPS_API_URL` | 覆盖API端点地址 |
| `TEMPS_TOKEN` | API令牌(优先级最高) |
| `TEMPS_API_TOKEN` | API令牌(CI/CD场景) |
| `TEMPS_API_KEY` | API密钥 |
| `NO_COLOR` | 禁用彩色输出 |Global Options
全局选项
-v, --version Display version number
--no-color Disable colored output
--debug Enable debug output
-h, --help Display help for command-v, --version 显示版本号
--no-color 禁用彩色输出
--debug 启用调试输出
-h, --help 显示命令帮助信息Authentication
身份验证
Login
登录
bash
undefinedbash
undefinedInteractive login (prompts for API key)
交互式登录(提示输入API密钥)
bunx @temps-sdk/cli login
bunx @temps-sdk/cli login
Non-interactive login
非交互式登录
bunx @temps-sdk/cli login --api-key tk_abc123def456
bunx @temps-sdk/cli login --api-key tk_abc123def456
Login to specific server
登录到指定服务器
bunx @temps-sdk/cli login --api-key tk_abc123def456 -u https://temps.example.com
**Example output:**Authenticating...
Logged in as david@example.com (Admin)
Credentials saved to ~/.temps/.secrets
undefinedbunx @temps-sdk/cli login --api-key tk_abc123def456 -u https://temps.example.com
**示例输出:**正在验证身份...
已以 david@example.com(管理员)身份登录
凭据已保存到 ~/.temps/.secrets
undefinedLogout
登出
bash
bunx @temps-sdk/cli logoutExample output:
Credentials clearedbash
bunx @temps-sdk/cli logout示例输出:
凭据已清除Who Am I
当前用户信息
bash
bunx @temps-sdk/cli whoami
bunx @temps-sdk/cli whoami --jsonExample output:
Current User
ID 1
Email david@example.com
Name David
Role AdminJSON output:
json
{
"id": 1,
"email": "david@example.com",
"name": "David",
"role": "admin"
}bash
bunx @temps-sdk/cli whoami
bunx @temps-sdk/cli whoami --json示例输出:
当前用户
ID 1
邮箱 david@example.com
姓名 David
角色 管理员JSON输出:
json
{
"id": 1,
"email": "david@example.com",
"name": "David",
"role": "admin"
}Projects
项目管理
Aliases: ,
projectp别名:、
projectpList Projects
列出项目
bash
bunx @temps-sdk/cli projects list
bunx @temps-sdk/cli projects ls --json
bunx @temps-sdk/cli projects list --page 2 --per-page 10Example output:
Projects (3)
┌──────┬──────────────┬────────┬──────────────┬─────────────────────┐
│ Name │ Slug │ Preset │ Environments │ Created │
├──────┼──────────────┼────────┼──────────────┼─────────────────────┤
│ Blog │ blog │ nextjs │ 2 │ 2025-01-15 10:30:00 │
│ API │ api-backend │ nodejs │ 1 │ 2025-01-14 08:00:00 │
│ Docs │ docs-site │ static │ 1 │ 2025-01-12 14:00:00 │
└──────┴──────────────┴────────┴──────────────┴─────────────────────┘bash
bunx @temps-sdk/cli projects list
bunx @temps-sdk/cli projects ls --json
bunx @temps-sdk/cli projects list --page 2 --per-page 10示例输出:
项目列表(3个)
┌──────┬──────────────┬────────┬──────────────┬─────────────────────┐
│ 名称 │ 标识(Slug) │ 预设模板 │ 环境数量 │ 创建时间 │
├──────┼──────────────┼────────┼──────────────┼─────────────────────┤
│ 博客 │ blog │ nextjs │ 2 │ 2025-01-15 10:30:00 │
│ API │ api-backend │ nodejs │ 1 │ 2025-01-14 08:00:00 │
│ 文档 │ docs-site │ static │ 1 │ 2025-01-12 14:00:00 │
└──────┴──────────────┴────────┴──────────────┴─────────────────────┘Create Project
创建项目
bash
undefinedbash
undefinedInteractive creation
交互式创建
bunx @temps-sdk/cli projects create
bunx @temps-sdk/cli projects create
Non-interactive
非交互式创建
bunx @temps-sdk/cli projects create -n "My App" -d "Description of my app" --repo https://github.com/org/repo
undefinedbunx @temps-sdk/cli projects create -n "我的应用" -d "我的应用描述" --repo https://github.com/org/repo
undefinedShow Project
查看项目详情
bash
bunx @temps-sdk/cli projects show -p my-app
bunx @temps-sdk/cli projects show -p my-app --jsonExample output:
My App
ID 5
Slug my-app
Description My application
Preset nextjs
Main Branch main
Repository org/my-app
Created 1/15/2025, 10:30:00 AM
Updated 1/20/2025, 3:45:00 PMbash
bunx @temps-sdk/cli projects show -p my-app
bunx @temps-sdk/cli projects show -p my-app --json示例输出:
我的应用
ID 5
标识(Slug) my-app
描述 我的应用程序
预设模板 nextjs
主分支 main
代码仓库 org/my-app
创建时间 1/15/2025, 10:30:00 AM
更新时间 1/20/2025, 3:45:00 PMUpdate Project
更新项目信息
bash
undefinedbash
undefinedUpdate name and description
更新名称和描述
bunx @temps-sdk/cli projects update -p my-app -n "New Name" -d "New description"
bunx @temps-sdk/cli projects update -p my-app -n "新名称" -d "新描述"
Non-interactive mode
非交互式模式
bunx @temps-sdk/cli projects update -p my-app -n "New Name" -y
undefinedbunx @temps-sdk/cli projects update -p my-app -n "新名称" -y
undefinedUpdate Project Settings
更新项目设置
bash
undefinedbash
undefinedUpdate slug and enable attack mode
更新标识并启用攻击模式
bunx @temps-sdk/cli projects settings -p my-app --slug new-slug --attack-mode
bunx @temps-sdk/cli projects settings -p my-app --slug new-slug --attack-mode
Enable preview environments
启用预览环境
bunx @temps-sdk/cli projects settings -p my-app --preview-envs
bunx @temps-sdk/cli projects settings -p my-app --preview-envs
Disable attack mode
禁用攻击模式
bunx @temps-sdk/cli projects settings -p my-app --no-attack-mode
undefinedbunx @temps-sdk/cli projects settings -p my-app --no-attack-mode
undefinedUpdate Git Settings
更新Git设置
bash
bunx @temps-sdk/cli projects git -p my-app --owner myorg --repo myrepo --branch main --preset nextjs
bunx @temps-sdk/cli projects git -p my-app --directory apps/web --preset nextjs -ybash
bunx @temps-sdk/cli projects git -p my-app --owner myorg --repo myrepo --branch main --preset nextjs
bunx @temps-sdk/cli projects git -p my-app --directory apps/web --preset nextjs -yUpdate Deployment Config
更新部署配置
bash
undefinedbash
undefinedScale replicas and set resource limits
调整副本数并设置资源限制
bunx @temps-sdk/cli projects config -p my-app --replicas 3 --cpu-limit 1 --memory-limit 512
bunx @temps-sdk/cli projects config -p my-app --replicas 3 --cpu-limit 1 --memory-limit 512
Enable auto-deploy
启用自动部署
bunx @temps-sdk/cli projects config -p my-app --auto-deploy
undefinedbunx @temps-sdk/cli projects config -p my-app --auto-deploy
undefinedDelete Project
删除项目
bash
bunx @temps-sdk/cli projects delete -p my-app
bunx @temps-sdk/cli projects rm -p my-app -f # Skip confirmationbash
bunx @temps-sdk/cli projects delete -p my-app
bunx @temps-sdk/cli projects rm -p my-app -f # 跳过确认Deployments
部署管理
Deploy from Git
从Git部署
bash
undefinedbash
undefinedInteractive deployment
交互式部署
bunx @temps-sdk/cli deploy my-app
bunx @temps-sdk/cli deploy my-app
Specify branch and environment
指定分支和环境
bunx @temps-sdk/cli deploy my-app -b feature/new-ui -e staging
bunx @temps-sdk/cli deploy my-app -b feature/new-ui -e staging
Fully automated
完全自动化部署
bunx @temps-sdk/cli deploy -p my-app -b main -e production -y
**Example output:**Deploying my-app
Branch main
Environment production
Deployment started (ID: 42)
Building...
Pushing image...
Starting containers...
Deployment successful!
undefinedbunx @temps-sdk/cli deploy -p my-app -b main -e production -y
**示例输出:**正在部署 my-app
分支 main
环境 production
部署已启动(ID: 42)
构建中...
推送镜像...
启动容器...
部署成功!
undefinedDeploy Static Files
部署静态文件
bash
undefinedbash
undefinedDeploy a directory
部署目录
bunx @temps-sdk/cli deploy:static --path ./dist -p my-app
bunx @temps-sdk/cli deploy:static --path ./dist -p my-app
Deploy an archive
部署压缩包
bunx @temps-sdk/cli deploy:static --path ./build.tar.gz -p my-app -e production -y
undefinedbunx @temps-sdk/cli deploy:static --path ./build.tar.gz -p my-app -e production -y
undefinedDeploy Docker Image
部署Docker镜像
bash
undefinedbash
undefinedDeploy a pre-built image
部署预构建镜像
bunx @temps-sdk/cli deploy:image --image ghcr.io/org/app:v1.0 -p my-app
bunx @temps-sdk/cli deploy:image --image ghcr.io/org/app:v1.0 -p my-app
With environment and automation
指定环境并自动化
bunx @temps-sdk/cli deploy:image --image registry.example.com/app:latest -p my-app -e staging -y
undefinedbunx @temps-sdk/cli deploy:image --image registry.example.com/app:latest -p my-app -e staging -y
undefinedDeploy Local Docker Image
部署本地Docker镜像
bash
undefinedbash
undefinedBuild from Dockerfile and deploy
从Dockerfile构建并部署
bunx @temps-sdk/cli deploy:local-image -p my-app -f Dockerfile -c .
bunx @temps-sdk/cli deploy:local-image -p my-app -f Dockerfile -c .
Deploy an existing local image
部署现有本地镜像
bunx @temps-sdk/cli deploy:local-image --image my-app:latest -p my-app -e production -y
bunx @temps-sdk/cli deploy:local-image --image my-app:latest -p my-app -e production -y
With build arguments
带构建参数
bunx @temps-sdk/cli deploy:local-image -p my-app --build-arg NODE_ENV=production --build-arg API_URL=https://api.example.com
undefinedbunx @temps-sdk/cli deploy:local-image -p my-app --build-arg NODE_ENV=production --build-arg API_URL=https://api.example.com
undefinedList Deployments
列出部署记录
bash
bunx @temps-sdk/cli deployments list -p my-app
bunx @temps-sdk/cli deployments ls -p my-app --limit 5 --json
bunx @temps-sdk/cli deployments list -p my-app --page 2 --per-page 10 --environment-id 1Example output:
Deployments (3)
┌────┬─────────┬────────────┬────────────┬──────────┬─────────────────────┐
│ ID │ Branch │ Env │ Status │ Duration │ Created │
├────┼─────────┼────────────┼────────────┼──────────┼─────────────────────┤
│ 42 │ main │ production │ ● running │ 2m 15s │ 2025-01-20 15:30:00 │
│ 41 │ develop │ staging │ ● running │ 1m 45s │ 2025-01-20 14:00:00 │
│ 40 │ main │ production │ ○ stopped │ 3m 02s │ 2025-01-19 10:00:00 │
└────┴─────────┴────────────┴────────────┴──────────┴─────────────────────┘bash
bunx @temps-sdk/cli deployments list -p my-app
bunx @temps-sdk/cli deployments ls -p my-app --limit 5 --json
bunx @temps-sdk/cli deployments list -p my-app --page 2 --per-page 10 --environment-id 1示例输出:
部署记录(3个)
┌────┬─────────┬────────────┬────────────┬──────────┬─────────────────────┐
│ ID │ 分支 │ 环境 │ 状态 │ 耗时 │ 创建时间 │
├────┼─────────┼────────────┼────────────┼──────────┼─────────────────────┤
│ 42 │ main │ production │ ● 运行中 │ 2m 15s │ 2025-01-20 15:30:00 │
│ 41 │ develop │ staging │ ● 运行中 │ 1m 45s │ 2025-01-20 14:00:00 │
│ 40 │ main │ production │ ○ 已停止 │ 3m 02s │ 2025-01-19 10:00:00 │
└────┴─────────┴────────────┴────────────┴──────────┴─────────────────────┘Deployment Status
部署状态
bash
bunx @temps-sdk/cli deployments status -p my-app -d 42
bunx @temps-sdk/cli deployments status -p my-app -d 42 --jsonbash
bunx @temps-sdk/cli deployments status -p my-app -d 42
bunx @temps-sdk/cli deployments status -p my-app -d 42 --jsonDeployment Lifecycle
部署生命周期管理
bash
undefinedbash
undefinedRollback to previous deployment
回滚到上一次部署版本
bunx @temps-sdk/cli deployments rollback -p my-app -e production
bunx @temps-sdk/cli deployments rollback -p my-app -e production
Rollback to specific deployment
回滚到指定部署版本
bunx @temps-sdk/cli deployments rollback -p my-app --to 40
bunx @temps-sdk/cli deployments rollback -p my-app --to 40
Cancel a running deployment
取消正在运行的部署
bunx @temps-sdk/cli deployments cancel -p 5 -d 42
bunx @temps-sdk/cli deployments cancel -p 5 -d 42
Pause/resume
暂停/恢复部署
bunx @temps-sdk/cli deployments pause -p 5 -d 42
bunx @temps-sdk/cli deployments resume -p 5 -d 42
bunx @temps-sdk/cli deployments pause -p 5 -d 42
bunx @temps-sdk/cli deployments resume -p 5 -d 42
Teardown (remove all resources)
销毁部署(移除所有资源)
bunx @temps-sdk/cli deployments teardown -p 5 -d 42
undefinedbunx @temps-sdk/cli deployments teardown -p 5 -d 42
undefinedDeployment Logs
部署日志
bash
undefinedbash
undefinedView logs
查看日志
bunx @temps-sdk/cli logs -p my-app
bunx @temps-sdk/cli logs -p my-app
Stream logs in real-time
实时流式查看日志
bunx @temps-sdk/cli logs -p my-app -f
bunx @temps-sdk/cli logs -p my-app -f
Show last 50 lines from staging
查看staging环境最后50行日志
bunx @temps-sdk/cli logs -p my-app -e staging -n 50
bunx @temps-sdk/cli logs -p my-app -e staging -n 50
Logs for specific deployment
查看指定部署的日志
bunx @temps-sdk/cli logs -p my-app -d 42 -f
---bunx @temps-sdk/cli logs -p my-app -d 42 -f
---Environments
环境管理
List Environments
列出环境
bash
bunx @temps-sdk/cli environments list -p my-app
bunx @temps-sdk/cli environments ls -p my-app --jsonbash
bunx @temps-sdk/cli environments list -p my-app
bunx @temps-sdk/cli environments ls -p my-app --jsonCreate Environment
创建环境
bash
bunx @temps-sdk/cli environments create -p my-app -n stagingbash
bunx @temps-sdk/cli environments create -p my-app -n stagingDelete Environment
删除环境
bash
bunx @temps-sdk/cli environments delete -p my-app -n staging
bunx @temps-sdk/cli environments rm -p my-app -n staging -fbash
bunx @temps-sdk/cli environments delete -p my-app -n staging
bunx @temps-sdk/cli environments rm -p my-app -n staging -fEnvironment Variables
环境变量
bash
undefinedbash
undefinedList all variables
列出所有变量
bunx @temps-sdk/cli environments vars list -p my-app -e production
bunx @temps-sdk/cli environments vars list -p my-app -e production --json
bunx @temps-sdk/cli environments vars list -p my-app -e production
bunx @temps-sdk/cli environments vars list -p my-app -e production --json
Get a specific variable
获取指定变量
bunx @temps-sdk/cli environments vars get -p my-app -e production -k DATABASE_URL
bunx @temps-sdk/cli environments vars get -p my-app -e production -k DATABASE_URL
Set a variable
设置变量
bunx @temps-sdk/cli environments vars set -p my-app -e production -k API_KEY -v "sk_live_abc123"
bunx @temps-sdk/cli environments vars set -p my-app -e production -k API_KEY -v "sk_live_abc123"
Set a secret variable (masked in UI)
设置保密变量(在UI中会被掩码显示)
bunx @temps-sdk/cli environments vars set -p my-app -e production -k SECRET_KEY -v "supersecret" --secret
bunx @temps-sdk/cli environments vars set -p my-app -e production -k SECRET_KEY -v "supersecret" --secret
Delete a variable
删除变量
bunx @temps-sdk/cli environments vars delete -p my-app -e production -k OLD_KEY -y
bunx @temps-sdk/cli environments vars delete -p my-app -e production -k OLD_KEY -y
Import from .env file
从.env文件导入变量
bunx @temps-sdk/cli environments vars import -p my-app -e production -f .env.production
bunx @temps-sdk/cli environments vars import -p my-app -e production -f .env.production
Export to file
导出变量到文件
bunx @temps-sdk/cli environments vars export -p my-app -e production -f .env.backup
undefinedbunx @temps-sdk/cli environments vars export -p my-app -e production -f .env.backup
undefinedEnvironment Resources
环境资源
bash
bunx @temps-sdk/cli environments resources -p my-app -e production --jsonbash
bunx @temps-sdk/cli environments resources -p my-app -e production --jsonScale Environment
扩容环境
bash
bunx @temps-sdk/cli environments scale -p my-app -e production --replicas 3bash
bunx @temps-sdk/cli environments scale -p my-app -e production --replicas 3Cron Jobs
定时任务(Cron Jobs)
bash
undefinedbash
undefinedList cron jobs
列出定时任务
bunx @temps-sdk/cli environments crons list --project-id 5
bunx @temps-sdk/cli environments crons list --project-id 5
Show cron job details
查看定时任务详情
bunx @temps-sdk/cli environments crons show --id 1 --json
bunx @temps-sdk/cli environments crons show --id 1 --json
List cron executions
列出定时任务执行记录
bunx @temps-sdk/cli environments crons executions --cron-id 1 --limit 10
---bunx @temps-sdk/cli environments crons executions --cron-id 1 --limit 10
---Services (Databases, Caches, Storage)
服务管理(数据库、缓存、存储)
Alias:
svc别名:
svcList Services
列出服务
bash
bunx @temps-sdk/cli services list
bunx @temps-sdk/cli services ls --jsonExample output:
External Services (2)
┌────┬───────────┬────────────┬─────────────┬──────────┐
│ ID │ Name │ Type │ Version │ Status │
├────┼───────────┼────────────┼─────────────┼──────────┤
│ 1 │ main-db │ PostgreSQL │ 16-alpine │ ● active │
│ 2 │ cache │ Redis │ 7-alpine │ ● active │
└────┴───────────┴────────────┴─────────────┴──────────┘bash
bunx @temps-sdk/cli services list
bunx @temps-sdk/cli services ls --json示例输出:
外部服务(2个)
┌────┬───────────┬────────────┬─────────────┬──────────┐
│ ID │ 名称 │ 类型 │ 版本 │ 状态 │
├────┼───────────┼────────────┼─────────────┼──────────┤
│ 1 │ main-db │ PostgreSQL │ 16-alpine │ ● 活跃 │
│ 2 │ cache │ Redis │ 7-alpine │ ● 活跃 │
└────┴───────────┴────────────┴─────────────┴──────────┘Create Service
创建服务
bash
undefinedbash
undefinedInteractive creation
交互式创建
bunx @temps-sdk/cli services create
bunx @temps-sdk/cli services create
Non-interactive
非交互式创建
bunx @temps-sdk/cli services create -t postgres -n main-db -y
bunx @temps-sdk/cli services create -t redis -n cache -y
bunx @temps-sdk/cli services create -t mongodb -n data-store -y
bunx @temps-sdk/cli services create -t s3 -n files -y
bunx @temps-sdk/cli services create -t postgres -n main-db -y
bunx @temps-sdk/cli services create -t redis -n cache -y
bunx @temps-sdk/cli services create -t mongodb -n data-store -y
bunx @temps-sdk/cli services create -t s3 -n files -y
With custom parameters
带自定义参数
bunx @temps-sdk/cli services create -t postgres -n analytics-db --parameters '{"version":"17-alpine"}' -y
**Service types**: `postgres`, `mongodb`, `redis`, `s3`bunx @temps-sdk/cli services create -t postgres -n analytics-db --parameters '{"version":"17-alpine"}' -y
**服务类型**:`postgres`、`mongodb`、`redis`、`s3`Show Service
查看服务详情
bash
bunx @temps-sdk/cli services show --id 1
bunx @temps-sdk/cli services show --id 1 --jsonExample output:
main-db
ID 1
Type PostgreSQL
Version 16-alpine
Status ● active
Connection postgresql://user:pass@localhost:5432/main
Created 1/15/2025, 10:30:00 AM
Updated 1/20/2025, 3:45:00 PM
Parameters
max_connections 200
shared_buffers 256MBbash
bunx @temps-sdk/cli services show --id 1
bunx @temps-sdk/cli services show --id 1 --json示例输出:
main-db
ID 1
类型 PostgreSQL
版本 16-alpine
状态 ● 活跃
连接地址 postgresql://user:pass@localhost:5432/main
创建时间 1/15/2025, 10:30:00 AM
更新时间 1/20/2025, 3:45:00 PM
参数配置
max_connections 200
shared_buffers 256MBService Lifecycle
服务生命周期管理
bash
undefinedbash
undefinedStart/stop
启动/停止服务
bunx @temps-sdk/cli services start --id 1
bunx @temps-sdk/cli services stop --id 1
bunx @temps-sdk/cli services start --id 1
bunx @temps-sdk/cli services stop --id 1
Update
更新服务
bunx @temps-sdk/cli services update --id 1 -n postgres:18-alpine
bunx @temps-sdk/cli services update --id 1 -n postgres:18-alpine
Upgrade version
升级版本
bunx @temps-sdk/cli services upgrade --id 1 -v postgres:18-alpine
bunx @temps-sdk/cli services upgrade --id 1 -v postgres:18-alpine
Remove
删除服务
bunx @temps-sdk/cli services remove --id 1
bunx @temps-sdk/cli services rm --id 1 -f
undefinedbunx @temps-sdk/cli services remove --id 1
bunx @temps-sdk/cli services rm --id 1 -f
undefinedImport Existing Service
导入现有服务
bash
undefinedbash
undefinedImport a running Docker container as a managed service
将运行中的Docker容器导入为托管服务
bunx @temps-sdk/cli services import -t postgres -n imported-db --container-id my-postgres-container -y
undefinedbunx @temps-sdk/cli services import -t postgres -n imported-db --container-id my-postgres-container -y
undefinedLink/Unlink to Projects
关联/取消关联项目
bash
undefinedbash
undefinedLink service to project (injects env vars)
将服务关联到项目(自动注入环境变量)
bunx @temps-sdk/cli services link --id 1 --project-id 5
bunx @temps-sdk/cli services link --id 1 --project-id 5
Unlink
取消关联
bunx @temps-sdk/cli services unlink --id 1 --project-id 5
bunx @temps-sdk/cli services unlink --id 1 --project-id 5
View linked projects
查看已关联的项目
bunx @temps-sdk/cli services projects --id 1
bunx @temps-sdk/cli services projects --id 1
View injected env vars
查看注入的环境变量
bunx @temps-sdk/cli services env --id 1 --project-id 5
bunx @temps-sdk/cli services env --id 1 --project-id 5
Get specific env var
获取指定环境变量
bunx @temps-sdk/cli services env-var --id 1 --project-id 5 --var DATABASE_URL
undefinedbunx @temps-sdk/cli services env-var --id 1 --project-id 5 --var DATABASE_URL
undefinedList Service Types
列出支持的服务类型
bash
bunx @temps-sdk/cli services types
bunx @temps-sdk/cli services types --jsonbash
bunx @temps-sdk/cli services types
bunx @temps-sdk/cli services types --jsonGit Providers
Git提供商管理
List Providers
列出提供商
bash
bunx @temps-sdk/cli providers list
bunx @temps-sdk/cli providers ls --jsonbash
bunx @temps-sdk/cli providers list
bunx @temps-sdk/cli providers ls --jsonAdd Provider
添加提供商
bash
undefinedbash
undefinedInteractive
交互式添加
bunx @temps-sdk/cli providers add
bunx @temps-sdk/cli providers add
Non-interactive
非交互式添加
bunx @temps-sdk/cli providers add --type github --name "My GitHub" --token ghp_abc123 -y
bunx @temps-sdk/cli providers add --type gitlab --name "My GitLab" --token glpat-abc123 -y
undefinedbunx @temps-sdk/cli providers add --type github --name "我的GitHub" --token ghp_abc123 -y
bunx @temps-sdk/cli providers add --type gitlab --name "我的GitLab" --token glpat-abc123 -y
undefinedManage Providers
管理提供商
bash
bunx @temps-sdk/cli providers show --id 1 --json
bunx @temps-sdk/cli providers activate --id 1
bunx @temps-sdk/cli providers deactivate --id 1
bunx @temps-sdk/cli providers remove --id 1 -fbash
bunx @temps-sdk/cli providers show --id 1 --json
bunx @temps-sdk/cli providers activate --id 1
bunx @temps-sdk/cli providers deactivate --id 1
bunx @temps-sdk/cli providers remove --id 1 -fSafe delete (checks for dependencies)
安全删除(检查依赖)
bunx @temps-sdk/cli providers safe-delete --id 1 -y
bunx @temps-sdk/cli providers deletion-check --id 1 --json
undefinedbunx @temps-sdk/cli providers safe-delete --id 1 -y
bunx @temps-sdk/cli providers deletion-check --id 1 --json
undefinedGit Connections
Git连接管理
bash
undefinedbash
undefinedConnect git to project
将Git与项目关联
bunx @temps-sdk/cli providers git connect --project my-app --provider-id 1 --repo org/repo --branch main
bunx @temps-sdk/cli providers git connect --project my-app --provider-id 1 --repo org/repo --branch main
List repos from provider
列出提供商的代码仓库
bunx @temps-sdk/cli providers git repos --id 1
bunx @temps-sdk/cli providers git repos --search "my-app" --language typescript --page 1 --per-page 50
bunx @temps-sdk/cli providers git repos --sort stars --direction desc --owner myorg
bunx @temps-sdk/cli providers git repos --id 1
bunx @temps-sdk/cli providers git repos --search "my-app" --language typescript --page 1 --per-page 50
bunx @temps-sdk/cli providers git repos --sort stars --direction desc --owner myorg
Manage connections
管理连接
bunx @temps-sdk/cli providers connections list --json
bunx @temps-sdk/cli providers connections list --page 1 --per-page 50 --sort account_name --direction asc
bunx @temps-sdk/cli providers connections show --id 1
bunx @temps-sdk/cli providers connections sync --id 1
bunx @temps-sdk/cli providers connections validate --id 1
bunx @temps-sdk/cli providers connections update-token --id 1 --token ghp_newtoken
bunx @temps-sdk/cli providers connections activate --id 1
bunx @temps-sdk/cli providers connections deactivate --id 1
bunx @temps-sdk/cli providers connections delete --id 1 -y
---bunx @temps-sdk/cli providers connections list --json
bunx @temps-sdk/cli providers connections list --page 1 --per-page 50 --sort account_name --direction asc
bunx @temps-sdk/cli providers connections show --id 1
bunx @temps-sdk/cli providers connections sync --id 1
bunx @temps-sdk/cli providers connections validate --id 1
bunx @temps-sdk/cli providers connections update-token --id 1 --token ghp_newtoken
bunx @temps-sdk/cli providers connections activate --id 1
bunx @temps-sdk/cli providers connections deactivate --id 1
bunx @temps-sdk/cli providers connections delete --id 1 -y
---Domains
域名管理
List Domains
列出域名
bash
bunx @temps-sdk/cli domains list -p my-app
bunx @temps-sdk/cli domains ls -p my-app --jsonbash
bunx @temps-sdk/cli domains list -p my-app
bunx @temps-sdk/cli domains ls -p my-app --jsonAdd Domain
添加域名
bash
bunx @temps-sdk/cli domains add -p my-app -d example.com -ybash
bunx @temps-sdk/cli domains add -p my-app -d example.com -yVerify & Status
验证与状态查询
bash
bunx @temps-sdk/cli domains verify -p my-app -d example.com
bunx @temps-sdk/cli domains status -p my-app -d example.com --json
bunx @temps-sdk/cli domains ssl -p my-app -d example.com --jsonbash
bunx @temps-sdk/cli domains verify -p my-app -d example.com
bunx @temps-sdk/cli domains status -p my-app -d example.com --json
bunx @temps-sdk/cli domains ssl -p my-app -d example.com --jsonRemove Domain
删除域名
bash
bunx @temps-sdk/cli domains remove -p my-app -d example.com -fbash
bunx @temps-sdk/cli domains remove -p my-app -d example.com -fCertificate Orders
证书订单管理
bash
undefinedbash
undefinedList certificate orders
列出证书订单
bunx @temps-sdk/cli domains orders list --json
bunx @temps-sdk/cli domains orders list --json
Create order
创建证书订单
bunx @temps-sdk/cli domains orders create --domain-id 1 --challenge-type http-01
bunx @temps-sdk/cli domains orders create --domain-id 1 --challenge-type http-01
Show order details
查看订单详情
bunx @temps-sdk/cli domains orders show --order-id 1 --json
bunx @temps-sdk/cli domains orders show --order-id 1 --json
Finalize (verify challenge and issue certificate)
完成订单(验证挑战并颁发证书)
bunx @temps-sdk/cli domains orders finalize --domain-id 1
bunx @temps-sdk/cli domains orders finalize --domain-id 1
Cancel order
取消订单
bunx @temps-sdk/cli domains orders cancel --order-id 1 -y
undefinedbunx @temps-sdk/cli domains orders cancel --order-id 1 -y
undefinedDNS Challenges
DNS挑战管理
bash
undefinedbash
undefinedGet DNS challenge record to add
获取需要添加的DNS挑战记录
bunx @temps-sdk/cli domains dns-challenge --domain-id 1 --json
bunx @temps-sdk/cli domains dns-challenge --domain-id 1 --json
Debug HTTP challenge accessibility
调试HTTP挑战的可访问性
bunx @temps-sdk/cli domains http-debug --domain example.com --token abc123 --expected xyz789
---bunx @temps-sdk/cli domains http-debug --domain example.com --token abc123 --expected xyz789
---Custom Domains
自定义域名管理
Alias:
cdombash
undefined别名:
cdombash
undefinedList custom domains
列出自定义域名
bunx @temps-sdk/cli custom-domains list --project-id 5 --json
bunx @temps-sdk/cli custom-domains list --project-id 5 --json
Create with environment targeting
创建带环境目标的自定义域名
bunx @temps-sdk/cli custom-domains create --project-id 5 -d app.example.com --environment-id 1 -y
bunx @temps-sdk/cli custom-domains create --project-id 5 -d app.example.com --environment-id 1 -y
Create redirect domain
创建重定向域名
bunx @temps-sdk/cli custom-domains create --project-id 5 -d old.example.com --redirect-to https://new.example.com --status-code 301 -y
bunx @temps-sdk/cli custom-domains create --project-id 5 -d old.example.com --redirect-to https://new.example.com --status-code 301 -y
Show details
查看详情
bunx @temps-sdk/cli custom-domains show --project-id 5 --domain-id 1 --json
bunx @temps-sdk/cli custom-domains show --project-id 5 --domain-id 1 --json
Update
更新自定义域名
bunx @temps-sdk/cli custom-domains update --project-id 5 --domain-id 1 --branch feature/v2
bunx @temps-sdk/cli custom-domains update --project-id 5 --domain-id 1 --branch feature/v2
Link certificate
关联证书
bunx @temps-sdk/cli custom-domains link-cert --project-id 5 --domain-id 1 --certificate-id 3
bunx @temps-sdk/cli custom-domains link-cert --project-id 5 --domain-id 1 --certificate-id 3
Remove
删除自定义域名
bunx @temps-sdk/cli custom-domains remove --project-id 5 --domain-id 1 -f
---bunx @temps-sdk/cli custom-domains remove --project-id 5 --domain-id 1 -f
---DNS Management
DNS管理
bash
undefinedbash
undefinedList DNS records
列出DNS记录
bunx @temps-sdk/cli dns list --json
bunx @temps-sdk/cli dns list --json
Add record
添加DNS记录
bunx @temps-sdk/cli dns add --type A --name app --content 1.2.3.4 --ttl 3600 -y
bunx @temps-sdk/cli dns add --type A --name app --content 1.2.3.4 --ttl 3600 -y
Show record
查看DNS记录详情
bunx @temps-sdk/cli dns show --id 1 --json
bunx @temps-sdk/cli dns show --id 1 --json
Test DNS resolution
测试DNS解析
bunx @temps-sdk/cli dns test --name app.example.com --type A --json
bunx @temps-sdk/cli dns test --name app.example.com --type A --json
List zones
列出DNS区域
bunx @temps-sdk/cli dns zones --json
bunx @temps-sdk/cli dns zones --json
Remove record
删除DNS记录
bunx @temps-sdk/cli dns remove --id 1 -f
---bunx @temps-sdk/cli dns remove --id 1 -f
---DNS Providers
DNS提供商管理
Alias:
dnspbash
undefined别名:
dnspbash
undefinedList DNS providers
列出DNS提供商
bunx @temps-sdk/cli dns-providers list --json
bunx @temps-sdk/cli dns-providers list --json
Create Cloudflare provider
创建Cloudflare提供商
bunx @temps-sdk/cli dns-providers create -n "Cloudflare" -t cloudflare --api-token cf_abc123 -y
bunx @temps-sdk/cli dns-providers create -n "Cloudflare" -t cloudflare --api-token cf_abc123 -y
Create Route53 provider
创建Route53提供商
bunx @temps-sdk/cli dns-providers create -n "AWS" -t route53 --access-key-id AKIA... --secret-access-key secret --region us-east-1 -y
bunx @temps-sdk/cli dns-providers create -n "AWS" -t route53 --access-key-id AKIA... --secret-access-key secret --region us-east-1 -y
Test provider connection
测试提供商连接
bunx @temps-sdk/cli dns-providers test --id 1
bunx @temps-sdk/cli dns-providers test --id 1
List provider zones
列出提供商的区域
bunx @temps-sdk/cli dns-providers zones --id 1 --json
bunx @temps-sdk/cli dns-providers zones --id 1 --json
Manage domains
管理域名
bunx @temps-sdk/cli dns-providers domains list --id 1 --json
bunx @temps-sdk/cli dns-providers domains add --id 1 -d example.com --auto-manage
bunx @temps-sdk/cli dns-providers domains verify --provider-id 1 -d example.com
bunx @temps-sdk/cli dns-providers domains remove --provider-id 1 -d example.com -f
bunx @temps-sdk/cli dns-providers domains list --id 1 --json
bunx @temps-sdk/cli dns-providers domains add --id 1 -d example.com --auto-manage
bunx @temps-sdk/cli dns-providers domains verify --provider-id 1 -d example.com
bunx @temps-sdk/cli dns-providers domains remove --provider-id 1 -d example.com -f
DNS lookup
DNS查询
bunx @temps-sdk/cli dns-providers lookup -d example.com --json
**Provider types**: `cloudflare`, `namecheap`, `route53`, `digitalocean`, `gcp`, `azure`, `manual`
---bunx @temps-sdk/cli dns-providers lookup -d example.com --json
**提供商类型**:`cloudflare`、`namecheap`、`route53`、`digitalocean`、`gcp`、`azure`、`manual`
---Notifications
通知管理
Notification Providers
通知提供商管理
bash
undefinedbash
undefinedList providers
列出提供商
bunx @temps-sdk/cli notifications list --json
bunx @temps-sdk/cli notifications list --json
Add Slack provider
添加Slack提供商
bunx @temps-sdk/cli notifications add --type slack --name "Alerts" --webhook-url https://hooks.slack.com/... --channel "#alerts" -y
bunx @temps-sdk/cli notifications add --type slack --name "告警通知" --webhook-url https://hooks.slack.com/... --channel "#alerts" -y
Add Email provider
添加邮件提供商
bunx @temps-sdk/cli notifications add --type email --name "Email Alerts" --smtp-host smtp.gmail.com --smtp-port 587 --smtp-user user@gmail.com --smtp-pass apppassword --from alerts@example.com --to team@example.com -y
bunx @temps-sdk/cli notifications add --type email --name "邮件告警" --smtp-host smtp.gmail.com --smtp-port 587 --smtp-user user@gmail.com --smtp-pass apppassword --from alerts@example.com --to team@example.com -y
Add Webhook provider
添加Webhook提供商
bunx @temps-sdk/cli notifications add --type webhook --name "Custom Hook" --url https://example.com/webhook --secret mysecret -y
bunx @temps-sdk/cli notifications add --type webhook --name "自定义钩子" --url https://example.com/webhook --secret mysecret -y
Show/manage providers
查看/管理提供商
bunx @temps-sdk/cli notifications show --id 1 --json
bunx @temps-sdk/cli notifications enable --id 1
bunx @temps-sdk/cli notifications disable --id 1
bunx @temps-sdk/cli notifications update --id 1 --name "New Name"
bunx @temps-sdk/cli notifications test --id 1
bunx @temps-sdk/cli notifications remove --id 1 -f
undefinedbunx @temps-sdk/cli notifications show --id 1 --json
bunx @temps-sdk/cli notifications enable --id 1
bunx @temps-sdk/cli notifications disable --id 1
bunx @temps-sdk/cli notifications update --id 1 --name "新名称"
bunx @temps-sdk/cli notifications test --id 1
bunx @temps-sdk/cli notifications remove --id 1 -f
undefinedNotification Preferences
通知偏好设置
Alias:
notif-prefsbash
undefined别名:
notif-prefsbash
undefinedShow current preferences
查看当前偏好设置
bunx @temps-sdk/cli notification-preferences show --json
bunx @temps-sdk/cli notification-preferences show --json
Update preferences
更新偏好设置
bunx @temps-sdk/cli notification-preferences update -k email_enabled -v true
bunx @temps-sdk/cli notification-preferences update -k deployment_failures_enabled -v true
bunx @temps-sdk/cli notification-preferences update -k ssl_days_before_expiration -v 30
bunx @temps-sdk/cli notification-preferences update -k minimum_severity -v warning
bunx @temps-sdk/cli notification-preferences update -k email_enabled -v true
bunx @temps-sdk/cli notification-preferences update -k deployment_failures_enabled -v true
bunx @temps-sdk/cli notification-preferences update -k ssl_days_before_expiration -v 30
bunx @temps-sdk/cli notification-preferences update -k minimum_severity -v warning
Reset to defaults
重置为默认设置
bunx @temps-sdk/cli notification-preferences reset -y
**Available preference keys:**
- **Boolean**: `email_enabled`, `slack_enabled`, `weekly_digest_enabled`, `batch_similar_notifications`, `deployment_failures_enabled`, `build_errors_enabled`, `runtime_errors_enabled`, `ssl_expiration_enabled`, `domain_expiration_enabled`, `dns_changes_enabled`, `backup_failures_enabled`, `backup_successes_enabled`, `route_downtime_enabled`, `load_balancer_issues_enabled`, `s3_connection_issues_enabled`, `retention_policy_violations_enabled`
- **Numbers**: `error_threshold`, `error_time_window`, `ssl_days_before_expiration`
- **Strings**: `minimum_severity`, `digest_send_time`, `digest_send_day`
---bunx @temps-sdk/cli notification-preferences reset -y
**可用偏好键:**
- **布尔型**:`email_enabled`、`slack_enabled`、`weekly_digest_enabled`、`batch_similar_notifications`、`deployment_failures_enabled`、`build_errors_enabled`、`runtime_errors_enabled`、`ssl_expiration_enabled`、`domain_expiration_enabled`、`dns_changes_enabled`、`backup_failures_enabled`、`backup_successes_enabled`、`route_downtime_enabled`、`load_balancer_issues_enabled`、`s3_connection_issues_enabled`、`retention_policy_violations_enabled`
- **数值型**:`error_threshold`、`error_time_window`、`ssl_days_before_expiration`
- **字符串型**:`minimum_severity`、`digest_send_time`、`digest_send_day`
---Monitoring
监控管理
Monitors
监控器管理
bash
undefinedbash
undefinedList monitors
列出监控器
bunx @temps-sdk/cli monitors list --project-id 5 --json
bunx @temps-sdk/cli monitors list --project-id 5 --json
Create HTTP monitor
创建HTTP监控器
bunx @temps-sdk/cli monitors create --project-id 5 -n "API Health" -t http -i 60 -y
bunx @temps-sdk/cli monitors create --project-id 5 -n "API健康检查" -t http -i 60 -y
Create TCP monitor
创建TCP监控器
bunx @temps-sdk/cli monitors create --project-id 5 -n "DB Connection" -t tcp -i 300 -y
bunx @temps-sdk/cli monitors create --project-id 5 -n "数据库连接检查" -t tcp -i 300 -y
Show details
查看监控器详情
bunx @temps-sdk/cli monitors show --id 1 --json
bunx @temps-sdk/cli monitors show --id 1 --json
Current status
当前状态
bunx @temps-sdk/cli monitors status --id 1 --json
bunx @temps-sdk/cli monitors status --id 1 --json
Uptime history
上线历史
bunx @temps-sdk/cli monitors history --id 1 --days 30 --json
bunx @temps-sdk/cli monitors history --id 1 --days 30 --json
Remove
删除监控器
bunx @temps-sdk/cli monitors remove --id 1 -f
**Monitor types**: `http`, `tcp`, `ping`
**Intervals**: `60`, `300`, `600`, `900`, `1800` secondsbunx @temps-sdk/cli monitors remove --id 1 -f
**监控器类型**:`http`、`tcp`、`ping`
**检查间隔**:`60`、`300`、`600`、`900`、`1800`秒Incidents
事件管理
Alias:
incidentbash
undefined别名:
incidentbash
undefinedList incidents
列出事件
bunx @temps-sdk/cli incidents list --project-id 5 --status investigating --json
bunx @temps-sdk/cli incidents list --project-id 5 --page 1 --page-size 20 --environment-id 1
bunx @temps-sdk/cli incidents list --project-id 5 --status investigating --json
bunx @temps-sdk/cli incidents list --project-id 5 --page 1 --page-size 20 --environment-id 1
Create incident
创建事件
bunx @temps-sdk/cli incidents create --project-id 5 -t "API Degradation" -d "High response times" -s major -y
bunx @temps-sdk/cli incidents create --project-id 5 -t "API性能下降" -d "响应时间过长" -s major -y
Show incident
查看事件详情
bunx @temps-sdk/cli incidents show --id 1 --json
bunx @temps-sdk/cli incidents show --id 1 --json
Update status
更新事件状态
bunx @temps-sdk/cli incidents update-status --id 1 -s monitoring -m "Fix deployed, monitoring"
bunx @temps-sdk/cli incidents update-status --id 1 -s resolved -m "Issue resolved"
bunx @temps-sdk/cli incidents update-status --id 1 -s monitoring -m "修复已部署,正在监控"
bunx @temps-sdk/cli incidents update-status --id 1 -s resolved -m "问题已解决"
List updates
列出事件更新记录
bunx @temps-sdk/cli incidents updates --id 1 --json
bunx @temps-sdk/cli incidents updates --id 1 --json
Bucketed incidents (time series)
按时间分组的事件统计
bunx @temps-sdk/cli incidents bucketed --project-id 5 -i hourly --json
**Severities**: `critical`, `major`, `minor`
**Statuses**: `investigating`, `identified`, `monitoring`, `resolved`
---bunx @temps-sdk/cli incidents bucketed --project-id 5 -i hourly --json
**事件严重级别**:`critical`、`major`、`minor`
**事件状态**:`investigating`、`identified`、`monitoring`、`resolved`
---Containers
容器管理
Alias:
ctsbash
undefined别名:
ctsbash
undefinedList containers
列出容器
bunx @temps-sdk/cli containers list -p 5 -e 1 --json
bunx @temps-sdk/cli containers list -p 5 -e 1 --json
Show container details
查看容器详情
bunx @temps-sdk/cli containers show -p 5 -e 1 -c abc123 --json
bunx @temps-sdk/cli containers show -p 5 -e 1 -c abc123 --json
Start/stop/restart
启动/停止/重启容器
bunx @temps-sdk/cli containers start -p 5 -e 1 -c abc123
bunx @temps-sdk/cli containers stop -p 5 -e 1 -c abc123
bunx @temps-sdk/cli containers restart -p 5 -e 1 -c abc123
bunx @temps-sdk/cli containers start -p 5 -e 1 -c abc123
bunx @temps-sdk/cli containers stop -p 5 -e 1 -c abc123
bunx @temps-sdk/cli containers restart -p 5 -e 1 -c abc123
Force stop
强制停止容器
bunx @temps-sdk/cli containers stop -p 5 -e 1 -c abc123 -f
bunx @temps-sdk/cli containers stop -p 5 -e 1 -c abc123 -f
Live metrics (auto-refresh)
实时指标(自动刷新)
bunx @temps-sdk/cli containers metrics -p 5 -e 1 -c abc123 -w -i 2
bunx @temps-sdk/cli containers metrics -p 5 -e 1 -c abc123 --json
---bunx @temps-sdk/cli containers metrics -p 5 -e 1 -c abc123 -w -i 2
bunx @temps-sdk/cli containers metrics -p 5 -e 1 -c abc123 --json
---Runtime Logs
运行时日志
Alias:
rtlogsbash
undefined别名:
rtlogsbash
undefinedStream container runtime logs
流式查看容器运行时日志
bunx @temps-sdk/cli runtime-logs -p my-app
bunx @temps-sdk/cli runtime-logs -p my-app
Follow mode with specific environment
跟踪指定环境的日志
bunx @temps-sdk/cli runtime-logs -p my-app -e staging -f
bunx @temps-sdk/cli runtime-logs -p my-app -e staging -f
Show specific container
查看指定容器的最后200行日志
bunx @temps-sdk/cli runtime-logs -p my-app --container web-1 --tail 200
bunx @temps-sdk/cli runtime-logs -p my-app --container web-1 --tail 200
JSON output
JSON格式输出
bunx @temps-sdk/cli runtime-logs -p my-app --json
---bunx @temps-sdk/cli runtime-logs -p my-app --json
---Backups
备份管理
Backup Sources
备份源管理
bash
undefinedbash
undefinedList sources
列出备份源
bunx @temps-sdk/cli backups sources list --json
bunx @temps-sdk/cli backups sources list --json
Create source
创建备份源
bunx @temps-sdk/cli backups sources create -n "Main DB" --source-type postgres --connection-string "postgresql://..." -y
bunx @temps-sdk/cli backups sources create -n "主数据库" --source-type postgres --connection-string "postgresql://..." -y
Show source
查看备份源详情
bunx @temps-sdk/cli backups sources show --id 1 --json
bunx @temps-sdk/cli backups sources show --id 1 --json
Update source
更新备份源
bunx @temps-sdk/cli backups sources update --id 1 -n "Primary DB"
bunx @temps-sdk/cli backups sources update --id 1 -n "主数据库(更新后)"
List backups for source
列出备份源的备份记录
bunx @temps-sdk/cli backups sources backups --id 1 --json
bunx @temps-sdk/cli backups sources backups --id 1 --json
Trigger manual backup
触发手动备份
bunx @temps-sdk/cli backups sources run --id 1
bunx @temps-sdk/cli backups sources run --id 1
Remove source
删除备份源
bunx @temps-sdk/cli backups sources remove --id 1 -f
undefinedbunx @temps-sdk/cli backups sources remove --id 1 -f
undefinedBackup Schedules
备份计划管理
bash
undefinedbash
undefinedList schedules
列出备份计划
bunx @temps-sdk/cli backups schedules list --json
bunx @temps-sdk/cli backups schedules list --json
Create schedule
创建备份计划
bunx @temps-sdk/cli backups schedules create --source-id 1 --cron "0 2 * * *" --retention-count 7 --storage-backend local -y
bunx @temps-sdk/cli backups schedules create --source-id 1 --cron "0 2 * * *" --retention-count 7 --storage-backend local -y
Show schedule
查看备份计划详情
bunx @temps-sdk/cli backups schedules show --id 1 --json
bunx @temps-sdk/cli backups schedules show --id 1 --json
Enable/disable
启用/禁用备份计划
bunx @temps-sdk/cli backups schedules enable --id 1
bunx @temps-sdk/cli backups schedules disable --id 1
bunx @temps-sdk/cli backups schedules enable --id 1
bunx @temps-sdk/cli backups schedules disable --id 1
Delete schedule
删除备份计划
bunx @temps-sdk/cli backups schedules delete --id 1 -f
undefinedbunx @temps-sdk/cli backups schedules delete --id 1 -f
undefinedBackups
备份记录管理
bash
undefinedbash
undefinedList all backups
列出所有备份记录
bunx @temps-sdk/cli backups list --json
bunx @temps-sdk/cli backups list --json
Show backup details
查看备份详情
bunx @temps-sdk/cli backups show --id 1 --json
bunx @temps-sdk/cli backups show --id 1 --json
Run a service backup
触发服务备份
bunx @temps-sdk/cli backups run-service --service-id 1 --json
---bunx @temps-sdk/cli backups run-service --service-id 1 --json
---Security Scanning
安全扫描
Alias:
scanbash
undefined别名:
scanbash
undefinedList project scans
列出项目扫描记录
bunx @temps-sdk/cli scans list --project-id 5 --json
bunx @temps-sdk/cli scans list --project-id 5 --page 2 --page-size 10
bunx @temps-sdk/cli scans list --project-id 5 --json
bunx @temps-sdk/cli scans list --project-id 5 --page 2 --page-size 10
Trigger scan
触发安全扫描
bunx @temps-sdk/cli scans trigger --project-id 5 --environment-id 1
bunx @temps-sdk/cli scans trigger --project-id 5 --environment-id 1
Latest scan
查看最新扫描结果
bunx @temps-sdk/cli scans latest --project-id 5 --json
bunx @temps-sdk/cli scans latest --project-id 5 --json
Scans per environment
按环境查看扫描记录
bunx @temps-sdk/cli scans environments --project-id 5 --json
bunx @temps-sdk/cli scans environments --project-id 5 --json
Show scan details
查看扫描详情
bunx @temps-sdk/cli scans show --id 1 --json
bunx @temps-sdk/cli scans show --id 1 --json
List vulnerabilities
列出漏洞
bunx @temps-sdk/cli scans vulnerabilities --id 1 --json
bunx @temps-sdk/cli scans vulns --id 1 --severity CRITICAL --json
bunx @temps-sdk/cli scans vulnerabilities --id 1 --json
bunx @temps-sdk/cli scans vulns --id 1 --severity CRITICAL --json
Scan by deployment
按部署查看扫描记录
bunx @temps-sdk/cli scans by-deployment --deployment-id 42 --json
bunx @temps-sdk/cli scans by-deployment --deployment-id 42 --json
Remove scan
删除扫描记录
bunx @temps-sdk/cli scans remove --id 1 -f
**Severity filter**: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`
---bunx @temps-sdk/cli scans remove --id 1 -f
**严重级别过滤**:`CRITICAL`、`HIGH`、`MEDIUM`、`LOW`
---Error Tracking
错误追踪
Alias:
errorbash
undefined别名:
errorbash
undefinedList error groups
列出错误分组
bunx @temps-sdk/cli errors list --project-id 5 --json
bunx @temps-sdk/cli errors list --project-id 5 --status unresolved --page 1 --page-size 20
bunx @temps-sdk/cli errors list --project-id 5 --environment-id 1 --start-date 2025-01-01 --end-date 2025-01-31
bunx @temps-sdk/cli errors list --project-id 5 --sort-by total_count --sort-order desc
bunx @temps-sdk/cli errors list --project-id 5 --json
bunx @temps-sdk/cli errors list --project-id 5 --status unresolved --page 1 --page-size 20
bunx @temps-sdk/cli errors list --project-id 5 --environment-id 1 --start-date 2025-01-01 --end-date 2025-01-31
bunx @temps-sdk/cli errors list --project-id 5 --sort-by total_count --sort-order desc
Show error group
查看错误分组详情
bunx @temps-sdk/cli errors show --project-id 5 --group-id abc123 --json
bunx @temps-sdk/cli errors show --project-id 5 --group-id abc123 --json
Update error group status
更新错误分组状态
bunx @temps-sdk/cli errors update --project-id 5 --group-id abc123 --status resolved
bunx @temps-sdk/cli errors update --project-id 5 --group-id abc123 --status resolved
List events for error group
列出错误分组的事件记录
bunx @temps-sdk/cli errors events --project-id 5 --group-id abc123 --json
bunx @temps-sdk/cli errors events --project-id 5 --group-id abc123 --json
Show single event
查看单个事件详情
bunx @temps-sdk/cli errors event --project-id 5 --group-id abc123 --event-id evt456 --json
bunx @temps-sdk/cli errors event --project-id 5 --group-id abc123 --event-id evt456 --json
Statistics
错误统计
bunx @temps-sdk/cli errors stats --project-id 5 --json
bunx @temps-sdk/cli errors stats --project-id 5 --json
Timeline
错误时间线
bunx @temps-sdk/cli errors timeline --project-id 5 --days 7 --bucket 1h --json
bunx @temps-sdk/cli errors timeline --project-id 5 --days 7 --bucket 1h --json
Dashboard
错误仪表板
bunx @temps-sdk/cli errors dashboard --project-id 5 --days 7 --compare --json
**Statuses**: `unresolved`, `resolved`, `ignored`
---bunx @temps-sdk/cli errors dashboard --project-id 5 --days 7 --compare --json
**错误状态**:`unresolved`、`resolved`、`ignored`
---Webhooks
Webhook管理
Alias:
hooksbash
undefined别名:
hooksbash
undefinedList webhooks
列出Webhook
bunx @temps-sdk/cli webhooks list --project-id 5 --json
bunx @temps-sdk/cli webhooks list --project-id 5 --json
List deliveries with limit
列出Webhook交付记录(带数量限制)
bunx @temps-sdk/cli webhooks deliveries list --project-id 5 --webhook-id 1 --limit 100 --json
bunx @temps-sdk/cli webhooks deliveries list --project-id 5 --webhook-id 1 --limit 100 --json
Create webhook
创建Webhook
bunx @temps-sdk/cli webhooks create --project-id 5 -u https://example.com/webhook -e "deployment.success,deployment.failed" -s mysecret -y
bunx @temps-sdk/cli webhooks create --project-id 5 -u https://example.com/webhook -e "deployment.success,deployment.failed" -s mysecret -y
Show webhook
查看Webhook详情
bunx @temps-sdk/cli webhooks show --project-id 5 --webhook-id 1 --json
bunx @temps-sdk/cli webhooks show --project-id 5 --webhook-id 1 --json
Update webhook
更新Webhook
bunx @temps-sdk/cli webhooks update --project-id 5 --webhook-id 1 -u https://new-endpoint.com/webhook
bunx @temps-sdk/cli webhooks update --project-id 5 --webhook-id 1 -u https://new-endpoint.com/webhook
Enable/disable
启用/禁用Webhook
bunx @temps-sdk/cli webhooks enable --project-id 5 --webhook-id 1
bunx @temps-sdk/cli webhooks disable --project-id 5 --webhook-id 1
bunx @temps-sdk/cli webhooks enable --project-id 5 --webhook-id 1
bunx @temps-sdk/cli webhooks disable --project-id 5 --webhook-id 1
List available event types
列出支持的事件类型
bunx @temps-sdk/cli webhooks events --json
bunx @temps-sdk/cli webhooks events --json
View deliveries
查看交付记录
bunx @temps-sdk/cli webhooks deliveries list --project-id 5 --webhook-id 1 --json
bunx @temps-sdk/cli webhooks deliveries show --project-id 5 --webhook-id 1 --delivery-id 1 --json
bunx @temps-sdk/cli webhooks deliveries list --project-id 5 --webhook-id 1 --json
bunx @temps-sdk/cli webhooks deliveries show --project-id 5 --webhook-id 1 --delivery-id 1 --json
Retry failed delivery
重试失败的交付
bunx @temps-sdk/cli webhooks deliveries retry --project-id 5 --webhook-id 1 --delivery-id 1
bunx @temps-sdk/cli webhooks deliveries retry --project-id 5 --webhook-id 1 --delivery-id 1
Remove webhook
删除Webhook
bunx @temps-sdk/cli webhooks remove --project-id 5 --webhook-id 1 -f
---bunx @temps-sdk/cli webhooks remove --project-id 5 --webhook-id 1 -f
---API Keys
API密钥管理
Alias:
keysbash
undefined别名:
keysbash
undefinedList API keys
列出API密钥
bunx @temps-sdk/cli apikeys list --json
bunx @temps-sdk/cli apikeys list --json
Create API key
创建API密钥
bunx @temps-sdk/cli apikeys create -n "CI/CD Key" -r developer -e 90 -y
bunx @temps-sdk/cli apikeys create -n "CI/CD密钥" -r developer -e 90 -y
Create with specific permissions
创建带特定权限的API密钥
bunx @temps-sdk/cli apikeys create -n "Deploy Only" -r developer -p "deployments:create,deployments:read" -e 30 -y
bunx @temps-sdk/cli apikeys create -n "仅部署权限" -r developer -p "deployments:create,deployments:read" -e 30 -y
Show key details
查看API密钥详情
bunx @temps-sdk/cli apikeys show --id 1 --json
bunx @temps-sdk/cli apikeys show --id 1 --json
Activate/deactivate
激活/停用API密钥
bunx @temps-sdk/cli apikeys activate --id 1
bunx @temps-sdk/cli apikeys deactivate --id 1
bunx @temps-sdk/cli apikeys activate --id 1
bunx @temps-sdk/cli apikeys deactivate --id 1
List available permissions
列出可用权限
bunx @temps-sdk/cli apikeys permissions --json
bunx @temps-sdk/cli apikeys permissions --json
Remove
删除API密钥
bunx @temps-sdk/cli apikeys remove --id 1 -f
**Roles**: `admin`, `developer`, `viewer`, `readonly`
**Expiry**: `7`, `30`, `90`, `365` days
---bunx @temps-sdk/cli apikeys remove --id 1 -f
**角色**:`admin`、`developer`、`viewer`、`readonly`
**有效期**:`7`、`30`、`90`、`365`天
---Deployment Tokens
部署令牌管理
Alias:
tokenbash
undefined别名:
tokenbash
undefinedList tokens
列出部署令牌
bunx @temps-sdk/cli tokens list -p my-app --json
bunx @temps-sdk/cli tokens list -p my-app --json
Create token
创建部署令牌
bunx @temps-sdk/cli tokens create -p my-app -n "Analytics Token" --permissions "analytics:read,events:write" -e 90 -y
bunx @temps-sdk/cli tokens create -p my-app -n "分析令牌" --permissions "analytics:read,events:write" -e 90 -y
Show token
查看部署令牌详情
bunx @temps-sdk/cli tokens show -p my-app --id 1 --json
bunx @temps-sdk/cli tokens show -p my-app --id 1 --json
Delete token
删除部署令牌
bunx @temps-sdk/cli tokens delete -p my-app --id 1 -f
bunx @temps-sdk/cli tokens delete -p my-app --id 1 -f
List available permissions
列出可用权限
bunx @temps-sdk/cli tokens permissions --json
**Permissions**: `*`, `visitors:enrich`, `emails:send`, `analytics:read`, `events:write`, `errors:read`
**Expiry**: `7`, `30`, `90`, `365`, `never`
---bunx @temps-sdk/cli tokens permissions --json
**权限**:`*`、`visitors:enrich`、`emails:send`、`analytics:read`、`events:write`、`errors:read`
**有效期**:`7`、`30`、`90`、`365`、`never`(永久)
---Users
用户管理
bash
undefinedbash
undefinedList users
列出用户
bunx @temps-sdk/cli users list --json
bunx @temps-sdk/cli users list --json
Create user
创建用户
bunx @temps-sdk/cli users create --email user@example.com --name "New User" --password "secure123" --role developer -y
bunx @temps-sdk/cli users create --email user@example.com --name "新用户" --password "secure123" --role developer -y
Show current user
查看当前用户信息
bunx @temps-sdk/cli users me --json
bunx @temps-sdk/cli users me --json
Change user role
变更用户角色
bunx @temps-sdk/cli users role --id 2 --role admin
bunx @temps-sdk/cli users role --id 2 --role admin
Remove user (soft delete)
删除用户(软删除)
bunx @temps-sdk/cli users remove --id 2 -f
bunx @temps-sdk/cli users remove --id 2 -f
Restore deleted user
恢复已删除用户
bunx @temps-sdk/cli users restore --id 2
---bunx @temps-sdk/cli users restore --id 2
---DSN (Data Source Names)
DSN(数据源名称)管理
bash
undefinedbash
undefinedList DSNs
列出DSN
bunx @temps-sdk/cli dsn list --project-id 5 --json
bunx @temps-sdk/cli dsn list --project-id 5 --json
Create DSN
创建DSN
bunx @temps-sdk/cli dsn create --project-id 5 -n "Production DSN" --environment-id 1 -y
bunx @temps-sdk/cli dsn create --project-id 5 -n "生产环境DSN" --environment-id 1 -y
Get or create DSN (idempotent)
获取或创建DSN(幂等操作)
bunx @temps-sdk/cli dsn get-or-create --project-id 5 --environment-id 1 --json
bunx @temps-sdk/cli dsn get-or-create --project-id 5 --environment-id 1 --json
Regenerate DSN key
重新生成DSN密钥
bunx @temps-sdk/cli dsn regenerate --project-id 5 --dsn-id 1 -f
bunx @temps-sdk/cli dsn regenerate --project-id 5 --dsn-id 1 -f
Revoke DSN
吊销DSN
bunx @temps-sdk/cli dsn revoke --project-id 5 --dsn-id 1 -f
---bunx @temps-sdk/cli dsn revoke --project-id 5 --dsn-id 1 -f
---Analytics Funnels
分析漏斗管理
Alias:
funnelbash
undefined别名:
funnelbash
undefinedList funnels
列出分析漏斗
bunx @temps-sdk/cli funnels list --project-id 5 --json
bunx @temps-sdk/cli funnels list --project-id 5 --json
Create funnel
创建分析漏斗
bunx @temps-sdk/cli funnels create --project-id 5 -n "Signup Funnel"
-s '[{"event_name":"page_view","filters":{"path":"/signup"}},{"event_name":"form_submit"},{"event_name":"signup_complete"}]' -y
-s '[{"event_name":"page_view","filters":{"path":"/signup"}},{"event_name":"form_submit"},{"event_name":"signup_complete"}]' -y
bunx @temps-sdk/cli funnels create --project-id 5 -n "注册漏斗"
-s '[{"event_name":"page_view","filters":{"path":"/signup"}},{"event_name":"form_submit"},{"event_name":"signup_complete"}]' -y
-s '[{"event_name":"page_view","filters":{"path":"/signup"}},{"event_name":"form_submit"},{"event_name":"signup_complete"}]' -y
Update funnel
更新分析漏斗
bunx @temps-sdk/cli funnels update --project-id 5 --funnel-id 1 -n "Updated Funnel"
bunx @temps-sdk/cli funnels update --project-id 5 --funnel-id 1 -n "更新后的注册漏斗"
View funnel metrics
查看漏斗指标
bunx @temps-sdk/cli funnels metrics --project-id 5 --funnel-id 1 --json
bunx @temps-sdk/cli funnels metrics --project-id 5 --funnel-id 1 --json
Preview metrics (without saving)
预览漏斗指标(不保存)
bunx @temps-sdk/cli funnels preview --project-id 5
-s '[{"event_name":"page_view"},{"event_name":"signup"}]' --json
-s '[{"event_name":"page_view"},{"event_name":"signup"}]' --json
bunx @temps-sdk/cli funnels preview --project-id 5
-s '[{"event_name":"page_view"},{"event_name":"signup"}]' --json
-s '[{"event_name":"page_view"},{"event_name":"signup"}]' --json
Remove funnel
删除分析漏斗
bunx @temps-sdk/cli funnels remove --project-id 5 --funnel-id 1 -f
---bunx @temps-sdk/cli funnels remove --project-id 5 --funnel-id 1 -f
---邮件管理
Email Providers
邮件提供商管理
Alias:
eprovbash
undefined别名:
eprovbash
undefinedList email providers
列出邮件提供商
bunx @temps-sdk/cli email-providers list --json
bunx @temps-sdk/cli email-providers list --json
Create SES provider
创建SES提供商
bunx @temps-sdk/cli email-providers create -n "AWS SES" -t ses --access-key-id AKIA... --secret-access-key secret --region us-east-1 -y
bunx @temps-sdk/cli email-providers create -n "AWS SES" -t ses --access-key-id AKIA... --secret-access-key secret --region us-east-1 -y
Create Scaleway provider
创建Scaleway提供商
bunx @temps-sdk/cli email-providers create -n "Scaleway" -t scaleway --api-key scw_abc --project-id proj123 --region fr-par -y
bunx @temps-sdk/cli email-providers create -n "Scaleway" -t scaleway --api-key scw_abc --project-id proj123 --region fr-par -y
Test provider
测试邮件提供商
bunx @temps-sdk/cli email-providers test --id 1 --from noreply@example.com
bunx @temps-sdk/cli email-providers test --id 1 --from noreply@example.com
Remove
删除邮件提供商
bunx @temps-sdk/cli email-providers remove --id 1 -f
undefinedbunx @temps-sdk/cli email-providers remove --id 1 -f
undefinedEmail Domains
邮件域名管理
Alias:
edombash
undefined别名:
edombash
undefinedList domains
列出邮件域名
bunx @temps-sdk/cli email-domains list --json
bunx @temps-sdk/cli email-domains list --json
Create email domain
创建邮件域名
bunx @temps-sdk/cli email-domains create -d example.com --provider-id 1 -y
bunx @temps-sdk/cli email-domains create -d example.com --provider-id 1 -y
Show domain
查看邮件域名详情
bunx @temps-sdk/cli email-domains show --id 1 --json
bunx @temps-sdk/cli email-domains show --id 1 --json
Get DNS records to configure
获取需要配置的DNS记录
bunx @temps-sdk/cli email-domains dns-records --id 1 --json
bunx @temps-sdk/cli email-domains dns-records --id 1 --json
Auto-setup DNS records
自动配置DNS记录
bunx @temps-sdk/cli email-domains setup-dns --id 1 --dns-provider-id 2
bunx @temps-sdk/cli email-domains setup-dns --id 1 --dns-provider-id 2
Verify domain
验证邮件域名
bunx @temps-sdk/cli email-domains verify --id 1
bunx @temps-sdk/cli email-domains verify --id 1
Remove
删除邮件域名
bunx @temps-sdk/cli email-domains remove --id 1 -f
undefinedbunx @temps-sdk/cli email-domains remove --id 1 -f
undefinedEmails
邮件发送管理
Alias:
emailbash
undefined别名:
emailbash
undefinedList sent emails
列出已发送邮件
bunx @temps-sdk/cli emails list --json
bunx @temps-sdk/cli emails list --page 1 --page-size 20 --status delivered
bunx @temps-sdk/cli emails list --domain-id 1 --project-id 5 --from-address noreply@example.com
bunx @temps-sdk/cli emails list --json
bunx @temps-sdk/cli emails list --page 1 --page-size 20 --status delivered
bunx @temps-sdk/cli emails list --domain-id 1 --project-id 5 --from-address noreply@example.com
Send email
发送邮件
bunx @temps-sdk/cli emails send --to user@example.com --subject "Hello" --body "Welcome!" --from noreply@example.com -y
bunx @temps-sdk/cli emails send --to user@example.com --subject "你好" --body "欢迎使用!" --from noreply@example.com -y
Show email details
查看邮件详情
bunx @temps-sdk/cli emails show --id 1 --json
bunx @temps-sdk/cli emails show --id 1 --json
Email statistics
邮件统计
bunx @temps-sdk/cli emails stats --json
bunx @temps-sdk/cli emails stats --json
Validate email address
验证邮箱地址
bunx @temps-sdk/cli emails validate --email user@example.com --json
---bunx @temps-sdk/cli emails validate --email user@example.com --json
---IP Access Control
IP访问控制
Alias:
ipabash
undefined别名:
ipabash
undefinedList rules
列出访问规则
bunx @temps-sdk/cli ip-access list --json
bunx @temps-sdk/cli ip-access list --json
Allow an IP
允许指定IP访问
bunx @temps-sdk/cli ip-access create --ip 203.0.113.0/24 --action allow --description "Office network" -y
bunx @temps-sdk/cli ip-access create --ip 203.0.113.0/24 --action allow --description "办公网络" -y
Block an IP
阻止指定IP访问
bunx @temps-sdk/cli ip-access create --ip 198.51.100.5 --action deny --description "Suspicious traffic" -y
bunx @temps-sdk/cli ip-access create --ip 198.51.100.5 --action deny --description "可疑流量" -y
Check if IP is blocked
检查IP是否被阻止
bunx @temps-sdk/cli ip-access check --ip 198.51.100.5 --json
bunx @temps-sdk/cli ip-access check --ip 198.51.100.5 --json
Update rule
更新访问规则
bunx @temps-sdk/cli ip-access update --id 1 --description "Updated description"
bunx @temps-sdk/cli ip-access update --id 1 --description "更新后的描述"
Remove rule
删除访问规则
bunx @temps-sdk/cli ip-access remove --id 1 -f
---bunx @temps-sdk/cli ip-access remove --id 1 -f
---Load Balancer
负载均衡器管理
Alias:
lbbash
undefined别名:
lbbash
undefinedList routes
列出路由规则
bunx @temps-sdk/cli load-balancer list --json
bunx @temps-sdk/cli load-balancer list --json
Create route
创建路由规则
bunx @temps-sdk/cli load-balancer create -d app.example.com -t http://localhost:8080 -y
bunx @temps-sdk/cli load-balancer create -d app.example.com -t http://localhost:8080 -y
Show route
查看路由规则详情
bunx @temps-sdk/cli load-balancer show -d app.example.com --json
bunx @temps-sdk/cli load-balancer show -d app.example.com --json
Update route
更新路由规则
bunx @temps-sdk/cli load-balancer update -d app.example.com -t http://localhost:9090
bunx @temps-sdk/cli load-balancer update -d app.example.com -t http://localhost:9090
Remove route
删除路由规则
bunx @temps-sdk/cli load-balancer remove -d app.example.com -f
---bunx @temps-sdk/cli load-balancer remove -d app.example.com -f
---Audit Logs
审计日志
bash
undefinedbash
undefinedList audit logs
列出审计日志
bunx @temps-sdk/cli audit list --limit 50 --json
bunx @temps-sdk/cli audit list --limit 50 --json
With pagination and filters
带分页和过滤条件的查询
bunx @temps-sdk/cli audit list --limit 20 --offset 40
bunx @temps-sdk/cli audit list --operation-type PROJECT_CREATED --user-id 1
bunx @temps-sdk/cli audit list --from 2025-01-01T00:00:00Z --to 2025-01-31T23:59:59Z
bunx @temps-sdk/cli audit list --limit 20 --offset 40
bunx @temps-sdk/cli audit list --operation-type PROJECT_CREATED --user-id 1
bunx @temps-sdk/cli audit list --from 2025-01-01T00:00:00Z --to 2025-01-31T23:59:59Z
Show audit log entry
查看审计日志条目详情
bunx @temps-sdk/cli audit show --id 1 --json
**Example output:**Audit Logs (50)
┌────┬────────────────────┬───────────────────┬──────────────┬──────────────┬─────────────────────┐
│ ID │ Operation │ User │ IP │ Location │ Date │
├────┼────────────────────┼───────────────────┼──────────────┼──────────────┼─────────────────────┤
│ 42 │ PROJECT_CREATED │ david@example.com │ 203.0.113.1 │ Madrid, ES │ 2025-01-20 15:30:00 │
│ 41 │ DEPLOYMENT_STARTED │ david@example.com │ 203.0.113.1 │ Madrid, ES │ 2025-01-20 15:28:00 │
└────┴────────────────────┴───────────────────┴──────────────┴──────────────┴─────────────────────┘
---bunx @temps-sdk/cli audit show --id 1 --json
**示例输出:**审计日志(50条)
┌────┬────────────────────┬───────────────────┬──────────────┬──────────────┬─────────────────────┐
│ ID │ 操作类型 │ 用户 │ IP地址 │ 地理位置 │ 时间 │
├────┼────────────────────┼───────────────────┼──────────────┼──────────────┼─────────────────────┤
│ 42 │ 项目已创建 │ david@example.com │ 203.0.113.1 │ 马德里, ES │ 2025-01-20 15:30:00 │
│ 41 │ 部署已启动 │ david@example.com │ 203.0.113.1 │ 马德里, ES │ 2025-01-20 15:28:00 │
└────┴────────────────────┴───────────────────┴──────────────┴──────────────┴─────────────────────┘
---Proxy Logs
代理日志
Alias:
plogsbash
undefined别名:
plogsbash
undefinedList proxy logs
列出代理日志
bunx @temps-sdk/cli proxy-logs list --limit 20 --json
bunx @temps-sdk/cli proxy-logs list --limit 20 --json
With pagination and filters
带分页和过滤条件的查询
bunx @temps-sdk/cli proxy-logs list --page 2 --limit 50
bunx @temps-sdk/cli proxy-logs list --project-id 5 --environment-id 1
bunx @temps-sdk/cli proxy-logs list --method POST --status-code 500
bunx @temps-sdk/cli proxy-logs list --host app.example.com --path /api/users
bunx @temps-sdk/cli proxy-logs list --start-date 2025-01-20T00:00:00Z --end-date 2025-01-21T00:00:00Z
bunx @temps-sdk/cli proxy-logs list --sort-by response_time_ms --sort-order desc
bunx @temps-sdk/cli proxy-logs list --is-bot --json
bunx @temps-sdk/cli proxy-logs list --has-error --json
bunx @temps-sdk/cli proxy-logs list --page 2 --limit 50
bunx @temps-sdk/cli proxy-logs list --project-id 5 --environment-id 1
bunx @temps-sdk/cli proxy-logs list --method POST --status-code 500
bunx @temps-sdk/cli proxy-logs list --host app.example.com --path /api/users
bunx @temps-sdk/cli proxy-logs list --start-date 2025-01-20T00:00:00Z --end-date 2025-01-21T00:00:00Z
bunx @temps-sdk/cli proxy-logs list --sort-by response_time_ms --sort-order desc
bunx @temps-sdk/cli proxy-logs list --is-bot --json
bunx @temps-sdk/cli proxy-logs list --has-error --json
Show log details
查看代理日志详情
bunx @temps-sdk/cli proxy-logs show --id 1 --json
bunx @temps-sdk/cli proxy-logs show --id 1 --json
Get log by request ID
按请求ID查询日志
bunx @temps-sdk/cli proxy-logs by-request --request-id req_abc123 --json
bunx @temps-sdk/cli proxy-logs by-request --request-id req_abc123 --json
Request statistics
请求统计
bunx @temps-sdk/cli proxy-logs stats --json
bunx @temps-sdk/cli proxy-logs stats --json
Today's statistics
今日请求统计
bunx @temps-sdk/cli proxy-logs today --json
---bunx @temps-sdk/cli proxy-logs today --json
---Platform Information
平台信息
Alias:
platbash
undefined别名:
platbash
undefinedPlatform info (OS, architecture)
平台信息(操作系统、架构)
bunx @temps-sdk/cli platform info --json
bunx @temps-sdk/cli platform info --json
Access/networking info
访问/网络信息
bunx @temps-sdk/cli platform access --json
bunx @temps-sdk/cli platform access --json
Public IP
公网IP
bunx @temps-sdk/cli platform public-ip
bunx @temps-sdk/cli platform public-ip
Private IP
内网IP
bunx @temps-sdk/cli platform private-ip
**Example output (`platform access --json`):**
```json
{
"access_mode": "public",
"public_ip": "203.0.113.50",
"private_ip": "10.0.1.5",
"can_create_domains": true,
"domain_creation_error": null
}bunx @temps-sdk/cli platform private-ip
**示例输出(`platform access --json`):**
```json
{
"access_mode": "public",
"public_ip": "203.0.113.50",
"private_ip": "10.0.1.5",
"can_create_domains": true,
"domain_creation_error": null
}Settings (Platform)
平台设置
bash
undefinedbash
undefinedShow platform settings
查看平台设置
bunx @temps-sdk/cli settings show --json
bunx @temps-sdk/cli settings show --json
Update settings
更新平台设置
bunx @temps-sdk/cli settings update --preview-domain example.com
bunx @temps-sdk/cli settings update --preview-domain example.com
Set external URL
设置外部访问地址
bunx @temps-sdk/cli settings set-external-url --url https://app.example.com
bunx @temps-sdk/cli settings set-external-url --url https://app.example.com
Set preview domain
设置预览域名
bunx @temps-sdk/cli settings set-preview-domain --domain preview.example.com
---bunx @temps-sdk/cli settings set-preview-domain --domain preview.example.com
---Presets & Templates
预设模板
bash
undefinedbash
undefinedList build presets
列出构建预设
bunx @temps-sdk/cli presets list --json
bunx @temps-sdk/cli presets list --type server
bunx @temps-sdk/cli presets list --type static
bunx @temps-sdk/cli presets list --json
bunx @temps-sdk/cli presets list --type server
bunx @temps-sdk/cli presets list --type static
Show preset details
查看预设详情
bunx @temps-sdk/cli presets show nextjs --json
bunx @temps-sdk/cli presets show nextjs --json
List deployment templates
列出部署模板
bunx @temps-sdk/cli templates list --json
bunx @temps-sdk/cli templates list --type server
---bunx @temps-sdk/cli templates list --json
bunx @temps-sdk/cli templates list --type server
---Imports
导入管理
bash
undefinedbash
undefinedList import sources
列出导入源
bunx @temps-sdk/cli imports sources --json
bunx @temps-sdk/cli imports sources --json
Discover workloads
发现工作负载
bunx @temps-sdk/cli imports discover -s docker --json
bunx @temps-sdk/cli imports discover -s docker --json
Create import plan
创建导入计划
bunx @temps-sdk/cli imports plan -s docker -w my-container
bunx @temps-sdk/cli imports plan -s docker -w my-container
Execute import
执行导入
bunx @temps-sdk/cli imports execute -s docker -w my-container -y
bunx @temps-sdk/cli imports execute -s docker -w my-container -y
Check import status
检查导入状态
bunx @temps-sdk/cli imports status --session-id sess_abc123 --json
**Workflow**: `sources` -> `discover` -> `plan` -> `execute` -> `status`
---bunx @temps-sdk/cli imports status --session-id sess_abc123 --json
**工作流**:`sources`(源管理)-> `discover`(发现)-> `plan`(计划)-> `execute`(执行)-> `status`(状态查询)
---Documentation Generation
文档生成
bash
undefinedbash
undefinedGenerate markdown docs
生成Markdown格式文档
bunx @temps-sdk/cli docs
bunx @temps-sdk/cli docs
Generate MDX docs
生成MDX格式文档
bunx @temps-sdk/cli docs -f mdx
bunx @temps-sdk/cli docs -f mdx
Generate JSON docs
生成JSON格式文档
bunx @temps-sdk/cli docs -f json
bunx @temps-sdk/cli docs -f json
Write to file
写入到文件
bunx @temps-sdk/cli docs -f markdown -o docs/cli-reference.md
---bunx @temps-sdk/cli docs -f markdown -o docs/cli-reference.md
---Temps Cloud
Temps Cloud
Temps Cloud () is a managed hosting service separate from self-hosted Temps. Cloud commands use their own authentication () and do not interfere with self-hosted credentials.
temps.shcloudApiKeyEnvironment variables:
| Variable | Description |
|---|---|
| Override cloud API endpoint (default: |
| Cloud API token (highest priority) |
| Cloud API key |
Temps Cloud()是独立于自托管Temps的托管服务。Cloud命令使用独立的身份验证(),不会影响自托管凭据。
temps.shcloudApiKey环境变量:
| 变量名 | 描述 |
|---|---|
| 覆盖Cloud API端点(默认: |
| Cloud API令牌(优先级最高) |
| Cloud API密钥 |
Cloud Authentication
Cloud身份验证
bash
undefinedbash
undefinedLogin via device authorization flow (opens browser)
通过设备授权流登录(打开浏览器)
bunx @temps-sdk/cli cloud login
bunx @temps-sdk/cli cloud login
Show current cloud account
查看当前Cloud账户信息
bunx @temps-sdk/cli cloud whoami
bunx @temps-sdk/cli cloud whoami
Logout from Temps Cloud
登出Temps Cloud
bunx @temps-sdk/cli cloud logout
**Example output (`cloud whoami`):**Temps Cloud Account
────────────────────────
ID: 42
Name: David
Username: david
Email: david@example.com
Plan: pro
undefinedbunx @temps-sdk/cli cloud logout
**示例输出(`cloud whoami`):**Temps Cloud账户信息
────────────────────────
ID: 42
姓名: David
用户名: david
邮箱: david@example.com
套餐: 专业版
undefinedCloud VPS
Cloud VPS管理
Manage cloud VPS instances. Public endpoints (images, locations, types) work without authentication.
管理Cloud VPS实例。公共端点(镜像、区域、服务器类型)无需身份验证即可访问。
List VPS Instances
列出VPS实例
bash
bunx @temps-sdk/cli cloud vps list
bunx @temps-sdk/cli cloud vps list --jsonExample output:
VPS Instances (2)
──────────────────────────────────────────────────────────────
ID │ Hostname │ Status │ IPv4 │ Type │ Price
─────────────┼─────────────────┼───────────┼───────────────┼───────┼────────
abc12def │ vps-abc12def │ ● active │ 49.12.100.50 │ cx22 │ €4.51/mo
xyz34ghi │ vps-xyz34ghi │ ● error │ pending │ cx32 │ €7.49/mobash
bunx @temps-sdk/cli cloud vps list
bunx @temps-sdk/cli cloud vps list --json示例输出:
VPS实例(2个)
──────────────────────────────────────────────────────────────
ID │ 主机名 │ 状态 │ IPv4地址 │ 类型 │ 价格
─────────────┼─────────────────┼───────────┼───────────────┼───────┼────────
abc12def │ vps-abc12def │ ● 活跃 │ 49.12.100.50 │ cx22 │ €4.51/月
xyz34ghi │ vps-xyz34ghi │ ● 异常 │ 待分配 │ cx32 │ €7.49/月Create VPS Instance
创建VPS实例
bash
undefinedbash
undefinedInteractive wizard (image -> location -> server type)
交互式向导(选择镜像 -> 区域 -> 服务器类型)
bunx @temps-sdk/cli cloud vps create
bunx @temps-sdk/cli cloud vps create
Non-interactive
非交互式创建
bunx @temps-sdk/cli cloud vps create --image ubuntu-22.04 --location fsn1 --type cx22
bunx @temps-sdk/cli cloud vps create --image ubuntu-22.04 --location fsn1 --type cx22 --json
undefinedbunx @temps-sdk/cli cloud vps create --image ubuntu-22.04 --location fsn1 --type cx22
bunx @temps-sdk/cli cloud vps create --image ubuntu-22.04 --location fsn1 --type cx22 --json
undefinedShow VPS Details
查看VPS详情
bash
bunx @temps-sdk/cli cloud vps show abc12def
bunx @temps-sdk/cli cloud vps show abc12def --jsonShows instance details, server specs, and provisioning logs.
bash
bunx @temps-sdk/cli cloud vps show abc12def
bunx @temps-sdk/cli cloud vps show abc12def --json展示实例详情、服务器规格及配置日志。
Destroy VPS Instance
销毁VPS实例
bash
undefinedbash
undefinedWith confirmation prompt
带确认提示的销毁
bunx @temps-sdk/cli cloud vps destroy abc12def
undefinedbunx @temps-sdk/cli cloud vps destroy abc12def
undefinedRetry Failed Provisioning
重试失败的配置
bash
bunx @temps-sdk/cli cloud vps retry abc12defbash
bunx @temps-sdk/cli cloud vps retry abc12defShow VPS Credentials
查看VPS凭据
bash
bunx @temps-sdk/cli cloud vps credentials abc12def
bunx @temps-sdk/cli cloud vps credentials abc12def --jsonShows web panel URL, username, and password.
bash
bunx @temps-sdk/cli cloud vps credentials abc12def
bunx @temps-sdk/cli cloud vps credentials abc12def --json展示Web面板地址、用户名和密码。
List Available OS Images (No Auth Required)
列出可用操作系统镜像(无需身份验证)
bash
bunx @temps-sdk/cli cloud vps images
bunx @temps-sdk/cli cloud vps images --jsonbash
bunx @temps-sdk/cli cloud vps images
bunx @temps-sdk/cli cloud vps images --jsonList Available Locations (No Auth Required)
列出可用区域(无需身份验证)
bash
bunx @temps-sdk/cli cloud vps locations
bunx @temps-sdk/cli cloud vps locations --jsonbash
bunx @temps-sdk/cli cloud vps locations
bunx @temps-sdk/cli cloud vps locations --jsonList Server Types with Pricing (No Auth Required)
列出服务器类型及价格(无需身份验证)
bash
bunx @temps-sdk/cli cloud vps types
bunx @temps-sdk/cli cloud vps types --location fsn1
bunx @temps-sdk/cli cloud vps types --jsonExample output:
Server Types for fsn1 (4)
─────────────────────────────────────────────────────────────────
ID │ Name │ vCPU │ Memory (GB) │ Disk (GB) │ Price │ Available
──────┼──────────────┼──────┼─────────────┼───────────┼───────────┼──────────
cx22 │ CX22 │ 2 │ 4 │ 40 │ €4.51/mo │ yes
cx32 │ CX32 │ 4 │ 8 │ 80 │ €7.49/mo │ yes
cx42 │ CX42 │ 8 │ 16 │ 160 │ €14.99/mo │ yes
cx52 │ CX52 │ 16 │ 32 │ 320 │ €29.99/mo │ nobash
bunx @temps-sdk/cli cloud vps types
bunx @temps-sdk/cli cloud vps types --location fsn1
bunx @temps-sdk/cli cloud vps types --json示例输出:
fsn1区域的服务器类型(4种)
─────────────────────────────────────────────────────────────────
ID │ 名称 │ vCPU │ 内存(GB) │ 磁盘(GB) │ 价格 │ 可用性
──────┼──────────────┼──────┼─────────────┼───────────┼───────────┼──────────
cx22 │ CX22 │ 2 │ 4 │ 40 │ €4.51/月 │ 可用
cx32 │ CX32 │ 4 │ 8 │ 80 │ €7.49/月 │ 可用
cx42 │ CX42 │ 8 │ 16 │ 160 │ €14.99/月 │ 可用
cx52 │ CX52 │ 16 │ 32 │ 320 │ €29.99/月 │ 不可用Cloud ACME Certificates (acme.sh)
Cloud ACME证书(基于acme.sh)
Provision TLS certificates for subdomains using with DNS-01 validation through the Temps Cloud ACME API. This is designed for self-hosted Temps instances behind NAT/firewalls that cannot complete HTTP-01 challenges because port 80 is not publicly accessible.
*.temps.devacme.sh通过Temps Cloud ACME API,使用结合DNS-01验证,为子域名颁发TLS证书。该功能专为位于NAT/防火墙后的自托管Temps实例设计——这类实例因80端口无法公网访问,无法完成HTTP-01验证。
acme.sh*.temps.devHow It Works
工作原理
- requests a certificate from Let's Encrypt for your
acme.shsubdomain*.temps.dev - Let's Encrypt asks for a DNS TXT record at
_acme-challenge.your-host.username.temps.dev - The custom DNS hook calls to create the TXT record on Cloudflare
bunx @temps-sdk/cli cloud acme set - Let's Encrypt verifies the record and issues the certificate
- saves the certificate locally and handles auto-renewal
acme.sh
- 向Let's Encrypt申请
acme.sh子域名的证书*.temps.dev - Let's Encrypt要求在添加DNS TXT记录
_acme-challenge.your-host.username.temps.dev - 自定义DNS钩子调用在Cloudflare上创建TXT记录
bunx @temps-sdk/cli cloud acme set - Let's Encrypt验证记录后颁发证书
- 将证书保存到本地并自动处理续期
acme.sh
Prerequisites
前置条件
- Temps CLI () installed — for cloud ACME commands (
@temps-sdk/cli)bunx @temps-sdk/cli cloud acme - Temps server binary () installed on the server — for certificate import (
temps)temps domain import - Temps Cloud account — authenticate with
bunx @temps-sdk/cli cloud login - acme.sh installed (see installation below)
- 已安装Temps CLI()——用于执行Cloud ACME命令(
@temps-sdk/cli)bunx @temps-sdk/cli cloud acme - 服务器上已安装Temps服务端二进制文件()——用于导入证书(
temps)temps domain import - 拥有Temps Cloud账户——通过完成身份验证
bunx @temps-sdk/cli cloud login - 已安装acme.sh(安装方法见下文)
Hostname Format
主机名格式
Your self-hosted Temps instance uses a subdomain of :
temps.dev{server-name}.{username}.temps.devExamples:
- — main domain
myserver.david.temps.dev - — wildcard for deployed apps
*.myserver.david.temps.dev
The ACME API uses the short hostname (without ):
.temps.devmyserver.david自托管Temps实例使用的子域名:
temps.dev{服务器名称}.{用户名}.temps.dev示例:
- —— 主域名
myserver.david.temps.dev - —— 部署应用的通配符域名
*.myserver.david.temps.dev
ACME API使用短主机名(不含):
.temps.devmyserver.davidCloud ACME CLI Commands
Cloud ACME CLI命令
Manage TXT records on Cloudflare for DNS-01 validation via the Temps CLI:
_acme-challengeSet TXT record:
bash
undefined通过Temps CLI管理Cloudflare上的 TXT记录,用于DNS-01验证:
_acme-challenge设置TXT记录:
bash
undefinedSet ACME challenge TXT record for a hostname
为主机名设置ACME挑战TXT记录
bunx @temps-sdk/cli cloud acme set --hostname myserver.david --token "token-value-from-acme"
**Example output:**ACME Challenge Set
────────────────────────
Hostname: myserver.david.temps.dev
TXT Record: _acme-challenge.myserver.david.temps.dev
Status: ✓ Record created
**Check propagation status:**
```bash
bunx @temps-sdk/cli cloud acme status --hostname myserver.david
bunx @temps-sdk/cli cloud acme status --hostname myserver.david --jsonExample output:
ACME Challenge Status
────────────────────────
Hostname: myserver.david.temps.dev
Propagated: ✓ YesJSON output:
json
{
"hostname": "myserver.david",
"propagated": true
}Clean up TXT record:
bash
bunx @temps-sdk/cli cloud acme clean --hostname myserver.davidExample output:
ACME challenge record removed for myserver.david.temps.devWait for propagation (set + poll):
bash
undefinedbunx @temps-sdk/cli cloud acme set --hostname myserver.david --token "来自acme的令牌值"
**示例输出:**ACME挑战记录已设置
────────────────────────
主机名: myserver.david.temps.dev
TXT记录: _acme-challenge.myserver.david.temps.dev
状态: ✓ 记录已创建
**检查传播状态:**
```bash
bunx @temps-sdk/cli cloud acme status --hostname myserver.david
bunx @temps-sdk/cli cloud acme status --hostname myserver.david --json示例输出:
ACME挑战记录传播状态
────────────────────────
主机名: myserver.david.temps.dev
已传播: ✓ 是JSON输出:
json
{
"hostname": "myserver.david",
"propagated": true
}清理TXT记录:
bash
bunx @temps-sdk/cli cloud acme clean --hostname myserver.david示例输出:
已移除myserver.david.temps.dev的ACME挑战记录等待传播完成(设置+轮询):
bash
undefinedSet record and wait until DNS propagation is confirmed (polls every 5s, max 120s)
设置记录并等待DNS传播确认(每5秒轮询一次,最长等待120秒)
bunx @temps-sdk/cli cloud acme set --hostname myserver.david --token "token-value" --wait
undefinedbunx @temps-sdk/cli cloud acme set --hostname myserver.david --token "令牌值" --wait
undefinedacme.sh DNS Hook Script
acme.sh DNS钩子脚本
Create the file :
~/.acme.sh/dnsapi/dns_temps.shbash
#!/usr/bin/env bash创建文件:
~/.acme.sh/dnsapi/dns_temps.shbash
#!/usr/bin/env bashTemps Cloud DNS hook for acme.sh
Temps Cloud DNS钩子脚本(用于acme.sh)
Uses @temps-sdk/cli (temps cloud acme) to manage _acme-challenge TXT records
使用@temps-sdk/cli(temps cloud acme)管理*.temps.dev子域名的_acme-challenge TXT记录
for *.temps.dev subdomains.
—
Prerequisites:
前置条件:
- @temps-sdk/cli installed globally (npm install -g @temps-sdk/cli)
- 已全局安装@temps-sdk/cli(npm install -g @temps-sdk/cli)
or available via bunx/npx
或可通过bunx/npx调用
- Authenticated to Temps Cloud: temps cloud login
- 已完成Temps Cloud身份验证:temps cloud login
dns_temps_add() {
local fulldomain="$1"
local txtvalue="$2"
_info "Adding TXT record for $fulldomain"
Extract hostname: _acme-challenge.server.user.temps.dev -> server.user
local hostname
hostname=$(echo "$fulldomain" | sed -E 's/^_acme-challenge.(.+).temps.dev$/\1/')
if [ "$hostname" = "$fulldomain" ]; then
_err "Could not extract hostname from $fulldomain"
return 1
fi
Set TXT record and wait for DNS propagation
if ! bunx @temps-sdk/cli cloud acme set --hostname "$hostname" --token "$txtvalue" --wait; then
_err "Failed to set TXT record via temps CLI"
return 1
fi
_info "TXT record set and propagation confirmed"
return 0
}
dns_temps_rm() {
local fulldomain="$1"
_info "Removing TXT record for $fulldomain"
local hostname
hostname=$(echo "$fulldomain" | sed -E 's/^_acme-challenge.(.+).temps.dev$/\1/')
if [ "$hostname" = "$fulldomain" ]; then
_err "Could not extract hostname from $fulldomain"
return 1
fi
if ! bunx @temps-sdk/cli cloud acme clean --hostname "$hostname"; then
_err "Failed to remove TXT record via temps CLI"
return 1
fi
_info "TXT record removed"
return 0
}
Make the script executable:
```bash
chmod +x ~/.acme.sh/dnsapi/dns_temps.shdns_temps_add() {
local fulldomain="$1"
local txtvalue="$2"
_info "为$fulldomain添加TXT记录"
提取主机名:_acme-challenge.server.user.temps.dev -> server.user
local hostname
hostname=$(echo "$fulldomain" | sed -E 's/^_acme-challenge.(.+).temps.dev$/\1/')
if [ "$hostname" = "$fulldomain" ]; then
_err "无法从$fulldomain中提取主机名"
return 1
fi
设置TXT记录并等待DNS传播
if ! bunx @temps-sdk/cli cloud acme set --hostname "$hostname" --token "$txtvalue" --wait; then
_err "通过temps CLI设置TXT记录失败"
return 1
fi
_info "TXT记录已设置且传播已确认"
return 0
}
dns_temps_rm() {
local fulldomain="$1"
_info "移除$fulldomain的TXT记录"
local hostname
hostname=$(echo "$fulldomain" | sed -E 's/^_acme-challenge.(.+).temps.dev$/\1/')
if [ "$hostname" = "$fulldomain" ]; then
_err "无法从$fulldomain中提取主机名"
return 1
fi
if ! bunx @temps-sdk/cli cloud acme clean --hostname "$hostname"; then
_err "通过temps CLI移除TXT记录失败"
return 1
fi
_info "TXT记录已移除"
return 0
}
为脚本添加可执行权限:
```bash
chmod +x ~/.acme.sh/dnsapi/dns_temps.shFull Certificate Flow
完整证书申请流程
1. Install acme.sh:
bash
curl https://get.acme.sh | sh -s email=your-email@example.com
source ~/.bashrc # or ~/.zshrc2. Authenticate to Temps Cloud (using ):
@temps-sdk/clibash
bunx @temps-sdk/cli cloud loginThe hook script uses the , which reads credentials from automatically.
@temps-sdk/cli~/.temps/.secrets3. Issue the certificate:
bash
acme.sh --issue --dns dns_temps \
-d 'myserver.david.temps.dev' \
-d '*.myserver.david.temps.dev'This will:
- Request a certificate from Let's Encrypt
- Call which runs
dns_temps_add()bunx @temps-sdk/cli cloud acme set --wait - Wait for DNS propagation
- Complete the ACME challenge
- Save the certificate
4. Certificate output location:
~/.acme.sh/myserver.david.temps.dev/
├── ca.cer # CA certificate chain
├── fullchain.cer # Full chain (cert + CA)
├── myserver.david.temps.dev.cer # Domain certificate
└── myserver.david.temps.dev.key # Private key5. Import the certificate into Temps (server-side):
Temps stores certificates in the database (encrypted at rest) and loads them dynamically via SNI during TLS handshake. Run the command on the server using the Temps server binary (not the ):
temps domain import@temps-sdk/clibash
undefined1. 安装acme.sh:
bash
curl https://get.acme.sh | sh -s email=your-email@example.com
source ~/.bashrc # 或~/.zshrc2. 登录到Temps Cloud(使用):
@temps-sdk/clibash
bunx @temps-sdk/cli cloud login钩子脚本会使用,该工具会自动从读取凭据。
@temps-sdk/cli~/.temps/.secrets3. 申请证书:
bash
acme.sh --issue --dns dns_temps \
-d 'myserver.david.temps.dev' \
-d '*.myserver.david.temps.dev'该命令会:
- 向Let's Encrypt申请证书
- 调用,后者执行
dns_temps_add()bunx @temps-sdk/cli cloud acme set --wait - 等待DNS传播完成
- 完成ACME挑战
- 保存证书
4. 证书输出位置:
~/.acme.sh/myserver.david.temps.dev/
├── ca.cer # CA证书链
├── fullchain.cer # 完整证书链(域名证书+CA证书)
├── myserver.david.temps.dev.cer # 域名证书
└── myserver.david.temps.dev.key # 私钥5. 将证书导入到Temps(服务端操作):
Temps会将证书存储在数据库中(静态加密),并在TLS握手时通过SNI动态加载。在服务器上执行命令(使用Temps服务端二进制文件,而非):
temps domain import@temps-sdk/clibash
undefinedImport the wildcard certificate
导入通配符证书
temps domain import
-d '*.myserver.david.temps.dev'
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key
--database-url "$TEMPS_DATABASE_URL"
-d '*.myserver.david.temps.dev'
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key
--database-url "$TEMPS_DATABASE_URL"
temps domain import
-d '*.myserver.david.temps.dev'
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key
--database-url "$TEMPS_DATABASE_URL"
-d '*.myserver.david.temps.dev'
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key
--database-url "$TEMPS_DATABASE_URL"
Import the base domain certificate
导入主域名证书
temps domain import
-d 'myserver.david.temps.dev'
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key
--database-url "$TEMPS_DATABASE_URL"
-d 'myserver.david.temps.dev'
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key
--database-url "$TEMPS_DATABASE_URL"
> **Note:** `temps domain import` is a server-side command from the Temps Rust binary (`temps`), not the `@temps-sdk/cli` package. It runs directly on the server where Temps is installed and requires `--database-url` access.
Use `--force` to overwrite an existing certificate (e.g., on renewal):
```bash
temps domain import \
-d '*.myserver.david.temps.dev' \
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer \
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key \
--database-url "$TEMPS_DATABASE_URL" \
--force6. Verify the certificate is loaded (server-side):
bash
temps domain list --database-url "$TEMPS_DATABASE_URL"Example output:
DOMAIN STATUS TYPE EXPIRES
──────────────────────────────────────────────────────────────────────────────────────────
*.myserver.david.temps.dev active wildcard 2025-05-15
myserver.david.temps.dev active single 2025-05-15The Temps proxy (listening on ) will automatically serve these certificates for matching SNI hostnames — no restart required.
--tls-addresstemps domain import
-d 'myserver.david.temps.dev'
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key
--database-url "$TEMPS_DATABASE_URL"
-d 'myserver.david.temps.dev'
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key
--database-url "$TEMPS_DATABASE_URL"
> **注意:** `temps domain import`是Temps Rust二进制文件(`temps`)提供的服务端命令,而非`@temps-sdk/cli`包的命令。该命令需在Temps安装的服务器上执行,且需要`--database-url`访问权限。
使用`--force`参数覆盖现有证书(例如续期时):
```bash
temps domain import \
-d '*.myserver.david.temps.dev' \
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer \
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key \
--database-url "$TEMPS_DATABASE_URL" \
--force6. 验证证书已加载(服务端操作):
bash
temps domain list --database-url "$TEMPS_DATABASE_URL"示例输出:
域名 状态 类型 过期时间
──────────────────────────────────────────────────────────────────────────────────────────
*.myserver.david.temps.dev 活跃 通配符 2025-05-15
myserver.david.temps.dev 活跃 单域名 2025-05-15Temps代理(监听)会自动为匹配SNI主机名的请求提供这些证书——无需重启服务。
--tls-addressDNS Propagation Verification
DNS传播验证
The hook script automatically polls for propagation via . To verify manually:
--waitbash
undefined钩子脚本会通过参数自动轮询传播状态。手动验证方法:
--waitbash
undefinedUsing Temps CLI
使用Temps CLI验证
bunx @temps-sdk/cli cloud acme status --hostname myserver.david
bunx @temps-sdk/cli cloud acme status --hostname myserver.david
Using dig
使用dig验证
dig TXT _acme-challenge.myserver.david.temps.dev @1.1.1.1
undefineddig TXT _acme-challenge.myserver.david.temps.dev @1.1.1.1
undefinedAuto-Renewal
自动续期
acme.sh--install-cert--reloadcmdtemps domain importbash
acme.sh --install-cert -d 'myserver.david.temps.dev' \
--reloadcmd 'temps domain import -d "*.myserver.david.temps.dev" \
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer \
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key \
--database-url "$TEMPS_DATABASE_URL" --force && \
temps domain import -d "myserver.david.temps.dev" \
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer \
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key \
--database-url "$TEMPS_DATABASE_URL" --force'Note: Theruns on the server where both--reloadcmdand the Temps binary are installed. Theacme.shhere refers to the server-side Rust binary, nottemps domain import.@temps-sdk/cli
This registers a reload command that runs after every successful renewal, automatically importing the fresh certificate into Temps.
acme.shVerify the cron job is installed:
bash
crontab -l | grep acmeForce a renewal test:
bash
acme.sh --renew -d 'myserver.david.temps.dev' --forceacme.sh--install-cert--reloadcmdtemps domain importbash
acme.sh --install-cert -d 'myserver.david.temps.dev' \
--reloadcmd 'temps domain import -d "*.myserver.david.temps.dev" \
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer \
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key \
--database-url "$TEMPS_DATABASE_URL" --force && \
temps domain import -d "myserver.david.temps.dev" \
--certificate ~/.acme.sh/myserver.david.temps.dev/fullchain.cer \
--private-key ~/.acme.sh/myserver.david.temps.dev/myserver.david.temps.dev.key \
--database-url "$TEMPS_DATABASE_URL" --force'注意:需在同时安装了--reloadcmd和Temps二进制文件的服务器上执行。此处的acme.sh指服务端Rust二进制文件,而非temps domain import。@temps-sdk/cli
该命令会注册一个重载命令,在每次续期成功后都会执行该命令,自动将新证书导入Temps。
acme.sh验证cron任务已安装:
bash
crontab -l | grep acme强制测试续期:
bash
acme.sh --renew -d 'myserver.david.temps.dev' --forceTroubleshooting
故障排查
Authentication error (401/403) on cloud ACME commands:
- Verify you're logged in:
bunx @temps-sdk/cli cloud whoami - Re-authenticate:
bunx @temps-sdk/cli cloud login
DNS propagation timeout:
- Cloudflare TTL is usually 60–120s; the flag polls up to 120s
--wait - Verify the record was created:
bunx @temps-sdk/cli cloud acme status --hostname myserver.david - Check manually with
dig TXT _acme-challenge.myserver.david.temps.dev @1.1.1.1
Let's Encrypt rate limits:
- 50 certificates per registered domain per week
- Use flag for testing:
--stagingacme.sh --issue --staging --dns dns_temps -d '...' - Remove for production certificates
--staging
Hook script not found:
- Ensure the file is at
~/.acme.sh/dnsapi/dns_temps.sh - Ensure it's executable:
chmod +x ~/.acme.sh/dnsapi/dns_temps.sh - The argument maps to the filename
--dns dns_tempsdns_temps.sh
Cloud ACME命令出现身份验证错误(401/403):
- 验证是否已登录:
bunx @temps-sdk/cli cloud whoami - 重新登录:
bunx @temps-sdk/cli cloud login
DNS传播超时:
- Cloudflare的TTL通常为60–120秒;参数最多等待120秒
--wait - 验证记录是否已创建:
bunx @temps-sdk/cli cloud acme status --hostname myserver.david - 使用手动检查
dig TXT _acme-challenge.myserver.david.temps.dev @1.1.1.1
Let's Encrypt速率限制:
- 每个注册域名每周最多申请50张证书
- 测试时使用参数:
--stagingacme.sh --issue --staging --dns dns_temps -d '...' - 生产环境证书需移除参数
--staging
钩子脚本未找到:
- 确保文件路径为
~/.acme.sh/dnsapi/dns_temps.sh - 确保脚本具有可执行权限:
chmod +x ~/.acme.sh/dnsapi/dns_temps.sh - 参数对应文件名
--dns dns_tempsdns_temps.sh
Common Patterns
常见使用模式
Automation / CI/CD
自动化/CI/CD
All write commands support to skip interactive prompts:
-y/--yesbash
undefined所有写入类命令均支持参数跳过交互式确认:
-y/--yesbash
undefinedFull CI/CD pipeline
完整CI/CD流水线
export TEMPS_TOKEN=tk_abc123
export TEMPS_API_URL=https://temps.example.com
bunx @temps-sdk/cli deploy my-app -b main -e production -y
bunx @temps-sdk/cli environments vars set -p my-app -e production -k VERSION -v "1.2.3"
bunx @temps-sdk/cli scans trigger --project-id 5 --environment-id 1
undefinedexport TEMPS_TOKEN=tk_abc123
export TEMPS_API_URL=https://temps.example.com
bunx @temps-sdk/cli deploy my-app -b main -e production -y
bunx @temps-sdk/cli environments vars set -p my-app -e production -k VERSION -v "1.2.3"
bunx @temps-sdk/cli scans trigger --project-id 5 --environment-id 1
undefinedJSON Output
JSON输出
Every list/show command supports for scripting:
--jsonbash
undefined所有列表/详情类命令均支持参数,便于脚本处理:
--jsonbash
undefinedGet project ID from slug
根据项目标识(Slug)获取项目ID
bunx @temps-sdk/cli projects show -p my-app --json | jq '.id'
bunx @temps-sdk/cli projects show -p my-app --json | jq '.id'
List running services
列出运行中的服务
bunx @temps-sdk/cli services list --json | jq '.[] | select(.status == "running")'
bunx @temps-sdk/cli services list --json | jq '.[] | select(.status == "running")'
Check deployment status
检查部署状态
bunx @temps-sdk/cli deployments status -p my-app -d 42 --json | jq '.status'
undefinedbunx @temps-sdk/cli deployments status -p my-app -d 42 --json | jq '.status'
undefinedCommand Aliases
命令别名
| Full Command | Short Alias |
|---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | — |
bunx @temps-sdk/cli cloud vpsWithin commands, common subcommand aliases: -> , -> /, -> , -> .
listlscreateaddnewremovermshowget| 完整命令 | 短别名 |
|---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | — |
bunx @temps-sdk/cli cloud vps命令内部的子命令也支持常见别名: -> 、 -> /、 -> 、 -> 。
listlscreateaddnewremovermshowget