Skip to content

Command line tools

Use an alias token to connect an external tool to XNAT. Choose the client that suits your workflow.

Install xnatutils from PyPI:

Terminal window
pip3 install xnatutils

Create a .netrc file in your home directory and add your XNAT server, alias and secret:

machine https://xnat.rcc.uq.edu.au
user <your-alias>
password <your-alias-secret>

Do not commit an alias or secret to source control. Restrict access to a .netrc file on Linux or macOS:

Terminal window
chmod 600 ~/.netrc

Revoke the alias token in XNAT when you no longer need it or if its secret may have been exposed.