---
title: thv export
hide_title: true
description: Reference for ToolHive CLI command `thv export`
last_update:
  author: autogenerated
slug: thv_export
mdx:
  format: md
---

## thv export

Export a workload's run configuration to a file

### Synopsis

Export a workload's run configuration to a file for sharing or backup.

The exported configuration can be used with 'thv run --from-config <path>' to recreate
the same workload with identical settings.

You can export in different formats:
- json: Export as RunConfig JSON (default, can be used with 'thv run --from-config')
- k8s: Export as Kubernetes MCPServer resource YAML

Examples:

	# Export a workload configuration to a JSON file
	thv export my-server ./my-server-config.json

	# Export as Kubernetes MCPServer resource
	thv export my-server ./my-server.yaml --format k8s

	# Export to a specific directory
	thv export github-mcp /tmp/configs/github-config.json

```
thv export <workload name> <path> [flags]
```

### Options

```
      --format string   Export format: json or k8s (default "json")
  -h, --help            help for export
```

### Options inherited from parent commands

```
      --debug   Enable debug mode
```

### SEE ALSO

* [thv](thv.md)	 - ToolHive (thv) is a lightweight, secure, and fast manager for MCP servers

