clever-tools

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Clever Tools

Clever Tools

Clever Tools is the official CLI for Clever Cloud, a Platform-as-a-Service (PaaS) provider. It allows you to deploy applications, manage add-ons (databases, storage, etc.), configure environment variables, domains, and monitor your services.
Use this skill when the user wants to deploy code to Clever Cloud, manage their hosted applications, or interact with Clever Cloud services.
Clever Tools是Clever Cloud的官方CLI,Clever Cloud是一家平台即服务(PaaS)提供商。它支持你部署应用、管理附加组件(数据库、存储等)、配置环境变量、域名,以及监控你的服务。
当用户想要将代码部署到Clever Cloud、管理其托管应用,或与Clever Cloud服务交互时可使用本技能。

Quick Start

快速开始

bash
undefined
bash
undefined

Login to Clever Cloud (opens browser for OAuth)

Login to Clever Cloud (opens browser for OAuth)

clever login
clever login

For CI/CD, use token-based authentication

For CI/CD, use token-based authentication

export CLEVER_TOKEN="your-token" export CLEVER_SECRET="your-secret"
export CLEVER_TOKEN="your-token" export CLEVER_SECRET="your-secret"

Link an existing application to current directory

Link an existing application to current directory

clever link <app-id>
clever link <app-id>

Or create a new application

Or create a new application

clever create --type node myapp
clever create --type node myapp

Deploy current directory

Deploy current directory

clever deploy
undefined
clever deploy
undefined

Essential Commands

核心命令

Deployment

部署

bash
undefined
bash
undefined

Deploy current directory (git push to Clever Cloud)

Deploy current directory (git push to Clever Cloud)

clever deploy
clever deploy

Deploy with specific commit or branch

Deploy with specific commit or branch

clever deploy --branch main clever deploy --commit HEAD~2
clever deploy --branch main clever deploy --commit HEAD~2

Restart application

Restart application

clever restart
clever restart

Stop application (scales to 0)

Stop application (scales to 0)

clever stop
clever stop

Check deployment status

Check deployment status

clever status
clever status

View deployment history

View deployment history

clever activity clever activity --follow # Live updates
undefined
clever activity clever activity --follow # Live updates
undefined

Logs

日志

bash
undefined
bash
undefined

Stream live logs

Stream live logs

clever logs
clever logs

View logs from last hour

View logs from last hour

clever logs --since 1h
clever logs --since 1h

View logs before a specific time

View logs before a specific time

clever logs --before 2024-01-15T10:00:00
clever logs --before 2024-01-15T10:00:00

Filter by deployment

Filter by deployment

clever logs --deployment-id <id>
clever logs --deployment-id <id>

Access logs (HTTP requests)

Access logs (HTTP requests)

clever accesslogs clever accesslogs --since 1h
undefined
clever accesslogs clever accesslogs --since 1h
undefined

Environment Variables

环境变量

bash
undefined
bash
undefined

List all environment variables

List all environment variables

clever env
clever env

Set a variable

Set a variable

clever env set MY_VAR "my value"
clever env set MY_VAR "my value"

Set multiple variables

Set multiple variables

clever env set VAR1=value1 VAR2=value2
clever env set VAR1=value1 VAR2=value2

Remove a variable

Remove a variable

clever env rm MY_VAR
clever env rm MY_VAR

Import from .env file

Import from .env file

clever env import .env
clever env import .env

Export for shell

Export for shell

clever env --format shell > .env
undefined
clever env --format shell > .env
undefined

Domains

域名

bash
undefined
bash
undefined

List domains

List domains

clever domain
clever domain

Add a custom domain

Add a custom domain

clever domain add myapp.example.com
clever domain add myapp.example.com

Remove a domain

Remove a domain

clever domain rm myapp.example.com
clever domain rm myapp.example.com

Favorite domain (used in logs, URLs)

Favorite domain (used in logs, URLs)

clever domain favorite set myapp.example.com
undefined
clever domain favorite set myapp.example.com
undefined

Add-ons (Databases, Storage, etc.)

附加组件(数据库、存储等)

bash
undefined
bash
undefined

List your add-ons

List your add-ons

clever addon
clever addon

List available add-on providers

List available add-on providers

clever addon providers
clever addon providers

Create a PostgreSQL database

Create a PostgreSQL database

clever addon create postgresql-addon mydb --plan dev
clever addon create postgresql-addon mydb --plan dev

Create Redis

Create Redis

clever addon create redis-addon myredis --plan s_mono
clever addon create redis-addon myredis --plan s_mono

Create S3-compatible storage (Cellar)

Create S3-compatible storage (Cellar)

clever addon create cellar-addon mybucket
clever addon create cellar-addon mybucket

Delete an add-on

Delete an add-on

clever addon delete <addon-id>
clever addon delete <addon-id>

Get add-on environment variables

Get add-on environment variables

clever addon env <addon-id>
undefined
clever addon env <addon-id>
undefined

Services (Managed services like Keycloak, Matomo)

服务(Keycloak、Matomo等托管服务)

bash
undefined
bash
undefined

Link add-on to application

Link add-on to application

clever service link-addon <addon-id>
clever service link-addon <addon-id>

Unlink add-on

Unlink add-on

clever service unlink-addon <addon-id>
undefined
clever service unlink-addon <addon-id>
undefined

Scaling

扩缩容

bash
undefined
bash
undefined

View current scaling

View current scaling

clever scale
clever scale

Set instance size (flavor)

Set instance size (flavor)

clever scale --flavor M
clever scale --flavor M

Set number of instances

Set number of instances

clever scale --instances 2
clever scale --instances 2

Autoscaling

Autoscaling

clever scale --min-instances 1 --max-instances 4
undefined
clever scale --min-instances 1 --max-instances 4
undefined

SSH Access

SSH访问

bash
undefined
bash
undefined

SSH into running instance

SSH into running instance

clever ssh
clever ssh

Run a command

Run a command

clever ssh --command "ls -la"
undefined
clever ssh --command "ls -la"
undefined

Applications Management

应用管理

bash
undefined
bash
undefined

List all applications in organization

List all applications in organization

clever applications list
clever applications list

List linked applications in current directory

List linked applications in current directory

clever applications
clever applications

Create new application

Create new application

clever create --type <type> <name>
clever create --type <type> <name>

Types: node, python, ruby, php, java, go, rust, docker, static...

Types: node, python, ruby, php, java, go, rust, docker, static...

Delete application

Delete application

clever delete
undefined
clever delete
undefined

Common Global Options

通用全局选项

These options work with most commands:
bash
--app <app-id|name>      # Target specific app (when multiple linked)
--alias <alias>          # Use app alias (from clever link --alias)
--org <org-id|name>      # Target specific organization
-F, --format <format>    # Output format: human, json, json-stream, shell
-y, --yes                # Skip confirmation prompts
JSON output is useful for scripting:
bash
clever env --format json | jq '.MY_VAR'
clever applications list --format json
这些选项适用于绝大多数命令:
bash
--app <app-id|name>      # Target specific app (when multiple linked)
--alias <alias>          # Use app alias (from clever link --alias)
--org <org-id|name>      # Target specific organization
-F, --format <format>    # Output format: human, json, json-stream, shell
-y, --yes                # Skip confirmation prompts
JSON输出非常适合用于脚本编写:
bash
clever env --format json | jq '.MY_VAR'
clever applications list --format json

Full Reference

完整参考

For complete documentation of all commands, options, available runtimes, add-on providers, and deployment zones, see references/full-documentation.md.
如需查看所有命令、选项、可用运行时、附加组件提供商和部署区域的完整文档,请参见 references/full-documentation.md