﻿---
title: stack kb streams post-streams-name-fork cli command
description: Fork a stream Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4120/reference/elastic-cli/cli/stack/kb/streams/post-streams-name-fork
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb streams post-streams-name-fork cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb streams post-streams-name-fork \
  --name <name> \
  --stream <stream> \
  --where <where> \
  [options]
```

Fork a stream
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--name string required">
    The name of the parent stream to fork from.
  </definition>
  <definition term="--stream string required">
  </definition>
  <definition term="--where string required">
  </definition>
  <definition term="--draft">
  </definition>
  <definition term="--status enum">
    **Values:** enabled, disabled
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>