Update CLI usage docs to showcase the ability to inject environment variables in shell aliases

This commit is contained in:
Parth Patel
2023-05-08 01:04:35 -04:00
parent ad7972e7e1
commit 7aa5ef844c

View File

@@ -39,6 +39,22 @@ infisical init
infisical run -- [your application start command]
```
## Injecting environment variables in custom aliases
Custom aliases can utilize secrets from Infisical. Suppose there is a custom alias `yd` in `custom.sh` that runs `yarn dev` and needs the secrets provided by Infisical.
```bash
#!/bin/sh
yd() {
yarn dev
}
```
To make the secrets available from Infisical to `yd`, you can run the following command:
```bash
infisical run --command="source custom.sh && yd"
```
View all available options for `run` command [here](./commands/run)
## Examples: