Skip to content

feat: add watch flag to get commands#254

Merged
ctrox merged 1 commit intomainfrom
get-watch
Jul 31, 2025
Merged

feat: add watch flag to get commands#254
ctrox merged 1 commit intomainfrom
get-watch

Conversation

@ctrox
Copy link
Contributor

@ctrox ctrox commented Jul 18, 2025

This adds a new --watch flag that works on most get commands. It does a normal get and then keeps nctl running while watching the specified resource for changes. This also works in combination with output options such as yaml, json etc.

As long as the resource is using the get.list() API, watch will automatically work. To accomplish this, the get commands need to implement a common interface listPrinter. For now, watch does not work in combination with the --all-projects and --all-namespaces flags.

@ctrox ctrox force-pushed the get-watch branch 2 times, most recently from 3d98d11 to 7e03e73 Compare July 21, 2025 08:52
This adds a new `--watch` flag that works on most get commands. It does
a normal get and then keeps nctl running while watching the specified
resource for changes. This also works in combination with output options
such as yaml, json etc.

As long as the resource is using the `get.list()` API, watch will
automatically work. To accomplish this, the get commands need to
implement a common interface `listPrinter`. For now, watch does not work
in combination with the --all-projects and --all-namespaces flags.
@ctrox ctrox merged commit e90a3b3 into main Jul 31, 2025
3 checks passed
@ctrox ctrox deleted the get-watch branch July 31, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants