# metalcloud-cli os-template update Update an existing OS template ## Synopsis Update an existing OS template with new configuration. This command updates an OS template by reading the updated configuration from a file or from standard input. You can update the template properties as well as add, update, or delete template assets. Required arguments: os_template_id The numeric ID of the template to update Required flags: --config-source Source of the template update configuration (required) Can be 'pipe' to read from stdin, or path to a JSON file The JSON configuration should include: - template: OS template update data (optional) - newTemplateAssets: Array of new assets to add (optional) - updatedTemplateAssets: Map of asset ID to updated asset data (optional) - deletedTemplateAssetIds: Array of asset IDs to delete (optional) Examples: ## Update template from file metalcloud-cli os-template update 123 --config-source update.json ## Update template from stdin cat update.json | metalcloud-cli os-template update 123 --config-source pipe ## Update only template properties (no assets) echo '{"template":{"name":"New Name"}}' | metalcloud-cli os-template update 123 --config-source pipe ``` metalcloud-cli os-template update [flags] ``` ### Options ``` --config-source string Source of the OS template configuration updates. Can be 'pipe' or path to a JSON file. -h, --help help for update ``` ### Options inherited from parent commands ``` -k, --api_key string MetalCloud API key -c, --config string Config file path -d, --debug Set to enable debug logging -e, --endpoint string MetalCloud API endpoint -f, --format string Output format. Supported values are 'text','csv','md','json','yaml'. (default "text") -i, --insecure_skip_verify Set to allow insecure transport -l, --log_file string Log file path -v, --verbosity string Log level verbosity (default "INFO") ``` ### SEE ALSO * [metalcloud-cli os-template](/content/configuration/cli/metalcloud-cli_os-template.md) - Manage OS templates for server deployments #### Auto generated by spf13/cobra on 11-Aug-2025