CLI: Can I use Environment Variables for session or API keys?

Hi there,

I’m working on creating a shell plugin for a forthcoming feature in a product I use. It would let me securely store credentials used by all kinds of CLI tools I work with, and I want to create such a plugin for Balena’s CLI.

Here’s the documentation around the step I am at.

I’ve looked over the Balena CLI docs, but I’m not sure if this particular need is addressed by the CLI?

I’ve answered my own question after some more digging. I will be able to use a file provisioner to read/write the token file in the ~.balena/ directory.

I’ll make another post once I finish the shell plugin, it’s pretty neat how it works!

1 Like

Glad to see you were able to find a solution. Did you have anything you found to share?