Skip to content

Print YAML and JSON output for whoami#358

Merged
thirdeyenick merged 1 commit intoninech:mainfrom
schmijos:main
Mar 3, 2026
Merged

Print YAML and JSON output for whoami#358
thirdeyenick merged 1 commit intoninech:mainfrom
schmijos:main

Conversation

@schmijos
Copy link
Copy Markdown
Contributor

We're iterating through all organisations a user is part of in a script. This is more comfortable if we've got structured output to parse. This change introduces two new output formats for nctl auth whoami: json and yaml.

For example:

  • nctl auth whoami -o json
    {
      "account": "josua.schmid@renuo.ch",
      "organization": "n10518",
      "project": "n10518",
      "orgs": [
        "n10518",
        "renuo",
        "renuotest"
      ]
    }
  • nctl auth whoami -o yaml
    account: josua.schmid@renuo.ch
    organization: n10518
    orgs:
    - n10518
    - renuo
    - renuotest

The default is nctl auth whoami -o text for which the output looks as it did before:

Account: josua.schmid@renuo.ch
Organization: n10518
Project: n10518

Available Organizations:
*	n10518
	renuo
	renuotest

@schmijos
Copy link
Copy Markdown
Contributor Author

schmijos commented Mar 2, 2026

Linting issue seems to be related to a golang.org/x/net update

@thirdeyenick
Copy link
Copy Markdown
Contributor

Linting issue seems to be related to a golang.org/x/net update

Maybe you could do a go get golang.org/x/net in your branch to have it updated? Then the linter should pass.

@thde
Copy link
Copy Markdown
Member

thde commented Mar 2, 2026

Linting issue seems to be related to a golang.org/x/net update

Maybe you could do a go get golang.org/x/net in your branch to have it updated? Then the linter should pass.

You should just be able to rebase from main.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@schmijos schmijos requested a review from thde March 3, 2026 07:32
Copy link
Copy Markdown
Contributor

@thirdeyenick thirdeyenick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@thirdeyenick thirdeyenick merged commit 8b2c0b7 into ninech:main Mar 3, 2026
3 checks passed
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.

3 participants