[PR #22] [MERGED] Added JSON-formatted output to CLI #1204

Closed
opened 2025-12-29 02:29:12 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/22
Author: @juanfont
Created: 5/8/2021
Status: Merged
Merged: 5/8/2021
Merged by: @juanfont

Base: mainHead: json-output


📝 Commits (8)

  • 33bee1d Do not print stuff in the library
  • 4b3b484 Return the machine when registering
  • 3b34f71 Adding support for JSON-formatted output 1/n
  • abde7dd More json output
  • 8a20737 Add some return when enabling routing succeedes + some comments...
  • 5cbd2d4 Update README to mention json output + some minor updates
  • 9eaac71 Trim trailing spaces
  • 8ad366f Use JsonOutput in version too

📊 Changes

10 files changed (+165 additions, -45 deletions)

View changed files

📝 README.md (+34 -9)
📝 cli.go (+9 -14)
📝 cmd/headscale/cli/namespaces.go (+16 -5)
📝 cmd/headscale/cli/nodes.go (+15 -3)
📝 cmd/headscale/cli/preauthkeys.go (+15 -3)
📝 cmd/headscale/cli/routes.go (+17 -1)
📝 cmd/headscale/cli/utils.go (+38 -0)
📝 cmd/headscale/headscale.go (+7 -0)
📝 routes.go (+11 -7)
📝 utils.go (+3 -3)

📄 Description

This series of commits add support for a basic JSON output in all the Headscale commands.

The structure of the JSON is veeeery subject to changes, but this should help with the development of integration tests + automating the deployments of headscale.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/22 **Author:** [@juanfont](https://github.com/juanfont) **Created:** 5/8/2021 **Status:** ✅ Merged **Merged:** 5/8/2021 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `json-output` --- ### 📝 Commits (8) - [`33bee1d`](https://github.com/juanfont/headscale/commit/33bee1df05c2d57ac47a9d6edad60b71dc21b37b) Do not print stuff in the library - [`4b3b484`](https://github.com/juanfont/headscale/commit/4b3b48441ff28af6fabbf6681038193263bd8fe8) Return the machine when registering - [`3b34f71`](https://github.com/juanfont/headscale/commit/3b34f715ce0925f5ac86cdc562022f65d1b73488) Adding support for JSON-formatted output 1/n - [`abde7dd`](https://github.com/juanfont/headscale/commit/abde7dddb7485e93d6adc9007f30aebdfbec73ad) More json output - [`8a20737`](https://github.com/juanfont/headscale/commit/8a207374c6a9948a9da88810d1e4b7fc8bf19c2e) Add some return when enabling routing succeedes + some comments... - [`5cbd2d4`](https://github.com/juanfont/headscale/commit/5cbd2d43a8fbc6c7fd7a7c0ba6474c91cbca39b7) Update README to mention json output + some minor updates - [`9eaac71`](https://github.com/juanfont/headscale/commit/9eaac717624a07b711e6b1f39f24164788568578) Trim trailing spaces - [`8ad366f`](https://github.com/juanfont/headscale/commit/8ad366f977f00fd877493a00bc603249763ab958) Use JsonOutput in version too ### 📊 Changes **10 files changed** (+165 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+34 -9) 📝 `cli.go` (+9 -14) 📝 `cmd/headscale/cli/namespaces.go` (+16 -5) 📝 `cmd/headscale/cli/nodes.go` (+15 -3) 📝 `cmd/headscale/cli/preauthkeys.go` (+15 -3) 📝 `cmd/headscale/cli/routes.go` (+17 -1) 📝 `cmd/headscale/cli/utils.go` (+38 -0) 📝 `cmd/headscale/headscale.go` (+7 -0) 📝 `routes.go` (+11 -7) 📝 `utils.go` (+3 -3) </details> ### 📄 Description This series of commits add support for a basic JSON output in all the Headscale commands. The structure of the JSON is veeeery subject to changes, but this should help with the development of integration tests + automating the deployments of headscale. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:29:12 +01:00
adam closed this issue 2025-12-29 02:29:12 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1204