> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/demisto-sdk-development-guide/demisto-sdk-guide/demisto-sdk-commands/setup-env.md).

# setup-env

Configure the local environment for Demisto SDK and Cortex content development.

The `setup-env` command creates a content environment and integration/script environment. This command configures VS Code and Cortex XSOAR/XSIAM instances for development and testing. If the GCP project ID is not set, it only configures VS Code.

<details>

<summary>Notes</summary>

* The `setup-env` command downloads integration parameters from Google Secret Manager, if the environment variable `DEMISTO_SDK_GCP_PROJECT_ID` is set to the GCP project ID.
* The `setup-env` command creates a virtual environment in the `.venv` folder if the `--create-virtualenv` argument is included.
* The `setup-env` command configures VS Code debugging and linting for the provided file paths or content repository.
* If the `--instance-name` argument is included, the `setup-env` command creates an integration instance in the Cortex XSOAR or Cortex XSIAM tenant, with the provided file paths or content repository, if a secret was found in Google Secret Manager.

</details>

<details>

<summary>Usage</summary>

`demisto-sdk setup-env [OPTIONS] [FILE_PATHS]`

</details>

<details>

<summary>Arguments</summary>

| Argument                 | Description                                                                                                                                                  |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `-i, --input`            | Path(s) to content integrations or script to setup the environment. If not provided, the default is to configure the environment for the content repository. |
| `--create-virtualenv`    | Creates a `virtualenv` for the environment.                                                                                                                  |
| `--overwrite-virtualenv` | Overwrites any existing `virtualenv` directories. Use with the `--create-virtualenv` flag.                                                                   |
| `--secret-id`            | Secret ID, to use with Google Secret Manager instance. If not provided, the default is to use the integration ID.                                            |
| `--instance-name`        | Instance name to configure in Cortex XSOAR/XSIAM.                                                                                                            |
| `--run-test-module`      | Whether to run the test module of the integration.                                                                                                           |
| `--clean`                | Cleans the repository of temporary files created by the `pre-commit` command.                                                                                |

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/demisto-sdk-development-guide/demisto-sdk-guide/demisto-sdk-commands/setup-env.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
