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
26 changes: 26 additions & 0 deletions src/content/changelog/account-and-auth-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: See which credential the CLI is using
date: 2026-10-17
version: 1.6.130
area: CLI
type: New
docLink:
label: Check which credential is active
href: /account/cli/#check-which-credential-is-active
---

`shorebird auth status` shows which credential the CLI signed in with and who it
acts as, and `shorebird auth token` prints the access token it sends.

- The credential is an API key from `SHOREBIRD_TOKEN`, GitHub Actions OIDC, or
your `shorebird login`, tried in that order.
- `shorebird account whoami` adds a `Credential` line, and `credential` in
`--json`.
- Bare `shorebird account` now runs `shorebird account whoami`.
- Treat the output of `shorebird auth token` as a secret. It's left out of the
run's log file.

```sh
shorebird auth status
shorebird account
```
20 changes: 20 additions & 0 deletions src/content/changelog/account-apps-moved.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Apps are listed with apps list, not account apps
date: 2026-10-17
version: 1.6.130
area: CLI
type: Changed
docLink:
label: List apps
href: /account/cli/#list-apps
---

`shorebird account apps` no longer lists apps. It prints `shorebird apps list`,
which shows the same list, and exits with a usage error.

- Scripts that call `shorebird account apps` need to switch to
`shorebird apps list`. Its output, including `--json`, is the same.

```sh
shorebird apps list
```
23 changes: 23 additions & 0 deletions src/content/changelog/account-update-and-notifications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Change your display name and email settings from the CLI
date: 2026-10-17
version: 1.6.130
area: CLI
type: New
docLink:
label: Change your display name
href: /account/cli/#change-your-display-name
---

`shorebird account update --name` changes your display name, and
`shorebird account notifications` shows or changes whether Shorebird emails you.

- The emails Shorebird sends today warn that an app is near or over its plan's
patch install limit.
- `--email on` and `--email off` change the setting. With `--json`, the output
includes `email` set to `true` or `false`.

```sh
shorebird account update --name "Jane Doe"
shorebird account notifications --email off
```
25 changes: 25 additions & 0 deletions src/content/changelog/api-method-and-paginate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: The api command takes the method first and reads every page
date: 2026-10-17
version: 1.6.130
area: CLI
type: New
docLink:
label: Calling the API from the command line
href: /account/api/#calling-the-api-from-the-command-line
---

`shorebird api` accepts the HTTP method before the endpoint, and `--paginate`
reads a whole paged list in one call.

- The method can be GET, POST, PUT, PATCH, DELETE, or HEAD, in any case. If you
also pass `-X`, it must name the same method.
- `--paginate` follows `next_cursor` and prints the pages as one JSON object,
with list fields joined. `--jq` runs on the joined result.
- `--paginate` works only with GET. A failed page stops the command with exit
status 1 instead of printing part of the list.

```sh
shorebird api GET /apps
shorebird api /apps -f per_page=100 --paginate --jq '.apps[].app_id'
```
21 changes: 21 additions & 0 deletions src/content/changelog/channel-flag-alias.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Use --channel wherever --track works
date: 2026-10-17
version: 1.6.130
area: CLI
type: New
docLink:
label: Publishing a patch to a track
href: /code-push/tracks/#publishing-a-patch-to-a-track
---

`--channel` is now another name for `--track`.

- It works on `shorebird patch`, `shorebird preview`,
`shorebird patches set-track`, and `shorebird patches promote`.
- The two flags mean the same thing, so existing scripts that use `--track` keep
working.

```sh
shorebird patch android --channel staging
```
23 changes: 23 additions & 0 deletions src/content/changelog/patches-promote-shortcut.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: The patches promote command is back as a set-track shortcut
date: 2026-10-17
version: 1.6.130
area: CLI
type: Changed
docLink:
label: Promote a patch
href: /code-push/patch/#promote-a-patch
---

`shorebird patches promote` appears in help again and now runs
`shorebird patches set-track` with the track defaulting to `stable`.

- It takes the same options as `set-track`, including `--track` for a track
other than `stable`, `--app-id`, and `--json`.
- A patch that's already on the track now succeeds instead of failing.
- If the app has no `stable` channel yet, it offers to create it, as `set-track`
does.

```sh
shorebird patches promote --release-version 1.0.0+1 --patch-number 1
```
30 changes: 27 additions & 3 deletions src/content/docs/account/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,29 @@ output. Find endpoints in
shorebird api /organizations/ORG_ID/users --jq '.users[].user.email'
```

Run `shorebird api --help` for all options. For walking a paged list, see
The HTTP method can go before the endpoint, or in `-X`. Without one, the request
is a GET, or a POST when you pass fields with `-f` or `-F`:

```sh
shorebird api GET /apps
shorebird api DELETE /apps/APP_ID/releases/RELEASE_ID
```

To read a whole paged list in one call, add `--paginate`. It keeps requesting
the next page and prints the pages as one JSON object, with the list fields
joined. It works only with GET, and on an endpoint that doesn't page it makes a
single request:

```sh
shorebird api /apps -f per_page=100 --paginate --jq '.apps[].app_id'
```

Because `--paginate` always sends a GET, the `-f` fields here go in the query
string.

The method before the endpoint and `--paginate` need Shorebird 1.6.130 or newer.

Run `shorebird api --help` for all options. For how paging works, see
[Pagination](#common-patterns) below.

## Base URL
Expand Down Expand Up @@ -116,9 +138,11 @@ parameter and response detail on each:
`next_cursor` when there is another page; pass it as `cursor` to fetch the
next one. Without `per_page` or `cursor`, these lists return every item. Some
newer list endpoints page by default, with the same parameters.
`shorebird api --paginate` follows `next_cursor` for you.

This script prints every app ID, one page of 50 at a time, stops when a page
has no `next_cursor`, and exits with status 1 if a request fails:
On a CLI older than 1.6.130, this script prints every app ID, one page of 50
at a time, stops when a page has no `next_cursor`, and exits with status 1 if
a request fails:

```bash
cursor=""
Expand Down
90 changes: 82 additions & 8 deletions src/content/docs/account/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,56 @@ from your machine, run:
shorebird logout
```

### Check which credential is active

The CLI signs in with the first credential it finds: an API key in
`SHOREBIRD_TOKEN`, then GitHub Actions OIDC, then your `shorebird login`. To see
which one it's using and who it acts as, run:

```sh
shorebird auth status
```

**Example output:**

```
Credential: Login (shorebird login)
Acting as: user@example.com (ID 42)
Expires: 2026-10-17T01:00:00.000Z
```

`Expires` is when the current access token expires. A login and GitHub Actions
OIDC get a new token automatically. An API key has no access token to expire, so
that line is left out. A personal API key and a service account key both show as
`API key (SHOREBIRD_TOKEN)`; the `Acting as` line tells them apart.

### Print an access token

To call the Shorebird API from another tool with your current credentials, print
the access token the CLI would send:

```sh
curl -H "Authorization: Bearer $(shorebird auth token)" \
https://api.shorebird.dev/api/v1/users/me
```

The token may expire soon after you get it, so run `shorebird auth token` each
time rather than storing the output. With an API key in `SHOREBIRD_TOKEN`, it
prints the key. Treat the output as a secret.

These `auth` commands need Shorebird 1.6.130 or newer.

## Account management commands

The `shorebird account` command provides several subcommands to inspect your
account details, apps, and organizations.
The `shorebird account` command shows who you're signed in as, and its
subcommands list your organizations and change your account settings.

### Current account

To see the currently authenticated user's details, run:

```sh
shorebird account whoami
shorebird account
```

**Example output:**
Expand All @@ -65,19 +104,55 @@ Email: user@example.com
Display name: Example User
Plan: pro
Overage limit: 10000
Credential: Login (shorebird login)
```

This command is useful for verifying which account you are logged into and
checking your plan level and your patch overage limit.
checking your plan level and your patch overage limit. `Credential` is how the
command signed in; see
[Check which credential is active](#check-which-credential-is-active).

`shorebird account whoami` prints the same thing. Bare `shorebird account` and
the `Credential` line need Shorebird 1.6.130 or newer.

### Change your display name

To change the name on your account, run:

```sh
shorebird account update --name "Jane Doe"
```

### Turn email notifications on or off

The emails Shorebird sends today warn you when an app is near or over its plan's
patch install limit. To see whether they're on, run:

```sh
shorebird account notifications
```

To turn them off, or back on:

```sh
shorebird account notifications --email off
shorebird account notifications --email on
```

`account update` and `account notifications` need Shorebird 1.6.130 or newer.

### List apps

To list all the Shorebird apps that your current account has access to, run:

```sh
shorebird account apps
shorebird apps list
```

On Shorebird 1.6.129 and older, `shorebird account apps` prints the same list.
From 1.6.130 it prints the `shorebird apps list` command instead and exits with
an error.

**Example output:**

```
Expand Down Expand Up @@ -111,8 +186,8 @@ of, but where you collaborate on one of its apps, shows the role `none`.
## App management commands

As of Shorebird 1.6.121, the `shorebird apps` commands list, rename, delete, and
transfer your apps. `shorebird apps list` shows the same output as
[`shorebird account apps`](#list-apps).
transfer your apps. `shorebird apps list` is covered under
[List apps](#list-apps).

`rename`, `delete`, and `transfer` act on the app in `shorebird.yaml` in the
current directory. Pass `--app-id` to pick a different app or to run the command
Expand Down Expand Up @@ -201,7 +276,6 @@ flag, making them easy to integrate into scripts and automation workflows.

```sh
shorebird account whoami --json
shorebird account apps --json
shorebird account orgs --json
shorebird apps list --json
```
Expand Down
5 changes: 3 additions & 2 deletions src/content/docs/code-push/ci/scripting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ These commands return structured JSON:

| Group | Commands |
| ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| [`shorebird account`](/account/cli#account-management-commands) | `whoami`, `apps`, `orgs` |
| [`shorebird account`](/account/cli#account-management-commands) | `whoami`, `update`, `notifications`, `orgs` |
| [`shorebird auth`](/account/cli#check-which-credential-is-active) | `status`, `token` |
| [`shorebird apps`](/account/cli#app-management-commands) | `list`, `rename`, `delete`, `transfer` |
| [`shorebird channels`](/code-push/tracks#managing-tracks-from-the-cli) | `list`, `create`, `delete` |
| [`shorebird patches`](/code-push/patch#manage-patches) | `list`, `info`, `set-track`, `rollback`, `rollforward` |
| [`shorebird patches`](/code-push/patch#manage-patches) | `list`, `info`, `set-track`, `promote`, `rollback`, `rollforward` |
| [`shorebird releases`](/code-push/release) | `list`, `info`, `delete` |
| `shorebird metrics` | `active-hours`, `adoption`, `downloads`, `heatmap`, `installs`, `new-devices`, `users`, `versions` |
| Other | `shorebird release`, `shorebird patch`, `shorebird doctor`, `shorebird flutter versions list`, `shorebird --version` |
Expand Down
7 changes: 4 additions & 3 deletions src/content/docs/code-push/patch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,12 @@ If you published a patch to a staging track (e.g., `staging`) and verified it
works correctly, you can promote it directly to the `stable` track using:

```sh
shorebird patches set-track --release-version 1.0.0+1 --patch-number 1 --track stable
shorebird patches promote --release-version 1.0.0+1 --patch-number 1
```

This command needs Shorebird 1.6.128 or newer. See
[Set patch track](#set-patch-track) for older CLIs.
`promote` is `set-track` with the track defaulting to `stable`. Older CLIs run
the same command but print a deprecation warning, and its `--track`,
`--channel`, `--app-id`, and `--json` flags need Shorebird 1.6.130 or newer.

### Set patch track

Expand Down
Loading
Loading