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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.72"
".": "0.1.0-alpha.73"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 21
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-acfed4185515b0f9bfdb9b080df219b3bea1069daeb722d589564aa7d8eb32e6.yml
openapi_spec_hash: 0fb1197c07e1f354f33d96c384e3ca3b
config_hash: eea7be44f19f72b6b9ae93f47dd63f79
configured_endpoints: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-c05bce23f6a3478a1803494b2c627e0bbf73917a849756eddc42f4607e167c6b.yml
openapi_spec_hash: b9eb999620220d15b176f815f21a67ba
config_hash: 977c436868252591d86546b2127ab8ce
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 0.1.0-alpha.73 (2026-02-20)

Full Changelog: [v0.1.0-alpha.72...v0.1.0-alpha.73](https://github.com/stainless-api/stainless-api-cli/compare/v0.1.0-alpha.72...v0.1.0-alpha.73)

### Features

* **api:** add a super basic GET /v0/user endpoint ([84c3559](https://github.com/stainless-api/stainless-api-cli/commit/84c3559be8e2d3a322db4f72a4f77ffeee030d8c))
* **api:** manual updates ([81595c3](https://github.com/stainless-api/stainless-api-cli/commit/81595c30b3f24ae68951ad66c05a20a556395902))
* **api:** manual updates ([2aa45b8](https://github.com/stainless-api/stainless-api-cli/commit/2aa45b852b865f4af42b47d430e67dd1f6c45809))
* **api:** manual updates ([a3ab921](https://github.com/stainless-api/stainless-api-cli/commit/a3ab921d6ed19120d0a7f0a37574c3476f9282a7))
* make --wait configurable with error handling ([53bffdf](https://github.com/stainless-api/stainless-api-cli/commit/53bffdf8c25250bc35e3747a87c3db536abcb388))
* make --wait configurable with error handling ([#171](https://github.com/stainless-api/stainless-api-cli/issues/171)) ([b02c3e3](https://github.com/stainless-api/stainless-api-cli/commit/b02c3e38c0b8e2b6465a3edce475207e383ea4da))


### Chores

* **internal:** remove mock server code ([6040746](https://github.com/stainless-api/stainless-api-cli/commit/60407467a68e98b08f9920479b3e012b45023690))
* update mock server docs ([7b64f39](https://github.com/stainless-api/stainless-api-cli/commit/7b64f39fb5bede6621a07f6307d0a976073ab71e))

## 0.1.0-alpha.72 (2026-02-17)

Full Changelog: [v0.1.0-alpha.71...v0.1.0-alpha.72](https://github.com/stainless-api/stainless-api-cli/compare/v0.1.0-alpha.71...v0.1.0-alpha.72)
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ require (
github.com/logrusorgru/aurora/v4 v4.0.0
github.com/muesli/reflow v0.3.0
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/stainless-api/stainless-api-go v0.27.1
github.com/stainless-api/stainless-api-go v0.29.0
github.com/stretchr/testify v1.11.1
github.com/tidwall/gjson v1.18.0
github.com/tidwall/pretty v1.2.1
github.com/tidwall/sjson v1.2.5
github.com/urfave/cli-docs/v3 v3.1.0
github.com/urfave/cli/v3 v3.6.2
golang.org/x/mod v0.32.0
golang.org/x/sys v0.40.0
golang.org/x/term v0.39.0
golang.org/x/text v0.33.0
Expand Down Expand Up @@ -62,7 +63,6 @@ require (
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/yuin/goldmark v1.7.16 // indirect
github.com/yuin/goldmark-emoji v1.0.6 // indirect
golang.org/x/mod v0.32.0 // indirect
golang.org/x/net v0.49.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/stainless-api/stainless-api-go v0.27.1 h1:HozHUev0ZLIHUKL/ttw9fWl5zGSNosYbsmT2JGxdT7c=
github.com/stainless-api/stainless-api-go v0.27.1/go.mod h1:vssVkp6bgBKxXtnvHVnQvGNMHbn36zdkz80NMHIgXKM=
github.com/stainless-api/stainless-api-go v0.29.0 h1:j86SAGkNZmLrm6M/LAZiPw2FiP3pVqnoC4yMQ3X4Lxc=
github.com/stainless-api/stainless-api-go v0.29.0/go.mod h1:vssVkp6bgBKxXtnvHVnQvGNMHbn36zdkz80NMHIgXKM=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
Expand Down
4 changes: 0 additions & 4 deletions pkg/cmd/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
)

func TestBuildsCreate(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"builds", "create",
Expand Down Expand Up @@ -55,7 +54,6 @@ func TestBuildsCreate(t *testing.T) {
}

func TestBuildsRetrieve(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"builds", "retrieve",
Expand All @@ -64,7 +62,6 @@ func TestBuildsRetrieve(t *testing.T) {
}

func TestBuildsList(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"builds", "list",
Expand All @@ -77,7 +74,6 @@ func TestBuildsList(t *testing.T) {
}

func TestBuildsCompare(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"builds", "compare",
Expand Down
1 change: 0 additions & 1 deletion pkg/cmd/builddiagnostic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
)

func TestBuildsDiagnosticsList(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"builds:diagnostics", "list",
Expand Down
1 change: 0 additions & 1 deletion pkg/cmd/buildtargetoutput_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
)

func TestBuildsTargetOutputsRetrieve(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"builds:target-outputs", "retrieve",
Expand Down
8 changes: 8 additions & 0 deletions pkg/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ stl builds create --branch <branch>`,

&lintCommand,

{
Name: "user",
Category: "API RESOURCE",
Suggest: true,
Commands: []*cli.Command{
&userRetrieve,
},
},
{
Name: "@manpages",
Usage: "Generate documentation for 'man'",
Expand Down
2 changes: 0 additions & 2 deletions pkg/cmd/org_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
)

func TestOrgsRetrieve(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"orgs", "retrieve",
Expand All @@ -18,7 +17,6 @@ func TestOrgsRetrieve(t *testing.T) {
}

func TestOrgsList(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"orgs", "list",
Expand Down
5 changes: 0 additions & 5 deletions pkg/cmd/project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
)

func TestProjectsCreate(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects", "create",
Expand All @@ -22,7 +21,6 @@ func TestProjectsCreate(t *testing.T) {
}

func TestProjectsRetrieve(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects", "retrieve",
Expand All @@ -31,7 +29,6 @@ func TestProjectsRetrieve(t *testing.T) {
}

func TestProjectsUpdate(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects", "update",
Expand All @@ -41,7 +38,6 @@ func TestProjectsUpdate(t *testing.T) {
}

func TestProjectsList(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects", "list",
Expand All @@ -52,7 +48,6 @@ func TestProjectsList(t *testing.T) {
}

func TestProjectsGenerateCommitMessage(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects", "generate-commit-message",
Expand Down
6 changes: 0 additions & 6 deletions pkg/cmd/projectbranch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
)

func TestProjectsBranchesCreate(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects:branches", "create",
Expand All @@ -21,7 +20,6 @@ func TestProjectsBranchesCreate(t *testing.T) {
}

func TestProjectsBranchesRetrieve(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects:branches", "retrieve",
Expand All @@ -31,7 +29,6 @@ func TestProjectsBranchesRetrieve(t *testing.T) {
}

func TestProjectsBranchesList(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects:branches", "list",
Expand All @@ -42,7 +39,6 @@ func TestProjectsBranchesList(t *testing.T) {
}

func TestProjectsBranchesDelete(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects:branches", "delete",
Expand All @@ -52,7 +48,6 @@ func TestProjectsBranchesDelete(t *testing.T) {
}

func TestProjectsBranchesRebase(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects:branches", "rebase",
Expand All @@ -63,7 +58,6 @@ func TestProjectsBranchesRebase(t *testing.T) {
}

func TestProjectsBranchesReset(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects:branches", "reset",
Expand Down
2 changes: 0 additions & 2 deletions pkg/cmd/projectconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
)

func TestProjectsConfigsRetrieve(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects:configs", "retrieve",
Expand All @@ -20,7 +19,6 @@ func TestProjectsConfigsRetrieve(t *testing.T) {
}

func TestProjectsConfigsGuess(t *testing.T) {
t.Skip("Prism tests are disabled")
mocktest.TestRunMockTestWithFlags(
t,
"projects:configs", "guess",
Expand Down
56 changes: 56 additions & 0 deletions pkg/cmd/user.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

package cmd

import (
"context"
"fmt"
"os"

"github.com/stainless-api/stainless-api-cli/internal/apiquery"
"github.com/stainless-api/stainless-api-go"
"github.com/stainless-api/stainless-api-go/option"
"github.com/tidwall/gjson"
"github.com/urfave/cli/v3"
)

var userRetrieve = cli.Command{
Name: "retrieve",
Usage: "Retrieve the currently authenticated user's information.",
Suggest: true,
Flags: []cli.Flag{},
Action: handleUserRetrieve,
HideHelpCommand: true,
}

func handleUserRetrieve(ctx context.Context, cmd *cli.Command) error {
client := stainless.NewClient(getDefaultRequestOptions(cmd)...)
unusedArgs := cmd.Args().Slice()

if len(unusedArgs) > 0 {
return fmt.Errorf("Unexpected extra arguments: %v", unusedArgs)
}

options, err := flagOptions(
cmd,
apiquery.NestedQueryFormatBrackets,
apiquery.ArrayQueryFormatComma,
EmptyBody,
false,
)
if err != nil {
return err
}

var res []byte
options = append(options, option.WithResponseBodyInto(&res))
_, err = client.User.Get(ctx, options...)
if err != nil {
return err
}

obj := gjson.ParseBytes(res)
format := cmd.Root().String("format")
transform := cmd.Root().String("transform")
return ShowJSON(os.Stdout, "user retrieve", obj, format, transform)
}
16 changes: 16 additions & 0 deletions pkg/cmd/user_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

package cmd

import (
"testing"

"github.com/stainless-api/stainless-api-cli/internal/mocktest"
)

func TestUserRetrieve(t *testing.T) {
mocktest.TestRunMockTestWithFlags(
t,
"user", "retrieve",
)
}
2 changes: 1 addition & 1 deletion pkg/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package cmd

const Version = "0.1.0-alpha.72" // x-release-please-version
const Version = "0.1.0-alpha.73" // x-release-please-version
Loading