Skip to content
Closed
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 .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
release_doctor:
name: release doctor
runs-on: ubuntu-latest
if: github.repository == 'stainless-sdks/cerca-cli' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
if: github.repository == 'matrices/cerca-cli' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v6
Expand Down
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.0.1"
".": "0.1.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 66
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/calvinfo-o4h6u5%2Fcerca-1ca6943fcf7d9c2630357db20c3d1eb4495d4ecab907f4e20f62508175b8ae5c.yml
openapi_spec_hash: 9c2f51f5495c1b592e96a9e0c9969f46
config_hash: 9105f134a32978d1d1bfd7c6b30c2a3b
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/calvinfo-o4h6u5/cerca-6338f21488a9e712e2f5cf43b2687c51c88c4b11c05239bc1aa86db643417b74.yml
openapi_spec_hash: e8825a4209dfbf533407eef182184acf
config_hash: d55df93567c0e09fea6827066eeb10c1
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Changelog

## 0.1.0 (2026-04-30)

Full Changelog: [v0.0.1...v0.1.0](https://github.com/matrices/cerca-cli/compare/v0.0.1...v0.1.0)

### Features

* **api:** manual updates ([7806afd](https://github.com/matrices/cerca-cli/commit/7806afd2cb58f1438f6aca04476ac95ae07daf39))
* support passing path and query params over stdin ([67a8c65](https://github.com/matrices/cerca-cli/commit/67a8c655fe8e124855d5c73332063d477a627cad))


### Bug Fixes

* **cli:** correctly load zsh autocompletion ([b20f691](https://github.com/matrices/cerca-cli/commit/b20f6914f3ad282d91a18bf7557a693e5944a5d5))
* flags for nullable body scalar fields are strictly typed ([88408b9](https://github.com/matrices/cerca-cli/commit/88408b9360bfaab9ef94198b1c6bf81897c86aec))


### Chores

* configure new SDK language ([ee21394](https://github.com/matrices/cerca-cli/commit/ee2139491a83fa2aec8d66305839ec8fd274de5d))
* configure new SDK language ([a5f666b](https://github.com/matrices/cerca-cli/commit/a5f666bd240a8f0471b410c17e5ec7a93ba9b428))
* configure new SDK language ([8a2d277](https://github.com/matrices/cerca-cli/commit/8a2d277426b9b83d9d4b0ab6ce7c76d9447d5f7d))
* update SDK settings ([8254e9b](https://github.com/matrices/cerca-cli/commit/8254e9b96718b206c4b067528e93365fdb79f89a))
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ The official CLI for the [Cerca REST API](https://docs.cerca.dev).

It is generated with [Stainless](https://www.stainless.com/).

<!-- x-release-please-start-version -->

## Installation

### Installing with Go

To test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.

```sh
go install 'github.com/stainless-sdks/cerca-cli/cmd/cerca@latest'
go install 'github.com/matrices/cerca-cli/cmd/cerca@latest'
```

Once you have run `go install`, the binary is placed in your Go bin directory:
Expand All @@ -26,6 +28,8 @@ If commands aren't found after installation, add the Go bin directory to your PA
export PATH="$PATH:$(go env GOPATH)/bin"
```

<!-- x-release-please-end -->

### Running Locally

After cloning the git repository for this project, you can use the
Expand Down
2 changes: 1 addition & 1 deletion cmd/cerca/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"os"
"slices"

"github.com/matrices/cerca-cli/pkg/cmd"
"github.com/matrices/cerca-go"
"github.com/stainless-sdks/cerca-cli/pkg/cmd"
"github.com/tidwall/gjson"
"github.com/urfave/cli/v3"
)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/stainless-sdks/cerca-cli
module github.com/matrices/cerca-cli

go 1.25

Expand Down
14 changes: 12 additions & 2 deletions internal/autocomplete/shellscripts/zsh_autocomplete.zsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/zsh
compdef ____APPNAME___zsh_autocomplete __APPNAME__
#compdef __APPNAME__

____APPNAME___zsh_autocomplete() {

Expand Down Expand Up @@ -44,3 +43,14 @@ ____APPNAME___zsh_autocomplete() {
;;
esac
}

# When installed in fpath (e.g., via Homebrew's zsh_completion stanza), this file
# is autoloaded as the function ___APPNAME__ and its body becomes that function's
# body. Detect that case via funcstack and dispatch to the completion function.
# When sourced (e.g., `source <(__APPNAME__ @completion zsh)`), register the
# function with compdef instead.
if [[ "${funcstack[1]}" = "___APPNAME__" ]]; then
____APPNAME___zsh_autocomplete "$@"
else
compdef ____APPNAME___zsh_autocomplete __APPNAME__
fi
16 changes: 15 additions & 1 deletion internal/requestflag/innerflag.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import (
type InnerFlag[
T []any | []map[string]any | []DateTimeValue | []DateValue | []TimeValue | []string |
[]float64 | []int64 | []bool | any | map[string]any | DateTimeValue | DateValue | TimeValue |
string | float64 | int64 | bool,
string | float64 | int64 | bool |
*string | *float64 | *int64 | *bool | *DateTimeValue | *DateValue | *TimeValue,
] struct {
Name string // name of the flag
DefaultText string // default text of the flag for usage purposes
Expand All @@ -25,6 +26,12 @@ type InnerFlag[
OuterFlag cli.Flag // The flag on which this inner flag will set values
InnerField string // The inner field which this flag will set
DataAliases []string // alternate names recognized in YAML values passed as the outer flag

// OuterIsArrayOfObjects tells an untyped outer flag (Flag[any], used for nullable
// complex schemas) to seed its underlying value as []map[string]any rather than
// map[string]any before SetInnerField runs. The hint is ignored for typed outer
// flags whose zero value already carries a dispatchable reflect.Kind.
OuterIsArrayOfObjects bool
}

// GetDataAliases returns the aliases recognized when parsing inner field keys from piped or flag YAML.
Expand Down Expand Up @@ -76,6 +83,10 @@ func (f *InnerFlag[T]) Set(name string, rawVal string) error {
}
}

if seeder, ok := f.OuterFlag.(InnerFieldSeeder); ok {
seeder.SeedInnerCollection(f.OuterIsArrayOfObjects)
}

if settableInnerField, ok := f.OuterFlag.(SettableInnerField); ok {
settableInnerField.SetInnerField(f.InnerField, parsedValue)
} else {
Expand Down Expand Up @@ -136,6 +147,9 @@ func (f *InnerFlag[T]) TypeName() string {
if ty == nil {
return ""
}
if ty.Kind() == reflect.Pointer {
ty = ty.Elem()
}

// Get base type name with special handling for built-in types
getTypeName := func(t reflect.Type) string {
Expand Down
Loading
Loading