From 816ee13b7d4b08d6aba584685a37843c146d7c71 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:32:32 -0400 Subject: [PATCH 01/15] call docs --- cmd/call/call.go | 1 + cmd/call/get.go | 7 +++++-- cmd/call/hangup.go | 10 ++++++---- cmd/call/list.go | 5 ++++- cmd/call/update.go | 10 ++++++---- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/cmd/call/call.go b/cmd/call/call.go index fd8990f..fe8dbfe 100644 --- a/cmd/call/call.go +++ b/cmd/call/call.go @@ -6,4 +6,5 @@ import "github.com/spf13/cobra" var Cmd = &cobra.Command{ Use: "call", Short: "Manage Bandwidth voice calls", + Long: "Create, inspect, and control voice calls. Place outbound calls, redirect calls to new BXML, hang up active calls, and look up call state.", } diff --git a/cmd/call/get.go b/cmd/call/get.go index deecabc..9599627 100644 --- a/cmd/call/get.go +++ b/cmd/call/get.go @@ -17,8 +17,11 @@ func init() { var getCmd = &cobra.Command{ Use: "get [callId]", Short: "Get the state of a call", - Args: cobra.ExactArgs(1), - RunE: runGet, + Long: "Returns the current state and details of a single call, including its direction, endpoints, and timing. Use the callId returned when the call was created.", + Example: ` band call get c-123-abc + band call get c-123-abc --plain`, + Args: cobra.ExactArgs(1), + RunE: runGet, } func runGet(cmd *cobra.Command, args []string) error { diff --git a/cmd/call/hangup.go b/cmd/call/hangup.go index c54bdde..77859f7 100644 --- a/cmd/call/hangup.go +++ b/cmd/call/hangup.go @@ -15,10 +15,12 @@ func init() { } var hangupCmd = &cobra.Command{ - Use: "hangup [callId]", - Short: "Hang up an active call", - Args: cobra.ExactArgs(1), - RunE: runHangup, + Use: "hangup [callId]", + Short: "Hang up an active call", + Long: "Ends an active call by transitioning it to the completed state. Has no effect on calls that have already disconnected.", + Example: ` band call hangup c-123-abc`, + Args: cobra.ExactArgs(1), + RunE: runHangup, } func runHangup(cmd *cobra.Command, args []string) error { diff --git a/cmd/call/list.go b/cmd/call/list.go index f7f7b74..56d60d5 100644 --- a/cmd/call/list.go +++ b/cmd/call/list.go @@ -16,7 +16,10 @@ func init() { var listCmd = &cobra.Command{ Use: "list", Short: "List active and recent calls", - RunE: runList, + Long: "Lists calls for the account, including active calls and recently completed ones. Bandwidth retains call records for a limited window, so older calls may not appear.", + Example: ` band call list + band call list --plain`, + RunE: runList, } func runList(cmd *cobra.Command, args []string) error { diff --git a/cmd/call/update.go b/cmd/call/update.go index 46300d4..cc4fa78 100644 --- a/cmd/call/update.go +++ b/cmd/call/update.go @@ -19,10 +19,12 @@ func init() { } var updateCmd = &cobra.Command{ - Use: "update [callId]", - Short: "Redirect an active call to a new URL", - Args: cobra.ExactArgs(1), - RunE: runUpdate, + Use: "update [callId]", + Short: "Redirect an active call to a new URL", + Long: "Redirects an active call to fetch new BXML from the given URL. Bandwidth POSTs to the redirect URL and replaces the call's current instructions with the response.", + Example: ` band call update c-123-abc --redirect-url https://example.com/voice/next`, + Args: cobra.ExactArgs(1), + RunE: runUpdate, } func runUpdate(cmd *cobra.Command, args []string) error { From d634112bcfdb210c02b6530b32827fa432584dd2 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:32:40 -0400 Subject: [PATCH 02/15] recording docs --- cmd/recording/delete.go | 6 ++++-- cmd/recording/download.go | 6 ++++-- cmd/recording/get.go | 7 +++++-- cmd/recording/list.go | 7 +++++-- cmd/recording/recording.go | 1 + 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/cmd/recording/delete.go b/cmd/recording/delete.go index 28f4916..b9720e6 100644 --- a/cmd/recording/delete.go +++ b/cmd/recording/delete.go @@ -16,8 +16,10 @@ func init() { var deleteCmd = &cobra.Command{ Use: "delete ", Short: "Delete a recording", - Args: cobra.ExactArgs(2), - RunE: runDelete, + Long: "Permanently deletes a recording's metadata and media. This cannot be undone.", + Example: ` band recording delete c-123-abc r-456-def`, + Args: cobra.ExactArgs(2), + RunE: runDelete, } func runDelete(cmd *cobra.Command, args []string) error { diff --git a/cmd/recording/download.go b/cmd/recording/download.go index 35483e9..5b54ff7 100644 --- a/cmd/recording/download.go +++ b/cmd/recording/download.go @@ -21,8 +21,10 @@ func init() { var downloadCmd = &cobra.Command{ Use: "download ", Short: "Download a recording to a file", - Args: cobra.ExactArgs(2), - RunE: runDownload, + Long: "Downloads a recording's audio media and writes it to the given file path. The file is written owner-only (0600) since recordings may contain sensitive call audio.", + Example: ` band recording download c-123-abc r-456-def --output recording.wav`, + Args: cobra.ExactArgs(2), + RunE: runDownload, } func runDownload(cmd *cobra.Command, args []string) error { diff --git a/cmd/recording/get.go b/cmd/recording/get.go index 21e6200..3835886 100644 --- a/cmd/recording/get.go +++ b/cmd/recording/get.go @@ -17,8 +17,11 @@ func init() { var getCmd = &cobra.Command{ Use: "get ", Short: "Get metadata for a specific recording", - Args: cobra.ExactArgs(2), - RunE: runGet, + Long: "Returns metadata for a single recording, including its duration, channels, status, and media URL. Use 'recording download' to fetch the audio itself.", + Example: ` band recording get c-123-abc r-456-def + band recording get c-123-abc r-456-def --plain`, + Args: cobra.ExactArgs(2), + RunE: runGet, } func runGet(cmd *cobra.Command, args []string) error { diff --git a/cmd/recording/list.go b/cmd/recording/list.go index f7c1462..ccf709a 100644 --- a/cmd/recording/list.go +++ b/cmd/recording/list.go @@ -17,8 +17,11 @@ func init() { var listCmd = &cobra.Command{ Use: "list ", Short: "List recordings for a call", - Args: cobra.ExactArgs(1), - RunE: runList, + Long: "Lists all recordings produced during a single call, identified by its callId. Returns an empty list if the call has no recordings.", + Example: ` band recording list c-123-abc + band recording list c-123-abc --plain`, + Args: cobra.ExactArgs(1), + RunE: runList, } func runList(cmd *cobra.Command, args []string) error { diff --git a/cmd/recording/recording.go b/cmd/recording/recording.go index 466cee7..74386a0 100644 --- a/cmd/recording/recording.go +++ b/cmd/recording/recording.go @@ -6,4 +6,5 @@ import "github.com/spf13/cobra" var Cmd = &cobra.Command{ Use: "recording", Short: "Manage call recordings", + Long: "List, inspect, download, and delete recordings produced by voice calls. Recordings are tied to the call that created them, so most commands take a callId.", } From 3164062ed8cc2fa83d3460195fded04037657166 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:32:47 -0400 Subject: [PATCH 03/15] transcription docs --- cmd/transcription/create.go | 10 ++++++++-- cmd/transcription/get.go | 7 +++++-- cmd/transcription/transcription.go | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cmd/transcription/create.go b/cmd/transcription/create.go index 16dcf14..74a3fb7 100644 --- a/cmd/transcription/create.go +++ b/cmd/transcription/create.go @@ -25,8 +25,14 @@ func init() { var createCmd = &cobra.Command{ Use: "create ", Short: "Request a transcription for a recording", - Args: cobra.ExactArgs(2), - RunE: runCreate, + Long: "Requests a transcription for a recording. Transcription runs asynchronously; use --wait to poll until the transcript has content, or fetch it later with 'transcription get'.", + Example: ` band transcription create c-123-abc r-456-def + + # Block until the transcript is ready + band transcription create c-123-abc r-456-def --wait + band transcription create c-123-abc r-456-def --wait --timeout 120s`, + Args: cobra.ExactArgs(2), + RunE: runCreate, } func runCreate(cmd *cobra.Command, args []string) error { diff --git a/cmd/transcription/get.go b/cmd/transcription/get.go index 312c9a2..22b8396 100644 --- a/cmd/transcription/get.go +++ b/cmd/transcription/get.go @@ -17,8 +17,11 @@ func init() { var getCmd = &cobra.Command{ Use: "get ", Short: "Get the transcription for a recording", - Args: cobra.ExactArgs(2), - RunE: runGet, + Long: "Returns the transcription for a recording. The transcript must already have been requested with 'transcription create' and finished processing.", + Example: ` band transcription get c-123-abc r-456-def + band transcription get c-123-abc r-456-def --plain`, + Args: cobra.ExactArgs(2), + RunE: runGet, } func runGet(cmd *cobra.Command, args []string) error { diff --git a/cmd/transcription/transcription.go b/cmd/transcription/transcription.go index e51cb57..f78a54f 100644 --- a/cmd/transcription/transcription.go +++ b/cmd/transcription/transcription.go @@ -6,4 +6,5 @@ import "github.com/spf13/cobra" var Cmd = &cobra.Command{ Use: "transcription", Short: "Manage call recording transcriptions", + Long: "Request and retrieve text transcriptions of call recordings. Transcription is asynchronous — request it for a recording, then fetch the result once it's ready.", } From c69a1a640a6f0cf08cdd34c34cfb64d8b9847a21 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:32:53 -0400 Subject: [PATCH 04/15] app docs --- cmd/app/app.go | 1 + cmd/app/create.go | 1 + cmd/app/delete.go | 6 ++++-- cmd/app/get.go | 7 +++++-- cmd/app/list.go | 5 ++++- cmd/app/peers.go | 7 +++++-- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/cmd/app/app.go b/cmd/app/app.go index 6d5ad45..d55b28b 100644 --- a/cmd/app/app.go +++ b/cmd/app/app.go @@ -6,4 +6,5 @@ import "github.com/spf13/cobra" var Cmd = &cobra.Command{ Use: "app", Short: "Manage Bandwidth applications", + 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.", } diff --git a/cmd/app/create.go b/cmd/app/create.go index 02551ca..a1f71d3 100644 --- a/cmd/app/create.go +++ b/cmd/app/create.go @@ -32,6 +32,7 @@ func init() { var createCmd = &cobra.Command{ Use: "create", Short: "Create a new application", + 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.", Example: ` # Create a voice application band app create --name "My Voice App" --type voice --callback-url https://example.com/voice diff --git a/cmd/app/delete.go b/cmd/app/delete.go index 05f2468..b246a4d 100644 --- a/cmd/app/delete.go +++ b/cmd/app/delete.go @@ -16,8 +16,10 @@ func init() { var deleteCmd = &cobra.Command{ Use: "delete [id]", Short: "Delete an application by ID", - Args: cobra.ExactArgs(1), - RunE: runDelete, + Long: "Permanently deletes an application by its ID. This cannot be undone.", + Example: ` band app delete abc-123`, + Args: cobra.ExactArgs(1), + RunE: runDelete, } func runDelete(cmd *cobra.Command, args []string) error { diff --git a/cmd/app/get.go b/cmd/app/get.go index 6dbf623..4c8c7c6 100644 --- a/cmd/app/get.go +++ b/cmd/app/get.go @@ -17,8 +17,11 @@ func init() { var getCmd = &cobra.Command{ Use: "get [id]", Short: "Get an application by ID", - Args: cobra.ExactArgs(1), - RunE: runGet, + Long: "Returns the details of a single application by its ID, including its type and callback configuration.", + Example: ` band app get abc-123 + band app get abc-123 --plain`, + Args: cobra.ExactArgs(1), + RunE: runGet, } func runGet(cmd *cobra.Command, args []string) error { diff --git a/cmd/app/list.go b/cmd/app/list.go index 7c0ddbe..6a28086 100644 --- a/cmd/app/list.go +++ b/cmd/app/list.go @@ -16,7 +16,10 @@ func init() { var listCmd = &cobra.Command{ Use: "list", Short: "List all applications", - RunE: runList, + Long: "Lists all applications on the account, both voice and messaging.", + Example: ` band app list + band app list --plain`, + RunE: runList, } func runList(cmd *cobra.Command, args []string) error { diff --git a/cmd/app/peers.go b/cmd/app/peers.go index 82ba2f0..53a02ef 100644 --- a/cmd/app/peers.go +++ b/cmd/app/peers.go @@ -17,8 +17,11 @@ func init() { var peersCmd = &cobra.Command{ Use: "peers [app-id]", Short: "List SIP peers (locations) associated with an application", - Args: cobra.ExactArgs(1), - RunE: runPeers, + Long: "Lists the SIP peers (locations) associated with an application. Returns an empty list when no peers are associated.", + Example: ` band app peers abc-123 + band app peers abc-123 --plain`, + Args: cobra.ExactArgs(1), + RunE: runPeers, } func runPeers(cmd *cobra.Command, args []string) error { From 9f49015f2b2ebcc5c050b48efb1a6c09d67a3035 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:33:09 -0400 Subject: [PATCH 05/15] site docs --- cmd/site/create.go | 8 +++++++- cmd/site/delete.go | 6 ++++-- cmd/site/get.go | 7 +++++-- cmd/site/list.go | 5 ++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/cmd/site/create.go b/cmd/site/create.go index 0e79add..438ef39 100644 --- a/cmd/site/create.go +++ b/cmd/site/create.go @@ -27,7 +27,13 @@ func init() { var createCmd = &cobra.Command{ Use: "create", Short: "Create a new sub-account", - RunE: runCreate, + Long: "Creates a new sub-account under the active account. Use --if-not-exists to make the command idempotent, returning the existing sub-account instead of erroring when one with the same name already exists.", + Example: ` band subaccount create --name "Production" + band subaccount create --name "Production" --description "Prod traffic" + + # Idempotent — safe to re-run + band subaccount create --name "Production" --if-not-exists`, + RunE: runCreate, } func runCreate(cmd *cobra.Command, args []string) error { diff --git a/cmd/site/delete.go b/cmd/site/delete.go index c025381..8019937 100644 --- a/cmd/site/delete.go +++ b/cmd/site/delete.go @@ -16,8 +16,10 @@ func init() { var deleteCmd = &cobra.Command{ Use: "delete [id]", Short: "Delete a sub-account by ID", - Args: cobra.ExactArgs(1), - RunE: runDelete, + Long: "Permanently deletes a sub-account by its numeric ID. This cannot be undone.", + Example: ` band subaccount delete 12345`, + Args: cobra.ExactArgs(1), + RunE: runDelete, } func runDelete(cmd *cobra.Command, args []string) error { diff --git a/cmd/site/get.go b/cmd/site/get.go index fd4f6d9..71e3742 100644 --- a/cmd/site/get.go +++ b/cmd/site/get.go @@ -17,8 +17,11 @@ func init() { var getCmd = &cobra.Command{ Use: "get [id]", Short: "Get a sub-account by ID", - Args: cobra.ExactArgs(1), - RunE: runGet, + Long: "Returns the details of a single sub-account by its numeric ID.", + Example: ` band subaccount get 12345 + band subaccount get 12345 --plain`, + Args: cobra.ExactArgs(1), + RunE: runGet, } func runGet(cmd *cobra.Command, args []string) error { diff --git a/cmd/site/list.go b/cmd/site/list.go index b0c844a..976026d 100644 --- a/cmd/site/list.go +++ b/cmd/site/list.go @@ -16,7 +16,10 @@ func init() { var listCmd = &cobra.Command{ Use: "list", Short: "List all sub-accounts", - RunE: runList, + Long: "Lists all sub-accounts under the active account.", + Example: ` band subaccount list + band subaccount list --plain`, + RunE: runList, } func runList(cmd *cobra.Command, args []string) error { From d304c32173cb222d98a666e3180345e3e560b1d8 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:33:17 -0400 Subject: [PATCH 06/15] location docs --- cmd/location/create.go | 7 ++++++- cmd/location/list.go | 5 ++++- cmd/location/location.go | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cmd/location/create.go b/cmd/location/create.go index 0b0db85..1f1b980 100644 --- a/cmd/location/create.go +++ b/cmd/location/create.go @@ -28,7 +28,12 @@ func init() { var createCmd = &cobra.Command{ Use: "create", Short: "Create a new location (SIP peer) under a sub-account", - RunE: runCreate, + Long: "Creates a new location (SIP peer) within the given sub-account. Use --if-not-exists to make the command idempotent, returning the existing location instead of erroring when one with the same name already exists.", + Example: ` band location create --site 12345 --name "Primary SIP" + + # Idempotent — safe to re-run + band location create --site 12345 --name "Primary SIP" --if-not-exists`, + RunE: runCreate, } func runCreate(cmd *cobra.Command, args []string) error { diff --git a/cmd/location/list.go b/cmd/location/list.go index 0cc8fb5..83f5058 100644 --- a/cmd/location/list.go +++ b/cmd/location/list.go @@ -20,7 +20,10 @@ func init() { var listCmd = &cobra.Command{ Use: "list", Short: "List all locations (SIP peers) under a sub-account", - RunE: runList, + Long: "Lists all locations (SIP peers) within the given sub-account.", + Example: ` band location list --site 12345 + band location list --site 12345 --plain`, + RunE: runList, } func runList(cmd *cobra.Command, args []string) error { diff --git a/cmd/location/location.go b/cmd/location/location.go index ec1683d..17373b2 100644 --- a/cmd/location/location.go +++ b/cmd/location/location.go @@ -6,4 +6,5 @@ import "github.com/spf13/cobra" var Cmd = &cobra.Command{ Use: "location", Short: "Manage locations (SIP peers) under sub-accounts", + Long: "Create and list locations (SIP peers) within a sub-account. Locations define the SIP endpoints that route voice traffic for the numbers assigned to them.", } From 81dfe95af255755a9d5a7177ebb6bba25ead9868 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:33:22 -0400 Subject: [PATCH 07/15] vcp docs --- cmd/vcp/delete.go | 6 ++++-- cmd/vcp/get.go | 7 +++++-- cmd/vcp/list.go | 5 ++++- cmd/vcp/numbers.go | 7 +++++-- cmd/vcp/vcp.go | 1 + 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/cmd/vcp/delete.go b/cmd/vcp/delete.go index fb1cde7..bc7e584 100644 --- a/cmd/vcp/delete.go +++ b/cmd/vcp/delete.go @@ -16,8 +16,10 @@ func init() { var deleteCmd = &cobra.Command{ Use: "delete ", Short: "Delete a Voice Configuration Package", - Args: cobra.ExactArgs(1), - RunE: runDelete, + Long: "Permanently deletes a Voice Configuration Package by its ID. This cannot be undone.", + Example: ` band vcp delete abc-123-def`, + Args: cobra.ExactArgs(1), + RunE: runDelete, } func runDelete(cmd *cobra.Command, args []string) error { diff --git a/cmd/vcp/get.go b/cmd/vcp/get.go index f94d9ff..8aea199 100644 --- a/cmd/vcp/get.go +++ b/cmd/vcp/get.go @@ -17,8 +17,11 @@ func init() { var getCmd = &cobra.Command{ Use: "get ", Short: "Get a Voice Configuration Package", - Args: cobra.ExactArgs(1), - RunE: runGet, + Long: "Returns the details of a single Voice Configuration Package by its ID.", + Example: ` band vcp get abc-123-def + band vcp get abc-123-def --plain`, + Args: cobra.ExactArgs(1), + RunE: runGet, } func runGet(cmd *cobra.Command, args []string) error { diff --git a/cmd/vcp/list.go b/cmd/vcp/list.go index ea2f1bd..a4487b6 100644 --- a/cmd/vcp/list.go +++ b/cmd/vcp/list.go @@ -16,7 +16,10 @@ func init() { var listCmd = &cobra.Command{ Use: "list", Short: "List Voice Configuration Packages", - RunE: runList, + Long: "Lists all Voice Configuration Packages on the account.", + Example: ` band vcp list + band vcp list --plain`, + RunE: runList, } func runList(cmd *cobra.Command, args []string) error { diff --git a/cmd/vcp/numbers.go b/cmd/vcp/numbers.go index 1fb4c17..5efe6f5 100644 --- a/cmd/vcp/numbers.go +++ b/cmd/vcp/numbers.go @@ -17,8 +17,11 @@ func init() { var numbersCmd = &cobra.Command{ Use: "numbers ", Short: "List phone numbers assigned to a VCP", - Args: cobra.ExactArgs(1), - RunE: runNumbers, + Long: "Lists all phone numbers currently assigned to a Voice Configuration Package.", + Example: ` band vcp numbers abc-123-def + band vcp numbers abc-123-def --plain`, + Args: cobra.ExactArgs(1), + RunE: runNumbers, } func runNumbers(cmd *cobra.Command, args []string) error { diff --git a/cmd/vcp/vcp.go b/cmd/vcp/vcp.go index 439747d..6259f4c 100644 --- a/cmd/vcp/vcp.go +++ b/cmd/vcp/vcp.go @@ -6,4 +6,5 @@ import "github.com/spf13/cobra" var Cmd = &cobra.Command{ Use: "vcp", Short: "Manage Voice Configuration Packages (Universal Platform)", + Long: "Create, inspect, and manage Voice Configuration Packages (VCPs) on the Universal Platform. VCPs define voice routing and settings for groups of phone numbers, and can be linked to a voice application for HTTP callbacks.", } From 93e0d93458ab424b3a1cb3bfbe01ce3283232319 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:42:01 -0400 Subject: [PATCH 08/15] account docs --- cmd/account/account.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/account/account.go b/cmd/account/account.go index 22e4f97..68fe876 100644 --- a/cmd/account/account.go +++ b/cmd/account/account.go @@ -6,4 +6,5 @@ import "github.com/spf13/cobra" var Cmd = &cobra.Command{ Use: "account", Short: "Manage Bandwidth account registration", + Long: "Register and provision Bandwidth accounts. These commands handle account onboarding and do not require an existing account to be selected.", } From 3822452266ffb20ee61ec5b342c178b973261c66 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:42:05 -0400 Subject: [PATCH 09/15] auth docs --- cmd/auth/login.go | 1 + cmd/auth/logout.go | 4 +++- cmd/auth/profiles.go | 10 +++++++--- cmd/auth/status.go | 5 ++++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/cmd/auth/login.go b/cmd/auth/login.go index 2e4af3f..c6ac6d4 100644 --- a/cmd/auth/login.go +++ b/cmd/auth/login.go @@ -19,6 +19,7 @@ import ( var Cmd = &cobra.Command{ Use: "auth", Short: "Manage authentication credentials", + Long: "Log in with Bandwidth OAuth2 client credentials, inspect your authentication status, and manage credential profiles and the active account.", } func init() { diff --git a/cmd/auth/logout.go b/cmd/auth/logout.go index e3729cd..5ca6be7 100644 --- a/cmd/auth/logout.go +++ b/cmd/auth/logout.go @@ -18,7 +18,9 @@ func init() { var logoutCmd = &cobra.Command{ Use: "logout", Short: "Log out and remove stored credentials", - RunE: runLogout, + Long: "Logs out by deleting stored secrets from the system keychain and removing the CLI config file. This affects all profiles, not just the active one.", + Example: ` band auth logout`, + RunE: runLogout, } func runLogout(cmd *cobra.Command, args []string) error { diff --git a/cmd/auth/profiles.go b/cmd/auth/profiles.go index 53480eb..57659a1 100644 --- a/cmd/auth/profiles.go +++ b/cmd/auth/profiles.go @@ -17,7 +17,9 @@ func init() { var profilesCmd = &cobra.Command{ Use: "profiles", Short: "List all credential profiles", - RunE: runProfiles, + Long: "Lists all configured credential profiles, marking the active one. Each profile holds its own client credentials, account, and environment.", + Example: ` band auth profiles`, + RunE: runProfiles, } func runProfiles(cmd *cobra.Command, args []string) error { @@ -72,8 +74,10 @@ func runProfiles(cmd *cobra.Command, args []string) error { var useCmd = &cobra.Command{ Use: "use ", Short: "Switch to a different credential profile", - Args: cobra.ExactArgs(1), - RunE: runUse, + Long: "Switches the active credential profile. Subsequent commands use the selected profile's credentials, account, and environment.", + Example: ` band auth use admin`, + Args: cobra.ExactArgs(1), + RunE: runUse, } func runUse(cmd *cobra.Command, args []string) error { diff --git a/cmd/auth/status.go b/cmd/auth/status.go index 7198c80..8828388 100644 --- a/cmd/auth/status.go +++ b/cmd/auth/status.go @@ -21,7 +21,10 @@ func init() { var statusCmd = &cobra.Command{ Use: "status", Short: "Show current authentication status", - RunE: runStatus, + Long: "Shows the active profile's authentication status, including client ID, active account, environment, and (for Bandwidth Build accounts) capabilities. Use --plain for machine-readable JSON.", + Example: ` band auth status + band auth status --plain`, + RunE: runStatus, } // statusJSON is the structured output shape returned when --plain is set. From 21c1f476b0d482dea04dcd8d155e8bca68db6a8f Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:42:09 -0400 Subject: [PATCH 10/15] bxml docs --- cmd/bxml/gather.go | 7 +++++-- cmd/bxml/raw.go | 6 ++++-- cmd/bxml/record.go | 7 +++++-- cmd/bxml/speak.go | 1 + cmd/bxml/transfer.go | 7 +++++-- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/cmd/bxml/gather.go b/cmd/bxml/gather.go index 3e464ec..3a4c897 100644 --- a/cmd/bxml/gather.go +++ b/cmd/bxml/gather.go @@ -24,8 +24,11 @@ func init() { var gatherCmd = &cobra.Command{ Use: "gather", Short: "Generate a Gather BXML verb", - Args: cobra.NoArgs, - RunE: runGather, + Long: "Generates a Response containing a Gather verb that collects DTMF digits and posts them to --url. Use --prompt to speak a message before gathering and --max-digits to cap input length.", + Example: ` band bxml gather --url https://example.com/voice/gather + band bxml gather --url https://example.com/voice/gather --prompt "Press 1 for sales." --max-digits 1`, + Args: cobra.NoArgs, + RunE: runGather, } func runGather(cmd *cobra.Command, args []string) error { diff --git a/cmd/bxml/raw.go b/cmd/bxml/raw.go index deb4160..47b5b7e 100644 --- a/cmd/bxml/raw.go +++ b/cmd/bxml/raw.go @@ -15,8 +15,10 @@ func init() { var rawCmd = &cobra.Command{ Use: "raw ", Short: "Validate and pretty-print a BXML string", - Args: cobra.ExactArgs(1), - RunE: runRaw, + Long: "Validates a BXML string by round-tripping it through an XML parser and prints it back indented. Exits with an error if the input is not well-formed XML.", + Example: ` band bxml raw ""`, + Args: cobra.ExactArgs(1), + RunE: runRaw, } func runRaw(cmd *cobra.Command, args []string) error { diff --git a/cmd/bxml/record.go b/cmd/bxml/record.go index 4f81827..34db603 100644 --- a/cmd/bxml/record.go +++ b/cmd/bxml/record.go @@ -21,8 +21,11 @@ func init() { var recordCmd = &cobra.Command{ Use: "record", Short: "Generate a Record BXML verb", - Args: cobra.NoArgs, - RunE: runRecord, + Long: "Generates a Response containing a Record verb. Use --url to receive the recording-complete event and --max-duration to limit the recording length in seconds.", + Example: ` band bxml record + band bxml record --url https://example.com/voice/recorded --max-duration 30`, + Args: cobra.NoArgs, + RunE: runRecord, } func runRecord(cmd *cobra.Command, args []string) error { diff --git a/cmd/bxml/speak.go b/cmd/bxml/speak.go index f8b8b9c..7ea16c9 100644 --- a/cmd/bxml/speak.go +++ b/cmd/bxml/speak.go @@ -18,6 +18,7 @@ func init() { var speakCmd = &cobra.Command{ Use: "speak ", Short: "Generate a SpeakSentence BXML verb", + Long: "Generates a Response containing a SpeakSentence verb for the given text. Use --voice to select a specific Bandwidth voice.", Example: ` band bxml speak "Hello, welcome to Bandwidth." band bxml speak --voice julie "Press 1 for sales." band bxml speak "Goodbye." > hangup.xml`, diff --git a/cmd/bxml/transfer.go b/cmd/bxml/transfer.go index 8bfea87..7f0a81d 100644 --- a/cmd/bxml/transfer.go +++ b/cmd/bxml/transfer.go @@ -17,8 +17,11 @@ func init() { var transferCmd = &cobra.Command{ Use: "transfer ", Short: "Generate a Transfer BXML verb", - Args: cobra.ExactArgs(1), - RunE: runTransfer, + Long: "Generates a Response containing a Transfer verb to the given phone number. Use --caller-id to set the caller ID presented on the transferred leg.", + Example: ` band bxml transfer +19195551234 + band bxml transfer +19195551234 --caller-id +19198675309`, + Args: cobra.ExactArgs(1), + RunE: runTransfer, } func runTransfer(cmd *cobra.Command, args []string) error { From b4048b99c546051c8849523a574cb4dbc5489381 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:42:25 -0400 Subject: [PATCH 11/15] message docs --- cmd/message/get.go | 6 ++++-- cmd/message/media/delete.go | 6 ++++-- cmd/message/media/get.go | 6 ++++-- cmd/message/media/list.go | 5 ++++- cmd/message/media/media.go | 1 + cmd/message/message.go | 1 + 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/cmd/message/get.go b/cmd/message/get.go index c04a2a4..94a6316 100644 --- a/cmd/message/get.go +++ b/cmd/message/get.go @@ -18,8 +18,10 @@ var getCmd = &cobra.Command{ Use: "get [messageId]", Short: "Get message metadata by ID", Long: "Retrieves metadata for a specific message. Note: Bandwidth does not store message content — only metadata (timestamps, direction, segment count) is returned.", - Args: cobra.ExactArgs(1), - RunE: runGet, + Example: ` band message get 1234567890abcdefghij + band message get 1234567890abcdefghij --plain`, + Args: cobra.ExactArgs(1), + RunE: runGet, } func runGet(cmd *cobra.Command, args []string) error { diff --git a/cmd/message/media/delete.go b/cmd/message/media/delete.go index 759e100..aec73dd 100644 --- a/cmd/message/media/delete.go +++ b/cmd/message/media/delete.go @@ -16,8 +16,10 @@ func init() { var deleteCmd = &cobra.Command{ Use: "delete ", Short: "Delete a media file", - Args: cobra.ExactArgs(1), - RunE: runDelete, + Long: "Permanently deletes a media file by its ID. Any MMS that still references its URL will no longer be able to fetch it.", + Example: ` band message media delete my-campaign-image.jpg`, + Args: cobra.ExactArgs(1), + RunE: runDelete, } func runDelete(cmd *cobra.Command, args []string) error { diff --git a/cmd/message/media/get.go b/cmd/message/media/get.go index 12eb382..5c21be3 100644 --- a/cmd/message/media/get.go +++ b/cmd/message/media/get.go @@ -20,8 +20,10 @@ func init() { var getCmd = &cobra.Command{ Use: "get ", Short: "Download a media file", - Args: cobra.ExactArgs(1), - RunE: runGet, + Long: "Downloads a media file by its ID and writes it to the given file path.", + Example: ` band message media get my-campaign-image.jpg --output image.jpg`, + Args: cobra.ExactArgs(1), + RunE: runGet, } func runGet(cmd *cobra.Command, args []string) error { diff --git a/cmd/message/media/list.go b/cmd/message/media/list.go index ebe49a1..436002e 100644 --- a/cmd/message/media/list.go +++ b/cmd/message/media/list.go @@ -16,7 +16,10 @@ func init() { var listCmd = &cobra.Command{ Use: "list", Short: "List uploaded media files", - RunE: runList, + Long: "Lists the media files uploaded to the account's media store.", + Example: ` band message media list + band message media list --plain`, + RunE: runList, } func runList(cmd *cobra.Command, args []string) error { diff --git a/cmd/message/media/media.go b/cmd/message/media/media.go index 668b0e0..706664b 100644 --- a/cmd/message/media/media.go +++ b/cmd/message/media/media.go @@ -6,4 +6,5 @@ import "github.com/spf13/cobra" var Cmd = &cobra.Command{ Use: "media", Short: "Manage MMS media files", + Long: "Upload, list, download, and delete the media files served for MMS. Uploaded media is hosted by Bandwidth and referenced by URL when sending an MMS with 'message send --media'.", } diff --git a/cmd/message/message.go b/cmd/message/message.go index 8e880fe..8908651 100644 --- a/cmd/message/message.go +++ b/cmd/message/message.go @@ -10,6 +10,7 @@ import ( var Cmd = &cobra.Command{ Use: "message", Short: "Send and manage SMS/MMS messages", + Long: "Send SMS and MMS messages, look up message metadata, and manage the media files used in MMS. Delivery is asynchronous — status arrives via webhook callbacks on your messaging application.", } func init() { From d66885dfa07628d9f03518644b11c269c57e29bb Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:45:33 -0400 Subject: [PATCH 12/15] number docs --- cmd/number/list.go | 6 ++---- cmd/number/number.go | 1 + cmd/number/release.go | 6 ++++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cmd/number/list.go b/cmd/number/list.go index 6ae6b82..144f02d 100644 --- a/cmd/number/list.go +++ b/cmd/number/list.go @@ -29,10 +29,8 @@ var listCmd = &cobra.Command{ Long: `Lists phone numbers on the active account. By default, returns only numbers in service (ready to route calls or send -messages). Pass --status to include numbers in other states. - -Examples: - band number list # default: only in-service +messages). Pass --status to include numbers in other states.`, + Example: ` band number list # default: only in-service band number list --status Inservice,InAccount # include numbers just ordered band number list --status Aging # numbers being released`, RunE: runList, diff --git a/cmd/number/number.go b/cmd/number/number.go index 4b9864f..549813f 100644 --- a/cmd/number/number.go +++ b/cmd/number/number.go @@ -6,4 +6,5 @@ import "github.com/spf13/cobra" var Cmd = &cobra.Command{ Use: "number", Short: "Manage Bandwidth phone numbers", + Long: "Search, order, activate, inspect, and release phone numbers. Numbers are referenced in E.164 format (e.g. +19195551234) throughout these commands.", } diff --git a/cmd/number/release.go b/cmd/number/release.go index d67c127..fbd2bdb 100644 --- a/cmd/number/release.go +++ b/cmd/number/release.go @@ -17,8 +17,10 @@ func init() { var releaseCmd = &cobra.Command{ Use: "release [number]", Short: "Release a phone number", - Args: cobra.ExactArgs(1), - RunE: runRelease, + Long: "Releases (disconnects) a phone number from the account. The number enters an aging period before it becomes available again. This cannot be undone.", + Example: ` band number release +19195551234`, + Args: cobra.ExactArgs(1), + RunE: runRelease, } func runRelease(cmd *cobra.Command, args []string) error { From 695a7e9a763d3ace43966ef9f3375fb4a8319ee4 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:45:41 -0400 Subject: [PATCH 13/15] tnoption docs --- cmd/tnoption/get.go | 1 + cmd/tnoption/list.go | 1 + 2 files changed, 2 insertions(+) diff --git a/cmd/tnoption/get.go b/cmd/tnoption/get.go index c5e4a81..e2a156c 100644 --- a/cmd/tnoption/get.go +++ b/cmd/tnoption/get.go @@ -16,6 +16,7 @@ func init() { var getCmd = &cobra.Command{ Use: "get ", Short: "Get the status of a TN Option Order", + Long: "Returns the status and details of a single TN Option Order by its order ID.", Example: ` band tnoption get ddbdc72e-dc27-490c-904e-d0c11291b095`, Args: cobra.ExactArgs(1), RunE: runGet, diff --git a/cmd/tnoption/list.go b/cmd/tnoption/list.go index 42bcec5..f7ae945 100644 --- a/cmd/tnoption/list.go +++ b/cmd/tnoption/list.go @@ -24,6 +24,7 @@ func init() { var listCmd = &cobra.Command{ Use: "list", Short: "List TN Option Orders", + Long: "Lists TN Option Orders for the account. Filter by order status with --status or by phone number with --tn.", Example: ` band tnoption list band tnoption list --status COMPLETE band tnoption list --tn +19195551234`, From 5b836681844cbd8868b4965a6ff52081976933e6 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:45:52 -0400 Subject: [PATCH 14/15] fix auth switch --- cmd/auth/switch.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/auth/switch.go b/cmd/auth/switch.go index 80938d0..043aafe 100644 --- a/cmd/auth/switch.go +++ b/cmd/auth/switch.go @@ -19,9 +19,8 @@ func init() { var switchCmd = &cobra.Command{ Use: "switch [account-id]", Short: "Switch the active account", - Long: `Switch between accounts accessible to your credentials. - - band auth switch # interactive selection + Long: `Switch between accounts accessible to your credentials.`, + Example: ` band auth switch # interactive selection band auth switch 9901303 # switch directly`, Args: cobra.MaximumNArgs(1), RunE: runSwitch, From d0d9bf888901f1824b1ddcff4b93424f5021e4aa Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 29 Jun 2026 14:46:17 -0400 Subject: [PATCH 15/15] gofmt --- cmd/app/delete.go | 6 +++--- cmd/auth/logout.go | 6 +++--- cmd/auth/profiles.go | 12 ++++++------ cmd/auth/switch.go | 2 +- cmd/bxml/raw.go | 6 +++--- cmd/message/media/delete.go | 6 +++--- cmd/message/media/get.go | 6 +++--- cmd/number/release.go | 6 +++--- cmd/recording/delete.go | 6 +++--- cmd/recording/download.go | 6 +++--- cmd/site/delete.go | 6 +++--- cmd/vcp/delete.go | 6 +++--- 12 files changed, 37 insertions(+), 37 deletions(-) diff --git a/cmd/app/delete.go b/cmd/app/delete.go index b246a4d..86db18d 100644 --- a/cmd/app/delete.go +++ b/cmd/app/delete.go @@ -14,9 +14,9 @@ func init() { } var deleteCmd = &cobra.Command{ - Use: "delete [id]", - Short: "Delete an application by ID", - Long: "Permanently deletes an application by its ID. This cannot be undone.", + Use: "delete [id]", + Short: "Delete an application by ID", + Long: "Permanently deletes an application by its ID. This cannot be undone.", Example: ` band app delete abc-123`, Args: cobra.ExactArgs(1), RunE: runDelete, diff --git a/cmd/auth/logout.go b/cmd/auth/logout.go index 5ca6be7..60b4c3a 100644 --- a/cmd/auth/logout.go +++ b/cmd/auth/logout.go @@ -16,9 +16,9 @@ func init() { } var logoutCmd = &cobra.Command{ - Use: "logout", - Short: "Log out and remove stored credentials", - Long: "Logs out by deleting stored secrets from the system keychain and removing the CLI config file. This affects all profiles, not just the active one.", + Use: "logout", + Short: "Log out and remove stored credentials", + Long: "Logs out by deleting stored secrets from the system keychain and removing the CLI config file. This affects all profiles, not just the active one.", Example: ` band auth logout`, RunE: runLogout, } diff --git a/cmd/auth/profiles.go b/cmd/auth/profiles.go index 57659a1..6c403f4 100644 --- a/cmd/auth/profiles.go +++ b/cmd/auth/profiles.go @@ -15,9 +15,9 @@ func init() { } var profilesCmd = &cobra.Command{ - Use: "profiles", - Short: "List all credential profiles", - Long: "Lists all configured credential profiles, marking the active one. Each profile holds its own client credentials, account, and environment.", + Use: "profiles", + Short: "List all credential profiles", + Long: "Lists all configured credential profiles, marking the active one. Each profile holds its own client credentials, account, and environment.", Example: ` band auth profiles`, RunE: runProfiles, } @@ -72,9 +72,9 @@ func runProfiles(cmd *cobra.Command, args []string) error { } var useCmd = &cobra.Command{ - Use: "use ", - Short: "Switch to a different credential profile", - Long: "Switches the active credential profile. Subsequent commands use the selected profile's credentials, account, and environment.", + Use: "use ", + Short: "Switch to a different credential profile", + Long: "Switches the active credential profile. Subsequent commands use the selected profile's credentials, account, and environment.", Example: ` band auth use admin`, Args: cobra.ExactArgs(1), RunE: runUse, diff --git a/cmd/auth/switch.go b/cmd/auth/switch.go index 043aafe..87d417d 100644 --- a/cmd/auth/switch.go +++ b/cmd/auth/switch.go @@ -19,7 +19,7 @@ func init() { var switchCmd = &cobra.Command{ Use: "switch [account-id]", Short: "Switch the active account", - Long: `Switch between accounts accessible to your credentials.`, + Long: `Switch between accounts accessible to your credentials.`, Example: ` band auth switch # interactive selection band auth switch 9901303 # switch directly`, Args: cobra.MaximumNArgs(1), diff --git a/cmd/bxml/raw.go b/cmd/bxml/raw.go index 47b5b7e..771942d 100644 --- a/cmd/bxml/raw.go +++ b/cmd/bxml/raw.go @@ -13,9 +13,9 @@ func init() { } var rawCmd = &cobra.Command{ - Use: "raw ", - Short: "Validate and pretty-print a BXML string", - Long: "Validates a BXML string by round-tripping it through an XML parser and prints it back indented. Exits with an error if the input is not well-formed XML.", + Use: "raw ", + Short: "Validate and pretty-print a BXML string", + Long: "Validates a BXML string by round-tripping it through an XML parser and prints it back indented. Exits with an error if the input is not well-formed XML.", Example: ` band bxml raw ""`, Args: cobra.ExactArgs(1), RunE: runRaw, diff --git a/cmd/message/media/delete.go b/cmd/message/media/delete.go index aec73dd..f5e96bf 100644 --- a/cmd/message/media/delete.go +++ b/cmd/message/media/delete.go @@ -14,9 +14,9 @@ func init() { } var deleteCmd = &cobra.Command{ - Use: "delete ", - Short: "Delete a media file", - Long: "Permanently deletes a media file by its ID. Any MMS that still references its URL will no longer be able to fetch it.", + Use: "delete ", + Short: "Delete a media file", + Long: "Permanently deletes a media file by its ID. Any MMS that still references its URL will no longer be able to fetch it.", Example: ` band message media delete my-campaign-image.jpg`, Args: cobra.ExactArgs(1), RunE: runDelete, diff --git a/cmd/message/media/get.go b/cmd/message/media/get.go index 5c21be3..3764c8a 100644 --- a/cmd/message/media/get.go +++ b/cmd/message/media/get.go @@ -18,9 +18,9 @@ func init() { } var getCmd = &cobra.Command{ - Use: "get ", - Short: "Download a media file", - Long: "Downloads a media file by its ID and writes it to the given file path.", + Use: "get ", + Short: "Download a media file", + Long: "Downloads a media file by its ID and writes it to the given file path.", Example: ` band message media get my-campaign-image.jpg --output image.jpg`, Args: cobra.ExactArgs(1), RunE: runGet, diff --git a/cmd/number/release.go b/cmd/number/release.go index fbd2bdb..8604c71 100644 --- a/cmd/number/release.go +++ b/cmd/number/release.go @@ -15,9 +15,9 @@ func init() { } var releaseCmd = &cobra.Command{ - Use: "release [number]", - Short: "Release a phone number", - Long: "Releases (disconnects) a phone number from the account. The number enters an aging period before it becomes available again. This cannot be undone.", + Use: "release [number]", + Short: "Release a phone number", + Long: "Releases (disconnects) a phone number from the account. The number enters an aging period before it becomes available again. This cannot be undone.", Example: ` band number release +19195551234`, Args: cobra.ExactArgs(1), RunE: runRelease, diff --git a/cmd/recording/delete.go b/cmd/recording/delete.go index b9720e6..873c093 100644 --- a/cmd/recording/delete.go +++ b/cmd/recording/delete.go @@ -14,9 +14,9 @@ func init() { } var deleteCmd = &cobra.Command{ - Use: "delete ", - Short: "Delete a recording", - Long: "Permanently deletes a recording's metadata and media. This cannot be undone.", + Use: "delete ", + Short: "Delete a recording", + Long: "Permanently deletes a recording's metadata and media. This cannot be undone.", Example: ` band recording delete c-123-abc r-456-def`, Args: cobra.ExactArgs(2), RunE: runDelete, diff --git a/cmd/recording/download.go b/cmd/recording/download.go index 5b54ff7..8219304 100644 --- a/cmd/recording/download.go +++ b/cmd/recording/download.go @@ -19,9 +19,9 @@ func init() { } var downloadCmd = &cobra.Command{ - Use: "download ", - Short: "Download a recording to a file", - Long: "Downloads a recording's audio media and writes it to the given file path. The file is written owner-only (0600) since recordings may contain sensitive call audio.", + Use: "download ", + Short: "Download a recording to a file", + Long: "Downloads a recording's audio media and writes it to the given file path. The file is written owner-only (0600) since recordings may contain sensitive call audio.", Example: ` band recording download c-123-abc r-456-def --output recording.wav`, Args: cobra.ExactArgs(2), RunE: runDownload, diff --git a/cmd/site/delete.go b/cmd/site/delete.go index 8019937..90a9f2d 100644 --- a/cmd/site/delete.go +++ b/cmd/site/delete.go @@ -14,9 +14,9 @@ func init() { } var deleteCmd = &cobra.Command{ - Use: "delete [id]", - Short: "Delete a sub-account by ID", - Long: "Permanently deletes a sub-account by its numeric ID. This cannot be undone.", + Use: "delete [id]", + Short: "Delete a sub-account by ID", + Long: "Permanently deletes a sub-account by its numeric ID. This cannot be undone.", Example: ` band subaccount delete 12345`, Args: cobra.ExactArgs(1), RunE: runDelete, diff --git a/cmd/vcp/delete.go b/cmd/vcp/delete.go index bc7e584..589c9ef 100644 --- a/cmd/vcp/delete.go +++ b/cmd/vcp/delete.go @@ -14,9 +14,9 @@ func init() { } var deleteCmd = &cobra.Command{ - Use: "delete ", - Short: "Delete a Voice Configuration Package", - Long: "Permanently deletes a Voice Configuration Package by its ID. This cannot be undone.", + Use: "delete ", + Short: "Delete a Voice Configuration Package", + Long: "Permanently deletes a Voice Configuration Package by its ID. This cannot be undone.", Example: ` band vcp delete abc-123-def`, Args: cobra.ExactArgs(1), RunE: runDelete,