dwave-cloud-client
dwave-cloud-client copied to clipboard
Add `--raw`/`-r` option to "get token" CLI commands
Currently, to fetch a specific project's SAPI token (for use in scripting), one can write:
dwave leap project token --project CODE --json | jq .token -r
and then use it like this, for example, to list available solvers:
DWAVE_API_TOKEN=$(dwave leap project token --project CODE --json | jq .token -r) dwave solvers -la
We can simplify the JSON filtering part, though, by introducing --raw/-r option that returns raw token string:
$ dwave leap project token --project CODE --raw
a66...fe
Similarly for dwave auth get <token-type> command.