growthbook / growthbook/cli

`--usage` KDL schema advertises the dropped `table` format and a stale version

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

Description

## Bug

`--usage` (the KDL schema) still advertises the `table` output format even though it's disabled (#19) and dropped from `--help`. On the same line it also reports `version "1.1.x"` — the spec `info.version`, without the release's `-next.N` prerelease suffix.

## Root cause (Speakeasy)

The `--usage` KDL is a static generated string map (`internal/usage/schema.go`). The output-format flag help (`Specify the output format. Options: pretty, json, yaml, table, toon.`) is a Speakeasy built-in default baked into the KDL at generation time — our runtime `--help` override (`custom_startup.go`) doesn't reach it. The version is the spec `info.version`, not the built binary version.

## Stopgap fix

**None shippable.** A data-line patch conflicts on **every** version bump: the `table` string and `version "..."` sit on the same single ~260 KB KDL line, so any regen/bump breaks the patch (confirmed during #23 — the patch had to be dropped).

**To retire:** needs an upstream fix — make the built-in output-format help configurable (or have it respect formats disabled via the CLI), and/or expose the KDL flag help/version so a patch can target stable context.

## Refs

- Related: #19 (`-o table` dropped as stopgap).
- Upstream: file to speakeasy-api/speakeasy (generated `--usage` KDL schema; built-in output-format help default).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with internal/usage/schema.go and custom_startup.go to confirm how the generated KDL and runtime help differ. Then investigate the upstream Speakeasy generated --usage schema and its output-format help and version handling. Done means the upstream behavior can reflect disabled formats and the binary's prerelease version without a fragile generated-line patch.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.