Container Desktop
Developer workflow automation tool for initializing, building, testing, and deploying projects from the command line.
Commands
| Command | Description |
|---|
| INLINECODE0 | Initialize a new project in the current directory |
| INLINECODE1 |
Run lint, type check, and tests |
|
build | Build the project |
|
test | Run the full test suite |
|
deploy | Show deploy pipeline guide (build → test → stage → prod) |
|
config | View or edit configuration |
|
status | Check overall project health |
|
template | Generate a code template for a given type |
|
docs | Generate project documentation |
|
clean | Remove build artifacts |
|
help | Show help and list all commands |
|
version | Print current version |
Usage
CODEBLOCK0
All actions are logged to $DATA_DIR/history.log for auditing.
Data Storage
- - Default directory: INLINECODE13
- Override: Set the
CONTAINER_DESKTOP_DIR environment variable to change the data directory. - Files:
-
history.log — timestamped log of every command executed
-
config.json — project-level configuration (created by
config)
-
data.log — general data log
Requirements
- - Bash 4+ (uses
set -euo pipefail) - No external dependencies or API keys required
- Works on Linux, macOS, and WSL
When to Use
- 1. Starting a new project — Run
container-desktop init to scaffold and initialize your workspace before writing any code. - Pre-commit quality checks — Use
container-desktop check to run lint, type checking, and tests in a single command before pushing code. - Building for deployment — Execute
container-desktop build as part of your CI/CD pipeline or local build workflow. - Running tests — Use
container-desktop test to run your full test suite during development or in automated pipelines. - Cleaning up after builds — Run
container-desktop clean to remove generated artifacts and free disk space between builds.
Examples
CODEBLOCK1
CODEBLOCK2
Output
All command output goes to stdout. Redirect to a file if needed:
CODEBLOCK3
Configuration
Set CONTAINER_DESKTOP_DIR to customize where data is stored:
CODEBLOCK4
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
容器桌面
用于从命令行初始化、构建、测试和部署项目的开发者工作流自动化工具。
命令
| 命令 | 描述 |
|---|
| init | 在当前目录中初始化一个新项目 |
| check |
运行代码检查、类型检查和测试 |
| build | 构建项目 |
| test | 运行完整的测试套件 |
| deploy | 显示部署流水线指南(构建→测试→预发布→生产) |
| config | 查看或编辑配置 |
| status | 检查项目整体健康状态 |
| template | 为指定类型生成代码模板 |
| docs | 生成项目文档 |
| clean | 移除构建产物 |
| help | 显示帮助信息并列出所有命令 |
| version | 打印当前版本 |
用法
bash
container-desktop [args]
所有操作都会记录到 $DATA_DIR/history.log 以便审计。
数据存储
- - 默认目录: ~/.local/share/container-desktop/
- 覆盖设置: 设置 CONTAINERDESKTOPDIR 环境变量可更改数据目录。
- 文件:
- history.log — 每个已执行命令的时间戳日志
- config.json — 项目级配置(由 config 命令创建)
- data.log — 通用数据日志
要求
- - Bash 4+(使用 set -euo pipefail)
- 无需外部依赖或 API 密钥
- 适用于 Linux、macOS 和 WSL
使用场景
- 1. 启动新项目 — 在编写任何代码之前,运行 container-desktop init 来搭建和初始化工作区。
- 提交前质量检查 — 在推送代码前,使用 container-desktop check 通过单个命令运行代码检查、类型检查和测试。
- 构建以部署 — 在 CI/CD 流水线或本地构建工作流中执行 container-desktop build。
- 运行测试 — 在开发或自动化流水线中使用 container-desktop test 运行完整的测试套件。
- 构建后清理 — 运行 container-desktop clean 移除生成的产物并在构建之间释放磁盘空间。
示例
bash
在当前目录中初始化项目
container-desktop init
运行所有质量检查(代码检查 + 类型检查 + 测试)
container-desktop check
构建项目
container-desktop build
运行测试套件
container-desktop test
查看部署流水线指南
container-desktop deploy
bash
检查项目健康状态
container-desktop status
生成代码模板
container-desktop template component
生成项目文档
container-desktop docs
清理构建产物
container-desktop clean
显示版本
container-desktop version
输出
所有命令输出到标准输出。如果需要,可以重定向到文件:
bash
container-desktop status > report.txt
配置
设置 CONTAINERDESKTOPDIR 来自定义数据存储位置:
bash
export CONTAINERDESKTOPDIR=/path/to/custom/dir
由 BytesAgain 提供 | bytesagain.com | hello@bytesagain.com