Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli] Add machine readable output format #766

Merged
merged 3 commits into from
Jun 20, 2022
Merged

Conversation

tmarkovski
Copy link
Member

@tmarkovski tmarkovski commented Jun 19, 2022

Adds support for --json or -j flag to trinsic command which formats all output as JSON without color, suitable for processing with tools, like jq or ConvertFrom-Json

Bash

authToken=`trinsic --json config | jq -r '.["auth token"]'`

PowerShell

$config = trinsic --json config | ConvertFrom-Json
echo $config.'auth token'

@tmarkovski tmarkovski linked an issue Jun 20, 2022 that may be closed by this pull request
cli/src/macros.rs Outdated Show resolved Hide resolved
cli/src/services/mod.rs Outdated Show resolved Hide resolved
@tmarkovski tmarkovski merged commit 0641895 into main Jun 20, 2022
@tmarkovski tmarkovski deleted the ™️/cli-json-format branch June 20, 2022 15:34
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.

CLI: Add --out param to account login
2 participants