Download service code
You can use the download command to download the deployed Cloud Run service code locally.
Basic Usage
tcb cloudrun download
Usage Example:
# Interactive Download. The CLI will guide you through selecting services.
tcb cloudrun download
# Download the code of the specified service to the current directory
tcb cloudrun download -e env-123456 -s my-service
# Download to the specified directory
tcb cloudrun download -e env-123456 -s api-service --targetPath ./local-code
# Force overwrite existing files
tcb cloudrun download -e env-123456 -s my-service --targetPath ./backup --force
Command Line Parameters
| Parameter | Description | Required |
|---|---|---|
-e, --env-id | Environment ID | No |
-s, --serviceName | Service name | No |
--targetPath | Target path for code download (absolute or relative path, default: current directory) | No |
--force | Forcibly overwrite existing files without prompting for confirmation | No |
-h, --help | Display command help information | No |
Precautions
- If files already exist in the target path and
--forceis not used, it will prompt for confirmation whether to overwrite. - Downloaded code includes all service configuration files.
- It is recommended to first use
tcb cloudrun listto view the service list