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.
You can download and run tabcmd 2.0 as an executable file, or install it on the command line with pip.
For macOS and Linux, run the following command to install the latest stable version of tabcmd:
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:
Log in with
--username but not
--password, and tabcmd will prompt for the password to be entered
Log in using
--passwordfile instead of
Log in with a personal access token (PAT) (only available in tabcmd 2.0)
Log in with
--password and the password value listed in the command line. This is the simplest way to log in but it was the least secure.
The following command demonstrates starting a session:
tabcmd login -s <https://online.tableau.com> -t mysite -u email@example.com -p password
Here’s how to start a session and delete a workbook with one command. Note that you do not need login here:
tabcmd delete "Sales_Workbook" -s <https://online.tableau.com> -t campaign -u firstname.lastname@example.org -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.