---
title: "infisical run"
description: "The command that injects your secrets into local environment"
---

<Tabs>
  <Tab title="Single command">
    ```bash
    infisical run [options] -- [your application start command]

    # Example
    infisical run [options] -- npm run dev
    ```
  </Tab>

  <Tab title="Chained commands">
    ```bash
    infisical run [options] --command [string command]

    # Example
    infisical run [options] --command "npm run bootstrap && npm run dev start; other-bash-command"
    ```
  </Tab>
</Tabs>

## Description

Inject secrets from Infisical into your application process.


## Subcommands & flags

<Accordion title="infisical run" defaultOpen="true">
  Use this command to inject secrets into your applications process

  ```bash
  $ infisical run -- <your application command>

  # Example 
  $ infisical run -- npm run dev
  ```

  ### Environment variables
  <Accordion title="INFISICAL_TOKEN">
    Used to fetch secrets via a [service token](/getting-started/dashboard/token) apposed to logged in credentials. Simply, export this variable in the terminal before running this command.

    ```bash
    # Example 
    export INFISICAL_TOKEN=st.63e03c4a97cb4a747186c71e.ed5b46a34c078a8f94e8228f4ab0ff97.4f7f38034811995997d72badf44b42ec
    ```
  </Accordion>

  <Accordion title="INFISICAL_DISABLE_UPDATE_CHECK">
    Used to disable the check for new CLI versions. This can improve the time it takes to run this command. Recommended for production environments.
    
    To use, simply export this variable in the terminal before running this command.

    ```bash
    # Example 
    export INFISICAL_DISABLE_UPDATE_CHECK=true
    ```
  </Accordion>

  ### Flags 
  <Accordion title="--command">
    Pass secrets into multiple commands at once

    ```bash
    # Example 
    infisical run --command="npm run build && npm run dev; more-commands..."
    ```
  </Accordion>

  <Accordion title="--token">
    If you are using a [service token](../../getting-started/dashboard/token) to authenticate, you can pass the token as a flag

    ```bash
    # Example 
    infisical run --token="st.63e03c4a97cb4a747186c71e.ed5b46a34c078a8f94e8228f4ab0ff97.4f7f38034811995997d72badf44b42ec" -- npm run start
    ```

    You may also expose the token to the CLI by setting the environment variable `INFISICAL_TOKEN` before executing the run command. This will have the same effect as setting the token with `--token` flag 
  </Accordion>

  <Accordion title="--expand">
    Turn on or off the shell parameter expansion in your secrets. If you have used shell parameters in your secret(s), activating this feature will populate them before injecting them into your application process.

    Default value: `true`
  </Accordion>

  <Accordion title="--env">
    This is used to specify the environment from which secrets should be retrieved. The accepted values are the environment slugs defined for your project, such as `dev`, `staging`, `test`, and `prod`.
    
    Default value: `dev`
  </Accordion>

  <Accordion title="--secret-overriding">
    Prioritizes personal secrets with the same name over shared secrets

    Default value: `true`
  </Accordion>

  <Accordion title="--tags">
    When working with tags, you can use this flag to filter and retrieve only secrets that are associated with a specific tag(s).

    ```bash
    # Example 
    infisical run --tags=tag1,tag2,tag3 -- npm run dev
    ```

    Note: you must reference the tag by its slug name not its fully qualified name. Go to project settings to view all tag slugs.

    By default, all secrets are fetched
  </Accordion>

</Accordion>
