growthbook / growthbook/cli

Ungrouped command examples double the binary name (growthbook growthbook <cmd>)

Open Beginner friendly
#29 0 comments 0 reactions 0 assignees View on GitHub
bug custom
Dominant language
Go
Stars
1
Forks
0
Avg merge
1d 5h
Merged PRs (30d)
18

Description

## Bug

Top-level (ungrouped) commands generate examples that double the binary name:

```
growthbook growthbook get-SDK-payload --key
growthbook growthbook post-copy-transform --visual-changeset-id ...
```

## Root cause (Speakeasy)

For operations with no command group, the example template prefixes both the app name and the binary name — both `growthbook` — yielding the doubled prefix.

## Stopgap fix (retire when upstream is fixed)

`.speakeasy/patches/internal/cli/getsdkpayload.go.patch` and `.../postcopytransform.go.patch`: fix the two `Example` strings.

**To retire:** once the generator stops doubling the name for ungrouped ops, drop both patches. NOTE: any *new* ungrouped operation will reproduce the bug and need its own patch until the generator is fixed.

## Refs

- Introduced by #23
- Upstream: file to speakeasy-api/speakeasy (example generation for ungrouped operations).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with .speakeasy/patches/internal/cli/getsdkpayload.go.patch and postcopytransform.go.patch, focusing on the two Example strings. Confirm how the ungrouped command examples are currently formed, then ensure each shows only one growthbook prefix for get-SDK-payload and post-copy-transform. The work is done when both examples no longer duplicate the binary name; retain the patches until the upstream generator is fixed.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.