Skip to content

Update instance ports from the CLI - #447

Draft
callen-bot wants to merge 2 commits into
agent/close-instance-portsfrom
codex/update-instance-ports
Draft

Update instance ports from the CLI#447
callen-bot wants to merge 2 commits into
agent/close-instance-portsfrom
codex/update-instance-ports

Conversation

@callen-bot

@callen-bot callen-bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add brev ports update <instance-or-node> with an edit alias
  • select a mapping interactively or target its stable port_id with --id
  • update destination ports and source CIDRs, including clearing restrictions with --allow-anywhere
  • update HTTP origin protocol and public/authorized access policy
  • support managed instances and registered nodes with human-readable or JSON output using the stack-wide schema without kind
  • mark brev ports update as beta and hide it from help and completion

Why

The UI performs these mutations in place. Modeling update as close plus create would introduce downtime and could change the mapping ID, endpoint, or allocated public port.

Impact

Users and automation can change all port fields exposed by the UI while preserving the existing mapping identity and public endpoint. Multiple field groups use separate API mutation RPCs in documented order and are not transactional.

Visibility

The brev ports command family is intentionally hidden from help and completion while its final naming and nesting are being discussed, including whether it should use a different name or live under a network-oriented parent. Exact commands remain callable so the implementation can be tested. This PR hides update and inherits the hidden group, list, create, and close commands from the earlier stack layers.

Stack

Validation

  • go test ./pkg/cmd ./pkg/cmd/ports
  • go test -race ./pkg/cmd/ports ./pkg/cmd
  • make fmtcheck vet lint
  • go build -o /tmp/brev-port-restack-full-brev .
  • help smoke tests confirm the complete ports command family remains hidden but callable explicitly

@callen-bot
callen-bot force-pushed the codex/update-instance-ports branch from 4a20ced to 07f2473 Compare August 14, 2026 20:20
@callen-bot
callen-bot force-pushed the codex/update-instance-ports branch from 07f2473 to 7d986c4 Compare August 19, 2026 16:57
@callen-bot
callen-bot force-pushed the codex/update-instance-ports branch from 7d986c4 to f3621b3 Compare August 20, 2026 00:07
@callen-bot
callen-bot force-pushed the codex/update-instance-ports branch from f3621b3 to 20dd1f6 Compare August 20, 2026 19:30
@callen-bot
callen-bot force-pushed the codex/update-instance-ports branch from 20dd1f6 to 6d7a6fc Compare August 20, 2026 19:49
@callen-bot
callen-bot force-pushed the codex/update-instance-ports branch from 6d7a6fc to 7fccbd1 Compare August 20, 2026 20:13
@callen-bot
callen-bot force-pushed the codex/update-instance-ports branch from 7fccbd1 to c2e4d71 Compare August 20, 2026 20:43
@callen-bot
callen-bot force-pushed the codex/update-instance-ports branch from c2e4d71 to da6431d Compare August 24, 2026 18:13
@callen-bot
callen-bot force-pushed the codex/update-instance-ports branch 2 times, most recently from da384c0 to 0f85e83 Compare August 24, 2026 18:34
@callen-bot
callen-bot force-pushed the codex/update-instance-ports branch from 0f85e83 to 627b4cd Compare August 25, 2026 03:44
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.

1 participant