It is supposed to be case insensitive and that issue was reported to Particle a while back - maybe this is a regression or you've got an old version of CLI.
What's your version?
@jvanier can you have a look at CLI for that issue?
I'll try to locate the previous report.
Update:
It wasn't exactly for the keys
keyword, but for the device add
command, but that's still a bug, since the device ID validity check should be consistent over all commands
@jvanier, should we reopen the old issue or file a new one that stresses the call for consistency across all commands?
BTW, the aleged "fix" in that issue seems rather questionable to me (to say the least of the words that pop to mind)!
And obviously did that internal bug not get filed, since there were several versions since Feb. 2016.