"netbird status --json" should return json at NeedsLogin stage #1364

Open
opened 2025-11-20 05:29:05 -05:00 by saavagebueno · 5 comments
Owner

Originally created by @Silex on GitHub (Oct 25, 2024).

I'm trying to detect wether netbird was already configured or not.

Right now I'm doing "netbird status | grep NeedsLogin" but it'd be more logical if I could parse the json whatever stage netbird is (needslogin, disconnected, connected).

Originally created by @Silex on GitHub (Oct 25, 2024). I'm trying to detect wether netbird was already configured or not. Right now I'm doing "netbird status | grep NeedsLogin" but it'd be more logical if I could parse the json whatever stage netbird is (needslogin, disconnected, connected).
saavagebueno added the feature-requestclient labels 2025-11-20 05:29:05 -05:00
Author
Owner

@mgarces commented on GitHub (Oct 25, 2024):

so your suggestion is that --json is always available, even when client is not configured?

@mgarces commented on GitHub (Oct 25, 2024): so your suggestion is that `--json` is always available, even when client is not configured?
Author
Owner

@Silex commented on GitHub (Oct 25, 2024):

Yes, with data like { "status": "NeedLogin" } (and additional available info)

@Silex commented on GitHub (Oct 25, 2024): Yes, with data like `{ "status": "NeedLogin" }` (and additional available info)
Author
Owner

@Silex commented on GitHub (Oct 28, 2024):

That said I'm open for a better way of reporting "Client is not configured".

netbird status | grep NeedsLogin works but it does not feel very robust.

My use case is that I'm doing an OpenWRT netbird package with automatic client configuration.

@Silex commented on GitHub (Oct 28, 2024): That said I'm open for a better way of reporting "Client is not configured". `netbird status | grep NeedsLogin` works but it does not feel very robust. My use case is that I'm doing an OpenWRT netbird package with automatic client configuration.
Author
Owner

@rittycat commented on GitHub (Feb 2, 2025):

+1 for this. If you're going to make a flag that provides a machine-readable interface, it needs to be consistent. This is just begging for people to run into errors if they make wrappers (particularly for use-cases like automatic deployment)

@rittycat commented on GitHub (Feb 2, 2025): +1 for this. If you're going to make a flag that provides a machine-readable interface, it needs to be consistent. This is just begging for people to run into errors if they make wrappers (particularly for use-cases like automatic deployment)
Author
Owner

@jbillingredhat commented on GitHub (Nov 19, 2025):

In particular, any attempt to writing our own interfaces to netbird (such as a NetworkManager plugin) would be immensely helped by having a regular interface to the netbird process. Why provide JSON output only in certain circumstances?

@jbillingredhat commented on GitHub (Nov 19, 2025): In particular, any attempt to writing our own interfaces to netbird (such as a NetworkManager plugin) would be immensely helped by having a regular interface to the netbird process. Why provide JSON output only in certain circumstances?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1364