Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/runware.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
30 changes: 30 additions & 0 deletions internal/cmd/root_test.go
Original file line number Diff line number Diff line change
@@ -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)
}
}
Loading