It turns out that you need to be in the mattermost
directory only for non GitLab Omnibus installations.
For GitLab omnibus, the format of the command is as follows:
sudo -u mattermost /opt/gitlab/embedded/bin/mattermost --config=/var/opt/gitlab/mattermost/config.json help
It looks like the CLI command that you want to run must be at the end, after the --config option, not before.
Try this command from your home directory to see if it works:
sudo -u mattermost /opt/gitlab/embedded/bin/mattermost --config=/var/opt/gitlab/mattermost/config.json roles system_admin traxwriter