The "test-var-get" command:

Usage: fossil test-var-get VAR ?FILE?

Write the text of the VAR variable into FILE.  If FILE is "-"
or is omitted then output goes to standard output.  VAR can be a
GLOB pattern.

If not in an open check-out, use the -R REPO option to specify a
a repository.