Skip to content

Basic FDP Usage

Getting access

FDP data on OSDF is protected by token-based authentication (SciTokens). You do not need to obtain a token by hand. fdp acquires and refreshes one for you:

fdp login

This runs the consent flow and caches a bearer token per device under ~/.fdp/cache/. Tokens are short-lived, so fdp run acquires one itself when it needs to and your terminal is interactive. fdp logout deletes the cached token.

Access to DIII-D data still requires being a DIII-D user; see the note on the home page if you are not one yet.

Running your work through fdp

FDP data lives behind XRootD/Pelican, and the client libraries read their configuration when they load. The fdp wrapper sets that configuration and then launches your command in a fresh process. Run anything that touches FDP data through it:

fdp run python my_toksearch_script.py
fdp run jupyter lab
fdp run pytest

Note the explicit python: fdp run executes the command you give it, so fdp run my_script.py only works if that file is executable and carries a shebang.

To see what it sets, or to apply it to your current shell instead:

fdp env               # print the export statements
eval "$(fdp env)"     # apply them here

Looking around

fdp ls /archives          # list files on the origin server
fdp device list           # which tokamaks are installed, and what each can do
fdp backends              # which AI-assistant backends are available

Asking for data in plain language

The built-in assistant will write the pipeline for you:

fdp query "Fetch ip for shot 200000 and report the peak current in MA."
fdp chat                  # interactive session

See the AI Assistant page for backends, the GUI, and how to teach Claude Code, Cursor or Codex the TokSearch API.

Where to go next