Skip to content

Fix(cli): Rename adb-client command to adb-tunnel for consistency#283

Merged
shamanec merged 1 commit intoshamanec:developfrom
mogilevich:fix/adb-client-docs-command-name
Apr 16, 2026
Merged

Fix(cli): Rename adb-client command to adb-tunnel for consistency#283
shamanec merged 1 commit intoshamanec:developfrom
mogilevich:fix/adb-client-docs-command-name

Conversation

@mogilevich
Copy link
Copy Markdown
Contributor

Summary

The Cobra subcommand was registered as adb-client, but the rest of the codebase consistently uses adb-tunnel:

  • HTTP endpoints: /device/:udid/adb-tunnel, /devices/control/:udid/adb-tunnel
  • Router files: hub/router/adb_tunnel.go, provider/router/adb_tunnel.go
  • Handler functions: ADBTunnelHandler, ADBTunnelProxy
  • Usage examples in docs/adb-client.md already referenced ./GADS adb-tunnel

As a result, following the docs literally fails:

$ ./GADS adb-tunnel --hub=... --udid=...
Error: unknown command "adb-tunnel" for "GADS"

Changes

  • main.go: rename Cobra command adb-clientadb-tunnel and variable adbClientCmdadbTunnelCmd
  • docs/adb-client.mddocs/adb-tunnel.md (git rename, history preserved)
  • Update heading and closing note inside the doc
  • Update links in README.md and docs/hub.md

No behavior changes — only renames. The documented usage now actually works.

Test plan

  • go build succeeds
  • ./GADS adb-tunnel --help shows the command
  • ./GADS adb-client correctly errors with "unknown command"
  • All adb-client / adbClient references removed (verified via grep)

The CLI command was registered as 'adb-client' but the rest of the
codebase and docs used 'adb-tunnel':
 - HTTP endpoints: /device/:udid/adb-tunnel and /devices/control/:udid/adb-tunnel
 - Router files: hub/router/adb_tunnel.go, provider/router/adb_tunnel.go
 - Handler functions: ADBTunnelHandler, ADBTunnelProxy
 - Usage examples in docs/adb-client.md referenced './GADS adb-tunnel'

Running './GADS adb-tunnel' as documented failed with
'unknown command "adb-tunnel"'.

Align the Cobra command, variable name, docs filename, and links with
the rest of the tunnel naming so the documented usage actually works.

- main.go: Use 'adb-tunnel', rename adbClientCmd to adbTunnelCmd
- Rename docs/adb-client.md to docs/adb-tunnel.md
- Update README.md and docs/hub.md links
@shamanec
Copy link
Copy Markdown
Owner

Reasonable 👌

@shamanec shamanec merged commit 5aaee15 into shamanec:develop Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants