AgentSkillsCN

agentuity-cli-cloud-sandbox-snapshot-build

从声明式文件构建快照。需要身份验证。适用于 Agentuity 云平台运维。

SKILL.md
--- frontmatter
name: agentuity-cli-cloud-sandbox-snapshot-build
description: Build a snapshot from a declarative file. Requires authentication. Use for Agentuity cloud platform operations
version: "0.1.24"
license: Apache-2.0
allowed-tools: "Bash(agentuity:*)"
argument-hint: "<directory>"
metadata:
  command: "agentuity cloud sandbox snapshot build"
  tags: "slow requires-auth"

Cloud Sandbox Snapshot Build

Build a snapshot from a declarative file

Prerequisites

  • Authenticated with agentuity auth login
  • Organization context required (--org-id or default org)

Usage

bash
agentuity cloud sandbox snapshot build <directory> [options]

Arguments

ArgumentTypeRequiredDescription
<directory>stringYes-

Options

OptionTypeRequiredDefaultDescription
--filestringYes-Path to build file (defaults to agentuity-snapshot.[json
--envarrayYes-Environment variable substitution (KEY=VALUE)
--namestringYes-Snapshot name (overrides build file)
--tagstringYes-Snapshot tag (defaults to "latest")
--descriptionstringYes-Snapshot description (overrides build file)
--messagestringYes-Build message for this snapshot
--commitstringYes-Git commit SHA (auto-detected if not provided)
--branchstringYes-Git branch (auto-detected if not provided)
--repostringYes-Git repo URL (auto-detected if not provided)
--providerstringYes-Git provider (github, gitlab, bitbucket - auto-detected)
--commitUrlstringYes-URL to the commit
--metadataarrayYes-Metadata key-value pairs (KEY=VALUE)
--forcebooleanYes-Force rebuild even if content is unchanged
--publicbooleanYes-Make snapshot public (enables virus scanning, no encryption)
--confirmbooleanYes-Confirm public snapshot publishing (required for --public)

Examples

Build a snapshot from the current directory using agentuity-snapshot.yaml:

bash
bunx @agentuity/cli cloud sandbox snapshot build .

Build using a custom build file:

bash
bunx @agentuity/cli cloud sandbox snapshot build ./project --file custom-build.yaml

Build with environment variable substitution and custom tag:

bash
bunx @agentuity/cli cloud sandbox snapshot build . --env API_KEY=secret --tag production

Validate the build file without uploading:

bash
bunx @agentuity/cli cloud sandbox snapshot build . --dry-run

Force rebuild even if content is unchanged:

bash
bunx @agentuity/cli cloud sandbox snapshot build . --force

Output

Returns JSON object:

json
{
  "snapshotId": "string",
  "name": "string",
  "tag": "unknown",
  "runtime": "string",
  "sizeBytes": "number",
  "fileCount": "number",
  "createdAt": "string",
  "unchanged": "boolean",
  "userMetadata": "object",
  "error": "string",
  "malwareDetected": "boolean",
  "virusName": "string"
}
FieldTypeDescription
snapshotIdstringSnapshot ID
namestringSnapshot name
tagunknownSnapshot tag
runtimestringRuntime identifier
sizeBytesnumberSnapshot size in bytes
fileCountnumberNumber of files in snapshot
createdAtstringSnapshot creation timestamp
unchangedbooleanTrue if snapshot was unchanged
userMetadataobjectUser-defined metadata key-value pairs
errorstringError message if build failed
malwareDetectedbooleanTrue if malware was detected
virusNamestringName of detected virus