From 2322bbb40f839258b7ee41123c8a248ddec18496 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 07:31:47 +0000 Subject: [PATCH 1/4] chore: update readme with better instructions for installing with homebrew --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index ad8f079..eaac393 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,7 @@ It is generated with [Stainless](https://www.stainless.com/). ### Installing with Homebrew ```sh -brew tap stainless-api/tap -brew install stl +brew install stainless-api/tap/stl ``` ### Installing with Go From 40924d6fecfcd4cadd6b4baab9792fbce5eb3e48 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 07:33:02 +0000 Subject: [PATCH 2/4] fix: pin formatting for headers to always use repeat/dot formats --- pkg/cmd/flagoptions.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/flagoptions.go b/pkg/cmd/flagoptions.go index 6138616..6e63017 100644 --- a/pkg/cmd/flagoptions.go +++ b/pkg/cmd/flagoptions.go @@ -282,7 +282,11 @@ func flagOptions( } // Add header parameters - if values, err := apiquery.MarshalWithSettings(flagContents.Headers, querySettings); err != nil { + headerSettings := apiquery.QuerySettings{ + NestedFormat: apiquery.NestedQueryFormatDots, + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + } + if values, err := apiquery.MarshalWithSettings(flagContents.Headers, headerSettings); err != nil { return nil, err } else { for k, vs := range values { From e5409eb8fd0a7109dc15523b63f4cdf42d180b13 Mon Sep 17 00:00:00 2001 From: Young-jin Park Date: Fri, 20 Feb 2026 03:29:12 -0800 Subject: [PATCH 3/4] fix: don't log tty error --- pkg/cmd/build.go | 2 +- pkg/cmd/dev.go | 3 +-- pkg/cmd/init.go | 3 +-- pkg/cmd/lint.go | 3 ++- pkg/console/print.go | 19 ++++++++++++++++++- 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/pkg/cmd/build.go b/pkg/cmd/build.go index 09be974..90a0848 100644 --- a/pkg/cmd/build.go +++ b/pkg/cmd/build.go @@ -436,7 +436,7 @@ func handleBuildsCreate(ctx context.Context, cmd *cli.Command) error { Build: buildModel, WaitMode: waitMode, }) - model, err = tea.NewProgram(model).Run() + model, err = console.NewProgram(model).Run() if err != nil { console.Warn("%s", err.Error()) } diff --git a/pkg/cmd/dev.go b/pkg/cmd/dev.go index b6071fd..a42653c 100644 --- a/pkg/cmd/dev.go +++ b/pkg/cmd/dev.go @@ -13,7 +13,6 @@ import ( "strings" "time" - tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/huh" "github.com/stainless-api/stainless-api-cli/pkg/components/build" "github.com/stainless-api/stainless-api-cli/pkg/components/dev" @@ -255,7 +254,7 @@ func runDevBuild(ctx context.Context, client stainless.Client, wc workspace.Conf cmd.Bool("watch"), ) - p := tea.NewProgram(model) + p := console.NewProgram(model) finalModel, err := p.Run() if err != nil { diff --git a/pkg/cmd/init.go b/pkg/cmd/init.go index 6b24460..b296d1e 100644 --- a/pkg/cmd/init.go +++ b/pkg/cmd/init.go @@ -19,7 +19,6 @@ import ( "github.com/stainless-api/stainless-api-cli/pkg/workspace" "github.com/stainless-api/stainless-api-go/option" - tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/huh" "github.com/charmbracelet/lipgloss" "github.com/charmbracelet/x/term" @@ -432,7 +431,7 @@ func initializeWorkspace(ctx context.Context, cmd *cli.Command, client stainless WaitMode: WaitCommit, } - _, err = tea.NewProgram(model).Run() + _, err = console.NewProgram(model).Run() if err != nil { console.Warn("%s", err.Error()) } diff --git a/pkg/cmd/lint.go b/pkg/cmd/lint.go index 840e5aa..cc351dc 100644 --- a/pkg/cmd/lint.go +++ b/pkg/cmd/lint.go @@ -13,6 +13,7 @@ import ( tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" "github.com/stainless-api/stainless-api-cli/pkg/components/build" + "github.com/stainless-api/stainless-api-cli/pkg/console" "github.com/stainless-api/stainless-api-cli/pkg/workspace" "github.com/stainless-api/stainless-api-go" "github.com/urfave/cli/v3" @@ -211,7 +212,7 @@ func runLinter(ctx context.Context, cmd *cli.Command, canSkip bool) error { help: help.New(), } - p := tea.NewProgram(m, tea.WithContext(ctx)) + p := console.NewProgram(m, tea.WithContext(ctx)) // Start the diagnostics process go func() { diff --git a/pkg/console/print.go b/pkg/console/print.go index 699187d..a278bb6 100644 --- a/pkg/console/print.go +++ b/pkg/console/print.go @@ -12,8 +12,25 @@ import ( "github.com/charmbracelet/x/ansi" "github.com/logrusorgru/aurora/v4" "github.com/urfave/cli/v3" + "golang.org/x/term" ) +// NewProgram wraps tea.NewProgram with better handling for tty environments +func NewProgram(model tea.Model, opts ...tea.ProgramOption) *tea.Program { + // Always output to stderr, in case we want to also output JSON so that the json is redirectable e.g. to jq. + opts = append(opts, tea.WithOutput(os.Stderr)) + + // If not a TTY, use stdin and disable renderer + if !term.IsTerminal(int(os.Stderr.Fd())) { + opts = append(opts, + tea.WithInput(os.Stdin), + tea.WithoutRenderer(), + ) + } + + return tea.NewProgram(model, opts...) +} + // Group represents a nested logging group type Group struct { prefix string @@ -255,7 +272,7 @@ func spinnerWithIndent(indent int, message string, operation func() error) error execute: operation, } - finalModel, err := tea.NewProgram(model).Run() + finalModel, err := NewProgram(model).Run() if err != nil { return err } From 631c716eff68507193740b53fe28bbdb70e5be1b Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Wed, 25 Feb 2026 20:49:37 +0100 Subject: [PATCH 4/4] release: 0.1.0-alpha.75 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ pkg/cmd/version.go | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b476488..dc2abc3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.74" + ".": "0.1.0-alpha.75" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 95fb6a8..323dadd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.1.0-alpha.75 (2026-02-25) + +Full Changelog: [v0.1.0-alpha.74...v0.1.0-alpha.75](https://github.com/stainless-api/stainless-api-cli/compare/v0.1.0-alpha.74...v0.1.0-alpha.75) + +### Bug Fixes + +* don't log tty error ([e5409eb](https://github.com/stainless-api/stainless-api-cli/commit/e5409eb8fd0a7109dc15523b63f4cdf42d180b13)) +* pin formatting for headers to always use repeat/dot formats ([40924d6](https://github.com/stainless-api/stainless-api-cli/commit/40924d6fecfcd4cadd6b4baab9792fbce5eb3e48)) + + +### Chores + +* update readme with better instructions for installing with homebrew ([2322bbb](https://github.com/stainless-api/stainless-api-cli/commit/2322bbb40f839258b7ee41123c8a248ddec18496)) + ## 0.1.0-alpha.74 (2026-02-25) Full Changelog: [v0.1.0-alpha.73...v0.1.0-alpha.74](https://github.com/stainless-api/stainless-api-cli/compare/v0.1.0-alpha.73...v0.1.0-alpha.74) diff --git a/pkg/cmd/version.go b/pkg/cmd/version.go index b1c4ba3..8bad87e 100644 --- a/pkg/cmd/version.go +++ b/pkg/cmd/version.go @@ -2,4 +2,4 @@ package cmd -const Version = "0.1.0-alpha.74" // x-release-please-version +const Version = "0.1.0-alpha.75" // x-release-please-version