Cloud SDK
Developer workflow automation tool for project lifecycle management. Provides commands for initializing projects, running checks, building, testing, deploying, managing configuration, generating templates, producing documentation, and cleaning build artifacts — all from a single CLI interface.
Commands
| Command | Description |
|---|
| INLINECODE0 | Initialize a new project in the current working directory |
| INLINECODE1 |
Run lint, type-check, and test passes against the project |
|
cloud-sdk build | Build the project artifacts |
|
cloud-sdk test | Execute the full test suite |
|
cloud-sdk deploy | Show the deployment pipeline guide (build → test → stage → prod) |
|
cloud-sdk config | Display or manage project configuration (
config.json) |
|
cloud-sdk status | Check overall project health and status |
|
cloud-sdk template <name> | Generate a code template for the given component name |
|
cloud-sdk docs | Generate project documentation |
|
cloud-sdk clean | Remove build artifacts and temporary files |
|
cloud-sdk help | Show the built-in help message with all commands |
|
cloud-sdk version | Print the current version (v2.0.0) |
Data Storage
All operational data is stored in ~/.local/share/cloud-sdk/ by default. You can override this by setting the CLOUD_SDK_DIR environment variable. Key files inside the data directory:
- -
history.log — timestamped log of every command executed - INLINECODE16 — project-level configuration (managed via
config command)
The tool respects XDG_DATA_HOME if set, falling back to $HOME/.local/share.
Requirements
- - Bash 4.0+ (uses
set -euo pipefail for strict error handling) - coreutils (standard
date, mkdir, echo) - No external dependencies or API keys required
- Works on Linux and macOS out of the box
When to Use
- 1. Bootstrapping a new project — run
cloud-sdk init to set up project scaffolding quickly from the terminal without remembering per-tool init commands - Pre-commit quality gates — use
cloud-sdk check as part of a Git pre-commit hook to run lint + type-check + tests before every commit - CI/CD pipeline steps — chain
cloud-sdk build and cloud-sdk test inside your continuous integration scripts for a consistent, tool-agnostic interface - Deployment checklists — run
cloud-sdk deploy to get a guided walkthrough of the build → test → stage → prod pipeline so nothing gets skipped - Housekeeping and cleanup — execute
cloud-sdk clean to wipe build artifacts after releases, freeing disk space and resetting state
Examples
CODEBLOCK0
Configuration
Set the CLOUD_SDK_DIR environment variable to change the data directory:
CODEBLOCK1
Default location: INLINECODE31
Output
All command output goes to stdout. Redirect to a file if needed:
CODEBLOCK2
History is automatically logged to $DATA_DIR/history.log with timestamps.
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
Cloud SDK
项目生命周期管理的开发者工作流自动化工具。提供初始化项目、运行检查、构建、测试、部署、管理配置、生成模板、生成文档以及清理构建产物等命令——全部通过单一CLI界面完成。
命令
| 命令 | 描述 |
|---|
| cloud-sdk init | 在当前工作目录初始化新项目 |
| cloud-sdk check |
对项目运行lint、类型检查和测试 |
| cloud-sdk build | 构建项目产物 |
| cloud-sdk test | 执行完整测试套件 |
| cloud-sdk deploy | 显示部署流水线指南(构建→测试→预发布→生产) |
| cloud-sdk config | 显示或管理项目配置(config.json) |
| cloud-sdk status | 检查项目整体健康状态 |
| cloud-sdk template <名称> | 为指定组件名称生成代码模板 |
| cloud-sdk docs | 生成项目文档 |
| cloud-sdk clean | 移除构建产物和临时文件 |
| cloud-sdk help | 显示包含所有命令的内置帮助信息 |
| cloud-sdk version | 打印当前版本(v2.0.0) |
数据存储
默认情况下,所有操作数据存储在 ~/.local/share/cloud-sdk/ 中。可通过设置 CLOUDSDKDIR 环境变量覆盖此路径。数据目录中的关键文件:
- - history.log — 每条执行命令的时间戳日志
- config.json — 项目级配置(通过 config 命令管理)
该工具会遵循 XDGDATAHOME(若已设置),否则回退到 $HOME/.local/share。
系统要求
- - Bash 4.0+(使用 set -euo pipefail 进行严格错误处理)
- coreutils(标准 date、mkdir、echo)
- 无需外部依赖或API密钥
- 开箱即用于Linux和macOS
使用场景
- 1. 引导新项目 — 运行 cloud-sdk init 快速从终端搭建项目脚手架,无需记忆各工具的初始化命令
- 预提交质量门禁 — 在Git预提交钩子中使用 cloud-sdk check,每次提交前运行lint+类型检查+测试
- CI/CD流水线步骤 — 在持续集成脚本中串联 cloud-sdk build 和 cloud-sdk test,获得一致且与工具无关的接口
- 部署检查清单 — 运行 cloud-sdk deploy 获取构建→测试→预发布→生产流水线的引导式演练,确保不遗漏任何步骤
- 日常维护与清理 — 执行 cloud-sdk clean 在发布后清除构建产物,释放磁盘空间并重置状态
示例
bash
在当前目录初始化新项目
cloud-sdk init
运行所有质量检查(lint + 类型检查 + 测试)
cloud-sdk check
构建项目
cloud-sdk build
运行测试套件
cloud-sdk test
查看部署指南
cloud-sdk deploy
为名为service的组件生成代码模板
cloud-sdk template service
生成项目文档
cloud-sdk docs
检查项目健康状态
cloud-sdk status
清理构建产物
cloud-sdk clean
显示版本
cloud-sdk version
配置
设置 CLOUDSDKDIR 环境变量以更改数据目录:
bash
export CLOUDSDKDIR=$HOME/my-project/.cloud-sdk
默认位置:~/.local/share/cloud-sdk/
输出
所有命令输出到stdout。如需重定向到文件:
bash
cloud-sdk status > project-health.txt
历史记录会自动记录到 $DATA_DIR/history.log,并附带时间戳。
由BytesAgain提供 | bytesagain.com | hello@bytesagain.com