Synopsis
Manage key-value metadata pairs on packages and specific versions in Harness Artifact Registry. Metadata can be used for categorization, approval tracking, ownership, and custom tagging.Subcommands
get
Retrieve metadata
set
Add or update metadata
delete
Remove metadata
Metadata Levels
Metadata can be applied at two levels:- Package Level - Metadata applies to the entire package across all versions
- Version Level - Metadata applies to a specific version only
Use
--version flag to specify version-level metadata. Omit it for package-level metadata.Get Metadata
Retrieve metadata key-value pairs from a package or specific version.Usage
Options
Registry identifier
Package name
Specific version (optional, for version-level metadata)
Examples
Output
Displays metadata in table format:Set Metadata
Set or update metadata key-value pairs on a package or specific version.Usage
Options
Registry identifier
Package name
Metadata in
key:value,key:value formatSpecific version (optional, for version-level metadata)
Metadata Format
Metadata must be provided in comma-separatedkey:value pairs:
Examples
Output
Delete Metadata
Delete specific metadata key-value pairs from a package or version.Usage
Options
Registry identifier
Package name
Metadata to delete in
key:value,key:value formatSpecific version (optional, for version-level metadata)
Value matching required - You must provide both key and value to delete metadata. This prevents accidental deletion.
Examples
Output
Common Use Cases
Track approval status
Track approval status
Assign ownership
Assign ownership
Tag environments
Tag environments
Security scanning results
Security scanning results
Deprecation notices
Deprecation notices
Build information
Build information
Metadata Patterns
Recommended Key Naming
Use clear, consistent naming conventions:owner- Team or person responsibleapproved- Approval status (true/false)environment- Target environmentdeployed- Deployment statusscanned- Security scan statusdeprecated- Deprecation flagcritical- Business criticality
Date Format
Use ISO 8601 format for dates:Boolean Values
Use lowercasetrue/false:
Error Handling
Invalid metadata format
Invalid metadata format
key:value,key:value format with no extra spaces.Package not found
Package not found
hc artifact get.Version not found
Version not found
hc artifact get <package>.Tips
Metadata is additive - Using
set with new keys adds them to existing metadata. It doesn’t replace all metadata.See Also
- hc artifact list - List artifacts
- hc artifact get - Get artifact details
- hc artifact push - Push artifacts with metadata