From e35a2cf32fe6bcbe1e81392c3ab03f6b4a8cf59f Mon Sep 17 00:00:00 2001 From: ryank90 Date: Fri, 25 Sep 2026 22:59:50 +0100 Subject: [PATCH 1/2] docs: mention serverless on root --help README and the generated SEE ALSO list already include serverless; root Long still read as inference-only. --- docs/runware.md | 2 +- internal/cmd/root.go | 2 +- internal/cmd/root_test.go | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 internal/cmd/root_test.go 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..96eb499 --- /dev/null +++ b/internal/cmd/root_test.go @@ -0,0 +1,13 @@ +package cmd + +import ( + "strings" + "testing" +) + +func TestRootLongMentionsServerless(t *testing.T) { + cmd := NewRootCmd(newLogger()) + if !strings.Contains(cmd.Long, "serverless") { + t.Fatalf("root Long does not mention serverless:\n%s", cmd.Long) + } +} From b8a8b247e4fe5ca561c59b835f97e198421b3fa3 Mon Sep 17 00:00:00 2001 From: ryank90 Date: Mon, 28 Sep 2026 09:46:23 +0100 Subject: [PATCH 2/2] test: keep root help in sync with the README blurb --- internal/cmd/root_test.go | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/internal/cmd/root_test.go b/internal/cmd/root_test.go index 96eb499..b6411ac 100644 --- a/internal/cmd/root_test.go +++ b/internal/cmd/root_test.go @@ -1,13 +1,30 @@ package cmd import ( + "os" + "path/filepath" "strings" "testing" ) -func TestRootLongMentionsServerless(t *testing.T) { +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, "serverless") { - t.Fatalf("root Long does not mention serverless:\n%s", cmd.Long) + if !strings.Contains(cmd.Long, blurb) { + t.Fatalf("root Long drifted from README:\nLong:\n%s\nREADME:\n%s", cmd.Long, blurb) } }