put aliases docs in Accordion

This commit is contained in:
Maidul Islam
2023-05-13 11:17:17 -04:00
parent 7aa5ef844c
commit 174e22a2bc
+15 -13
View File
@@ -39,23 +39,25 @@ infisical init
infisical run -- [your application start command] infisical run -- [your application start command]
``` ```
## Injecting environment variables in custom aliases <Accordion title="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. 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 ```bash
#!/bin/sh #!/bin/sh
yd() { yd() {
yarn dev yarn dev
} }
``` ```
To make the secrets available from Infisical to `yd`, you can run the following command: To make the secrets available from Infisical to `yd`, you can run the following command:
```bash ```bash
infisical run --command="source custom.sh && yd" infisical run --command="source custom.sh && yd"
``` ```
View all available options for `run` command [here](./commands/run)
</Accordion>
View all available options for `run` command [here](./commands/run)
## Examples: ## Examples: