mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 14:27:30 +00:00
Docs: watch mode
This commit is contained in:
@@ -55,11 +55,11 @@ $ infisical run -- npm run dev
|
|||||||
Alternatively, you may use service tokens.
|
Alternatively, you may use service tokens.
|
||||||
|
|
||||||
Please note, however, that service tokens are being deprecated in favor of [machine identities](/documentation/platform/identities/machine-identities). They will be removed in the future in accordance with the deprecation notice and timeline stated [here](https://infisical.com/blog/deprecating-api-keys).
|
Please note, however, that service tokens are being deprecated in favor of [machine identities](/documentation/platform/identities/machine-identities). They will be removed in the future in accordance with the deprecation notice and timeline stated [here](https://infisical.com/blog/deprecating-api-keys).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Example
|
# Example
|
||||||
export INFISICAL_TOKEN=<service-token>
|
export INFISICAL_TOKEN=<service-token>
|
||||||
```
|
```
|
||||||
|
|
||||||
</Info>
|
</Info>
|
||||||
</Accordion>
|
</Accordion>
|
||||||
|
|
||||||
@@ -72,11 +72,20 @@ $ infisical run -- npm run dev
|
|||||||
# Example
|
# Example
|
||||||
export INFISICAL_DISABLE_UPDATE_CHECK=true
|
export INFISICAL_DISABLE_UPDATE_CHECK=true
|
||||||
```
|
```
|
||||||
|
|
||||||
</Accordion>
|
</Accordion>
|
||||||
|
|
||||||
### Flags
|
### Flags
|
||||||
|
|
||||||
|
<Accordion title="--watch">
|
||||||
|
By passing the `watch` flag, you are telling the CLI to watch for changes that happen in your Infisical project.
|
||||||
|
If secret changes happen, the command you provided will automatically be restarted with the new environment variables attached.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Example
|
||||||
|
infisical run --watch -- printenv
|
||||||
|
```
|
||||||
|
</Accordion>
|
||||||
|
|
||||||
<Accordion title="--project-config-dir">
|
<Accordion title="--project-config-dir">
|
||||||
Explicitly set the directory where the .infisical.json resides. This is useful for some monorepo setups.
|
Explicitly set the directory where the .infisical.json resides. This is useful for some monorepo setups.
|
||||||
|
|
||||||
@@ -84,7 +93,6 @@ $ infisical run -- npm run dev
|
|||||||
# Example
|
# Example
|
||||||
infisical run --project-config-dir=/some-dir -- printenv
|
infisical run --project-config-dir=/some-dir -- printenv
|
||||||
```
|
```
|
||||||
|
|
||||||
</Accordion>
|
</Accordion>
|
||||||
|
|
||||||
<Accordion title="--command">
|
<Accordion title="--command">
|
||||||
@@ -172,3 +180,19 @@ $ infisical run -- npm run dev
|
|||||||
</Accordion>
|
</Accordion>
|
||||||
|
|
||||||
</Accordion>
|
</Accordion>
|
||||||
|
|
||||||
|
|
||||||
|
## Automatically reload command when secrets change
|
||||||
|
|
||||||
|
To automatically reload your command when secrets change, use the `--watch` flag.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
infisical run --watch -- npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
This will watch for changes in your secrets and automatically restart your command with the new secrets.
|
||||||
|
When your command restarts, it will have the new environment variables injeceted into it.
|
||||||
|
|
||||||
|
<Note>
|
||||||
|
Please note that this feature is intended for development purposes. It is not recommended to use this in production environments. Generally it's not recommended to automatically reload your application in production when remote changes are made.
|
||||||
|
</Note>
|
||||||
Reference in New Issue
Block a user