Provide `--token-file` option analogous to `--password-file`
This way they too do not have to be typed in the command prompt but can be put in files with proper access controls.
Also maybe make the location configurable where tableau_auth.json is stored. Apart from the fact that it should be in ~/.cache or maybe ~/.local/state on linux according to the XDG Base Directory Specification it should definitely not be world readable as it apparently contains the raw token!
Yes, good suggestions. The json file shouldn't contain any tokens any more: it should really just be a config file. Configurable location seems like a nice option too.
I have been using --password-file to pass in a token or password, but it causes pretty complex login logic when trying to guess which one the user thinks they are using, so I'll probably add --token-file in the next update (which will also include logic to use the OS username if no username is given).
(this is not yet done for 2.0.7)
example usage: python -m tabcmd login --server https://tableau.net/ --site tabcmd --token-name jac --token-file jac.txt