You might not want to see external environment variables though as they are used by some to hold sensitive information (in the mistaken belief that they are somehow "secure" since they are not obviously visible - of course, since they are held in the OS memory, that isn't actually true).
But I am really getting dizzy with env things just now and not being able to easily see them it became a bit of an unanswered question.
Like so many things in computing where do you draw the line.
But what's the difference between env and global then?
Only in that if env is also seen globally, I am not quite getting their exact meaning.
Ok, certain nodes need a key to use them.
That is - I'm guessing - stored in their env.
But then that gets into a grey area for me to where is that different to node context?
(Only that one is privte and one is public)
could you elaborate on where/how it fits in?
Is there flow, global and nodeeenv variables?
Would that be complicating things in that way?
That's a good question that has become a little blurred by how they are being used in sub-flows, tabs and groups.
Environment variables are just that, they exist in the Operating System environment, not strictly in Node-RED - or at least, that is the definition, whether that is how they are actually being implemented in sub-flows, tabs and groups is a matter that I've not looked into.
It would have been feasible in theory to implement more different types of context variable for those contexts.
However, the difference from a Node-RED perspective is that env variables can be incorporated into other inputs. So you can do this:
Which you cannot do with a context/flow/global variable. In other words, they can be used even if someone has not allowed the specific use in the typed input field. They can also be used like this:
Which again cannot be done another way without using JSONata.
No, you cannot really have a node environment variable and there wouldn't be much point since you can simply use use a node's context store to do that (well, you can't do that in anything other than a function node - see the other thread on requesting context support in typed input for more on that subject).
Again, the real point of an environment variable is that they normally live in the Operating Systems memory space and not in Node-RED/node.js - it is simply that Node-RED's use of them in tabs, groups and sub-flows somewhat confuses that concept since those environment variables only live in Node-RED's memory space (which doesn't make it wrong or less useful, just confusing). A context/flow/global variable always lives in Node-RED's memory space (though it may ALSO live in a permanent store as well if you have defined one in settings.js).