mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
38 lines
854 B
Go
38 lines
854 B
Go
package cli
|
|
|
|
import (
|
|
"github.com/fatih/color"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func templates() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "templates",
|
|
Short: "Create, manage, and deploy templates",
|
|
Aliases: []string{"template"},
|
|
Example: `
|
|
- Create a template for developers to create workspaces
|
|
|
|
` + color.New(color.FgHiMagenta).Sprint("$ coder templates create") + `
|
|
|
|
- Make changes to your template, and plan the changes
|
|
|
|
` + color.New(color.FgHiMagenta).Sprint("$ coder templates plan <name>") + `
|
|
|
|
- Update the template. Your developers can update their workspaces
|
|
|
|
` + color.New(color.FgHiMagenta).Sprint("$ coder templates update <name>"),
|
|
}
|
|
cmd.AddCommand(
|
|
templateCreate(),
|
|
templateEdit(),
|
|
templateInit(),
|
|
templateList(),
|
|
templatePlan(),
|
|
templateUpdate(),
|
|
templateVersions(),
|
|
)
|
|
|
|
return cmd
|
|
}
|