MCPcopy Index your code
hub / github.com/coder/coder / secrets

Method secrets

cli/secret.go:18–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16)
17
18func (r *RootCmd) secrets() *serpent.Command {
19 cmd := &serpent.Command{
20 Use: "secret",
21 Aliases: []string{"secrets"},
22 Short: "Manage secrets",
23 Long: FormatExamples(
24 Example{
25 Description: "Create a secret",
26 Command: "printf %s \"$MYCLI_API_KEY\" | coder secret create api-key --description \"API key for workspace tools\" --env API_KEY --file \"~/.api-key\"",
27 },
28 Example{
29 Description: "Update a secret",
30 Command: "echo -n \"$NEW_SECRET_VALUE\" | coder secret update api-key --description \"Rotated API key\" --env API_KEY --file \"~/.api-key\"",
31 },
32 Example{
33 Description: "List your secrets",
34 Command: "coder secret list",
35 },
36 Example{
37 Description: "Show a specific secret",
38 Command: "coder secret list api-key",
39 },
40 Example{
41 Description: "Delete a secret",
42 Command: "coder secret delete api-key",
43 },
44 ),
45 Handler: func(inv *serpent.Invocation) error {
46 return inv.Command.HelpHandler(inv)
47 },
48 Children: []*serpent.Command{
49 r.secretCreate(),
50 r.secretUpdate(),
51 r.secretList(),
52 r.secretDelete(),
53 },
54 }
55
56 return cmd
57}
58
59func (r *RootCmd) secretCreate() *serpent.Command {
60 var (

Callers 1

CoreSubcommandsMethod · 0.95

Calls 5

secretCreateMethod · 0.95
secretUpdateMethod · 0.95
secretListMethod · 0.95
secretDeleteMethod · 0.95
FormatExamplesFunction · 0.85

Tested by

no test coverage detected