feat: Add "coder" CLI (#221)

* feat: Add "coder" CLI

* Add CLI test for login

* Add "bin/coder" target to Makefile

* Update promptui to fix race

* Fix error scope

* Don't run CLI tests on Windows

* Fix requested changes
This commit is contained in:
Kyle Carberry
2022-02-10 08:33:27 -06:00
committed by GitHub
parent 277318bdb4
commit 07fe5ced68
24 changed files with 921 additions and 7 deletions

30
cli/projects.go Normal file
View File

@ -0,0 +1,30 @@
package cli
import (
"github.com/fatih/color"
"github.com/spf13/cobra"
)
func projects() *cobra.Command {
cmd := &cobra.Command{
Use: "projects",
Long: "Testing something",
Example: `
- Create a project for developers to create workspaces
` + color.New(color.FgHiMagenta).Sprint("$ coder projects create") + `
- Make changes to your project, and plan the changes
` + color.New(color.FgHiMagenta).Sprint("$ coder projects plan <name>") + `
- Update the project. Your developers can update their workspaces
` + color.New(color.FgHiMagenta).Sprint("$ coder projects update <name>"),
}
cmd.AddCommand(projectCreate())
cmd.AddCommand(projectPlan())
cmd.AddCommand(projectUpdate())
return cmd
}