This allows the infisical-node SDK to be used as a cli to load env vars.
npx infisical-node [token] [env] [path] && node index.js
Why would you want this?
Infisical currently maintains a cli that users can use to populate the environment with env variables (or native integrations). But the cli has its own installation steps and adds another layer of complexity to the Infisical ecosystem. Why do we even need a cli when we could just use the node package itself?
How would end users use this feature
After installing npm i infisical-node, you can simply run the node package like an executable.
Instead of:
infisical run --env=staging --path=/apps/spotify -- node index.js
What is this feature?
This allows the infisical-node SDK to be used as a cli to load env vars.
npx infisical-node [token] [env] [path] && node index.js
Why would you want this?
Infisical currently maintains a cli that users can use to populate the environment with env variables (or native integrations). But the cli has its own installation steps and adds another layer of complexity to the Infisical ecosystem. Why do we even need a cli when we could just use the node package itself?
How would end users use this feature
After installing
npm i infisical-node
, you can simply run the node package like an executable.Instead of:
infisical run --env=staging --path=/apps/spotify -- node index.js
Users would:
npx infisical-node [token] [env] [path] && node index.js
How the feature works
It uses the very popular
commander
package to load command line args. Then it initializes anInfisicalClient
and fetches secrets.