Skip to content

Remove stainless generated endpoints#35

Merged
sjmiller609 merged 2 commits intomainfrom
remove-auto-gen-stainless
Feb 11, 2026
Merged

Remove stainless generated endpoints#35
sjmiller609 merged 2 commits intomainfrom
remove-auto-gen-stainless

Conversation

@sjmiller609
Copy link
Contributor

@sjmiller609 sjmiller609 commented Feb 11, 2026

Moving away from using Stainless for CLI gen


Note

Medium Risk
Moderate risk because it removes large chunks of command surface area and request/flag encoding code, which can break existing CLI workflows and integrations even though the remaining changes are mostly build/metadata related.

Overview
Removes the Stainless-generated CLI surface area (e.g. health, images, instances, volumes, ingresses) and the supporting request plumbing (internal/apiform, internal/apiquery, internal/requestflag, plus flagOptions and other generated helpers), leaving only the hand-written command set.

Updates version handling to be build-time overridable via GoReleaser ldflags (now targeting pkg/cmd.version), with a runtime fallback that derives a dev-friendly version from module semver tags or VCS revision, and customizes --version output formatting. Also drops Stainless-specific request headers and removes the .stats.yml generation artifact and go-yaml dependency.

Written by Cursor Bugbot for commit 5ba4a32. This will update automatically on new commits. Configure here.

@sjmiller609 sjmiller609 requested a review from rgarcia February 11, 2026 21:28
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

option.WithHeader("X-Stainless-Lang", "cli"),
option.WithHeader("X-Stainless-Package-Version", Version),
option.WithHeader("X-Stainless-Runtime", "cli"),
option.WithHeader("X-Stainless-CLI-Command", cmd.FullName()),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function isInputPiped is now unused dead code

Low Severity

The isInputPiped() function in cmdutil.go is now dead code. Its only caller was in flagoptions.go, which was deleted in this PR. A grep confirms the function is defined but never referenced anywhere else in the codebase.

Fix in Cursor Fix in Web

"github.com/urfave/cli/v3"
)

var imagesCreate = cli.Command{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i assume this and others will be reborn in a follow up?

also random but i'd really like an "images rm"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and I'm curious what will happen with the from-sdk generator PR after this

@sjmiller609 sjmiller609 merged commit e9bf46c into main Feb 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants