Skip to content

Commit b8a5b2c

Browse files
authored
Merge branch 'main' into recording-pause-resume
2 parents 8f7690e + 8d7de36 commit b8a5b2c

60 files changed

Lines changed: 330 additions & 98 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,27 @@ jobs:
6161
env:
6262
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6363

64+
dispatch-docsite:
65+
needs: [release]
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Mint app token for api-specs
69+
id: app-token
70+
uses: actions/create-github-app-token@v3
71+
with:
72+
client-id: ${{ secrets.APP_CLIENT_ID }}
73+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
74+
owner: Bandwidth
75+
repositories: api-specs
76+
77+
- name: Trigger docsite CLI reference update
78+
env:
79+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
80+
run: |
81+
gh api repos/Bandwidth/api-specs/dispatches \
82+
-f event_type=cli-docs-update \
83+
-F client_payload[version]="${{ github.ref_name }}"
84+
6485
bump-formula:
6586
needs: [release]
6687
runs-on: ubuntu-latest

.goreleaser.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
version: 2
22

3+
before:
4+
hooks:
5+
- go run ./internal/tools/docgen -out ./dist-docs
6+
- tar -czf cli-docs.tar.gz -C ./dist-docs .
7+
38
builds:
49
- main: ./cmd/band
510
binary: band
@@ -25,6 +30,11 @@ archives:
2530
checksum:
2631
name_template: "checksums.txt"
2732

33+
release:
34+
# Attach docs to the GitHub release
35+
extra_files:
36+
- glob: ./cli-docs.tar.gz
37+
2838
dockers:
2939
- image_templates:
3040
- "ghcr.io/bandwidth/cli:{{ .Version }}-amd64"

cmd/account/account.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ import "github.com/spf13/cobra"
66
var Cmd = &cobra.Command{
77
Use: "account",
88
Short: "Manage Bandwidth account registration",
9+
Long: "Register and provision Bandwidth accounts. These commands handle account onboarding and do not require an existing account to be selected.",
910
}

cmd/app/app.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ import "github.com/spf13/cobra"
66
var Cmd = &cobra.Command{
77
Use: "app",
88
Short: "Manage Bandwidth applications",
9+
Long: "Create, inspect, and manage Bandwidth applications. Applications hold the callback configuration that voice and messaging traffic is routed against, and are referenced by ID when sending messages or placing calls.",
910
}

cmd/app/create.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func init() {
3232
var createCmd = &cobra.Command{
3333
Use: "create",
3434
Short: "Create a new application",
35+
Long: "Creates a new voice or messaging application. The callback URL receives webhook events for traffic routed through the application. Use --if-not-exists to make the command idempotent, returning the existing application instead of erroring when one with the same name already exists.",
3536
Example: ` # Create a voice application
3637
band app create --name "My Voice App" --type voice --callback-url https://example.com/voice
3738

cmd/app/delete.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ func init() {
1414
}
1515

1616
var deleteCmd = &cobra.Command{
17-
Use: "delete [id]",
18-
Short: "Delete an application by ID",
19-
Args: cobra.ExactArgs(1),
20-
RunE: runDelete,
17+
Use: "delete [id]",
18+
Short: "Delete an application by ID",
19+
Long: "Permanently deletes an application by its ID. This cannot be undone.",
20+
Example: ` band app delete abc-123`,
21+
Args: cobra.ExactArgs(1),
22+
RunE: runDelete,
2123
}
2224

2325
func runDelete(cmd *cobra.Command, args []string) error {

cmd/app/get.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ func init() {
1717
var getCmd = &cobra.Command{
1818
Use: "get [id]",
1919
Short: "Get an application by ID",
20-
Args: cobra.ExactArgs(1),
21-
RunE: runGet,
20+
Long: "Returns the details of a single application by its ID, including its type and callback configuration.",
21+
Example: ` band app get abc-123
22+
band app get abc-123 --plain`,
23+
Args: cobra.ExactArgs(1),
24+
RunE: runGet,
2225
}
2326

2427
func runGet(cmd *cobra.Command, args []string) error {

cmd/app/list.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ func init() {
1616
var listCmd = &cobra.Command{
1717
Use: "list",
1818
Short: "List all applications",
19-
RunE: runList,
19+
Long: "Lists all applications on the account, both voice and messaging.",
20+
Example: ` band app list
21+
band app list --plain`,
22+
RunE: runList,
2023
}
2124

2225
func runList(cmd *cobra.Command, args []string) error {

cmd/app/peers.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ func init() {
1717
var peersCmd = &cobra.Command{
1818
Use: "peers [app-id]",
1919
Short: "List SIP peers (locations) associated with an application",
20-
Args: cobra.ExactArgs(1),
21-
RunE: runPeers,
20+
Long: "Lists the SIP peers (locations) associated with an application. Returns an empty list when no peers are associated.",
21+
Example: ` band app peers abc-123
22+
band app peers abc-123 --plain`,
23+
Args: cobra.ExactArgs(1),
24+
RunE: runPeers,
2225
}
2326

2427
func runPeers(cmd *cobra.Command, args []string) error {

cmd/auth/login.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
var Cmd = &cobra.Command{
2020
Use: "auth",
2121
Short: "Manage authentication credentials",
22+
Long: "Log in with Bandwidth OAuth2 client credentials, inspect your authentication status, and manage credential profiles and the active account.",
2223
}
2324

2425
func init() {

0 commit comments

Comments
 (0)