Tableau provides the tabcmd command-line interface that you can use to automate site administration tasks on your Tableau Cloud or Tableau Server site. For example, you can use tabcmd to create or delete users, projects, and groups. This new version of tabcmd supports signing in with both Personal Access Tokens and passwords.
You can download and run tabcmd 2.0 as an executable file, or install it on the command line with pip.
Packaged apps are available for the latest release at (https://github.com/tableau/tabcmd/releases)
To run tabcmd manually as a python module, you can install the latest stable version from PyPI:
pip install tabcmd
You can install from the development branch for a preview of upcoming features. Run the following command to install from the development branch:
pip install git+https://github.com/tableau/tabcmd.git@development
If you would like to install an older version of tabcmd, you can continue to follow the instructions at https://help.tableau.com/current/server/en-us/tabcmd.htm#tabcmd-install
You can log in to the tabcmd CLI in one of four ways. Users on Tableau Cloud or Tableau Server with multi-factor authentication (MFA) must use the personal access token (PAT) method.
Log in with --username
but not --password
, and tabcmd prompts for the password to be entered
Log in using --passwordfile
instead of --password
Log in with a personal access token (PAT)
Log in with --password
and the password value listed in the command line. This is the simplest way to log in but it is the least secure and not recommended.
The following command demonstrates starting a session:
tabcmd login -s <https://online.tableau.com> -t mysite -u authority@email.com -p password
Here’s how to start a session and delete a workbook with one command. You don’t need login here:
tabcmd delete "Sales_Workbook" -s <https://online.tableau.com> -t campaign -u admin@email.com -p password
The options -s, -t, -u, and -p are among the tabcmd global variables, which can be used with any command.
For more information, see tabcmd Commands.
Full log information is written to the tabcmd.log
file. This file is included in the directory where the tabcmd program is running.