diff --git a/docs/runware.md b/docs/runware.md index de30215..d3dd448 100644 --- a/docs/runware.md +++ b/docs/runware.md @@ -5,7 +5,7 @@ CLI tool for the Runware API ### Synopsis A command-line tool for interacting with the Runware API. -Run image generation, video generation, audio generation, 3D, upscaling, background removal, captioning, search models, and more. +Run image generation, video generation, audio generation, 3D, upscaling, background removal, captioning, search models, deploy serverless applications, and more. Use of Runware services is subject to our Terms of Service (https://runware.ai/terms) and Privacy Policy (https://runware.ai/privacy). diff --git a/internal/cmd/root.go b/internal/cmd/root.go index d2583b5..08fb977 100644 --- a/internal/cmd/root.go +++ b/internal/cmd/root.go @@ -43,7 +43,7 @@ func NewRootCmd(logger *log.Logger) *cobra.Command { Use: "runware", Short: "CLI tool for the Runware API", Long: `A command-line tool for interacting with the Runware API. -Run image generation, video generation, audio generation, 3D, upscaling, background removal, captioning, search models, and more. +Run image generation, video generation, audio generation, 3D, upscaling, background removal, captioning, search models, deploy serverless applications, and more. Use of Runware services is subject to our Terms of Service (https://runware.ai/terms) and Privacy Policy (https://runware.ai/privacy).`, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { diff --git a/internal/cmd/root_test.go b/internal/cmd/root_test.go new file mode 100644 index 0000000..b6411ac --- /dev/null +++ b/internal/cmd/root_test.go @@ -0,0 +1,30 @@ +package cmd + +import ( + "os" + "path/filepath" + "strings" + "testing" +) + +func TestRootLongMatchesReadme(t *testing.T) { + readme, err := os.ReadFile(filepath.Join("..", "..", "README.md")) + if err != nil { + t.Fatalf("read README: %v", err) + } + const prefix = "Run image generation" + var blurb string + for _, line := range strings.Split(string(readme), "\n") { + if strings.HasPrefix(line, prefix) { + blurb = line + break + } + } + if blurb == "" { + t.Fatalf("README has no opening description starting with %q", prefix) + } + cmd := NewRootCmd(newLogger()) + if !strings.Contains(cmd.Long, blurb) { + t.Fatalf("root Long drifted from README:\nLong:\n%s\nREADME:\n%s", cmd.Long, blurb) + } +}