Skip to content

Conversation

@coryodaniel
Copy link
Member

@coryodaniel coryodaniel commented Dec 10, 2025

This PR adds four new CLI commands to enhance artifact and artifact definition management:

  • mass artifact get - Retrieve artifact details with JSON and markdown output support
  • mass artifact download - Download artifacts in various formats (json, yaml, etc.)
  • mass definition delete - Delete artifact definitions with confirmation prompt
  • mass logs - Retrieve deployment logs for a specific deployment

New Commands

1. mass artifact get

Retrieves detailed information about artifacts including ID, name, type, specs, formats, and related package/definition information.

Features:

  • Supports both UUID and friendly slug formats for artifact identification
  • Text output (default) with formatted markdown rendering
  • JSON output via --output json flag
  • Works with both provisioned and imported artifacts

Examples:

Get artifact using UUID (imported artifacts)

mass artifact get 12345678-1234-1234-1234-123456789012

Get artifact using friendly slug (provisioned artifacts)

mass artifact get api-prod-database-connection
mass artifact get network-useast1-vpc-network -o json

2. mass artifact download

Downloads artifact data in the specified format, rendered according to the artifact definition's schema.

Features:

  • Supports multiple download formats (json, yaml, etc.)
  • Default format is JSON
  • Works with both UUID and friendly slug formats
  • Outputs directly to stdout for easy piping

Examples:

Download artifact in JSON format (default)

mass artifact download api-prod-database-connection

Download artifact in YAML format

mass artifact download network-useast1-vpc-network --format yaml

Download and save to file

mass artifact download 12345678-1234-1234-1234-123456789012 -f json > artifact.json

3. mass definition delete

Permanently deletes artifact definitions from Massdriver.

Features:

  • Requires typing the definition name to confirm (safety measure)
  • Supports --force flag to skip confirmation (useful for automation)
  • Validates that definition is not in use before deletion
  • Requires administrator permissions

Examples:

Delete with confirmation prompt

mass definition delete aws-s3

Delete without confirmation

mass definition delete my-org/aws-s3 --force

4. mass logs

Retrieves and outputs the log stream for a specific deployment.

Features:

  • Outputs logs to stdout in their original format
  • Works with deployment UUIDs
  • Can be piped to files for saving logs
  • Dumps all available logs (does not support tailing/following)

Examples:

Get logs for a deployment

mass logs 12345678-1234-1234-1234-123456789012

Pipe logs to a file

mass logs 12345678-1234-1234-1234-123456789012 > deployment.log

Artifact ID Formats

Both artifact get and artifact download support two artifact identification formats:

  • UUID: Required for imported artifacts (e.g., 12345678-1234-1234-1234-123456789012)
  • Friendly slug: Available for provisioned artifacts (e.g., api-prod-database-connection)

Friendly slug format: PROJECT_SLUG-ENVIRONMENT_SLUG-MANIFEST_SLUG-BUNDLE_ARTIFACT_FIELD_NAME

Breaking Changes

None. The DownloadArtifact function signature change is backward compatible as existing callers can pass "json" as the format parameter.

Documentation

  • Added helpdocs for all four commands
  • Added markdown template for artifact get text output
  • Updated main artifact and definition helpdocs to list new commands
  • Added command examples in code

@coryodaniel coryodaniel marked this pull request as draft December 15, 2025 21:08
@coryodaniel coryodaniel force-pushed the artifact-cli-cmd-batch branch from c0e519e to 827093a Compare December 15, 2025 22:18
@coryodaniel coryodaniel marked this pull request as ready for review December 15, 2025 22:18
@coryodaniel coryodaniel merged commit d768cc4 into main Dec 15, 2025
3 of 4 checks passed
@coryodaniel coryodaniel deleted the artifact-cli-cmd-batch branch December 15, 2025 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants