> For the complete documentation index, see [llms.txt](https://docs.omics.ai/products/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.omics.ai/products/command-line-interface/reference/workbench/workflows-versions-dependencies-create.md).

# workflows versions dependencies create

## Synopsis

```shell
omics workbench workflows versions dependencies create
  --workflow=WORKFLOW_ID
  --version=VERSION_ID
  --name=DEPENDENCY_NAME
  --dependency=DEPENDENCY_SPEC [--dependency=DEPENDENCY_SPEC ...]
  [--global]
  [--namespace=NAMESPACE]
```

## Description

Create a new workflow dependency that establishes prerequisites for a workflow version. Dependencies ensure that specified workflows are executed before the current workflow runs. You can specify multiple dependencies and use automatic version resolution.

Dependency specifications can be provided in two formats:

* `workflow-id/version-id` - Specifies an explicit version
* `workflow-id` - Automatically resolves to the latest version

## Examples

Create a simple workflow dependency:

```shell
omics workbench workflows versions dependencies create \
  --workflow 40c67272-3553-4bb1-8662-81c81acff347 \
  --version latest \
  --name "Data preprocessing" \
  --dependency "5633fe10-b66a-4a20-8258-9963e4cac6fa/v1.0"
```

Create a dependency with automatic version resolution:

```shell
omics workbench workflows versions dependencies create \
  --workflow 40c67272-3553-4bb1-8662-81c81acff347 \
  --version v2.0 \
  --name "Analysis pipeline" \
  --dependency "preprocessing-workflow"
```

Create a dependency with multiple prerequisites:

```shell
omics workbench workflows versions dependencies create \
  --workflow 40c67272-3553-4bb1-8662-81c81acff347 \
  --version latest \
  --name "Multi-step analysis" \
  --dependency "data-cleaning/v1.2" \
  --dependency "quality-control/v2.1" \
  --dependency "normalization"
```

Create a global dependency (admin only):

```shell
omics workbench workflows versions dependencies create \
  --workflow 40c67272-3553-4bb1-8662-81c81acff347 \
  --version latest \
  --name "System dependency" \
  --dependency "system-init/v1.0" \
  --global
```

## Flags

### `--workflow`=`WORKFLOW_ID`

**Required**. Specify the UUID of the workflow for which you want to create a dependency.

### `--version`=`VERSION_ID`

**Required**. Specify the version ID of the workflow for which you want to create a dependency.

### `--name`=`DEPENDENCY_NAME`

**Required**. A human-readable name for the dependency that describes its purpose.

### `--dependency`=`DEPENDENCY_SPEC`

**Required**. Specify a dependency in the format `workflow-id/version-id` or `workflow-id`. When only the workflow ID is provided, the system automatically resolves to the latest available version. This flag can be specified multiple times to create dependencies on multiple workflows.

### `--global`

Create a global dependency that applies across all namespaces. This flag requires administrator privileges and adds the `X-Admin-Only-Action` header to the request.

### `--namespace`=`NAMESPACE`

An optional flag to define the namespace to connect to. By default, the namespace is extracted from the user's credentials.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.omics.ai/products/command-line-interface/reference/workbench/workflows-versions-dependencies-create.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
