This is powerful stuff, but I can't help feeling like it's adding unnecessary bloat to an already-enormously complicated command. What is the advantage of:
curl --variable "pwd@secret;[0-31]" \
--expand-user daniel:{{pwd}} \
https://example.com/
over, e.g. curl --user daniel:`command-to-fetch-password` \
https://example.com/
? That command may be as simple as an existing one, like cut.