---
title: "Class PullEntityDefinitionCommand"
slug: "cli--sitecore.ch.cli.plugin.serialization.commands.pullentitydefinitioncommand"
abstract: ""
---
# Class PullEntityDefinitionCommand

Serializes one or more entity definitions from the connected Content Hub instance to the local file system.

## Inheritance

object

System.CommandLine.Symbol

System.CommandLine.IdentifierSymbol

[Command](https://learn.microsoft.com/dotnet/api/system.commandline.command)

Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand

Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand<THandler>Sitecore.CH.Cli.Plugin.Serialization.CommandHandlers.PullEntityDefinitionCommandHandler

PullEntityDefinitionCommand

## Namespace: SitecoreSitecore.CHSitecore.CH.CliSitecore.CH.Cli.PluginSitecore.CH.Cli.Plugin.SerializationCommands

## Assembly: Sitecore.CH.Cli.Plugin.Serialization.dll

## Syntax

```csharp
public sealed class PullEntityDefinitionCommand : BaseCommand<PullEntityDefinitionCommandHandler>
```

## Remarks

**Optional parameters**

- `--endpoint -e` Specifies an alternative endpoint name for the execution of this command.
- `--name -n` Name of the entity definition to pull. Wildcards allowed.
- `--remove-missing -r` Remove local-only entity definitions.
- `--updates -u`Update only entity definitions modified in the last minutes (see --minutes).
- `--minutes -m` Minutes to go back to look for modified entity definitions. Default is 30 minutes.
- `--folder -f` Specifies the a working directory other than the current folder.

**Global parameters**

- `-? --help -h` Show this help message and exit.
- `-v --verbosity` Enables verbose logging.

## Examples

Serialize an entity definition that matches the specified name:

```csharp
ch-cli serialization pull entity-definition -name "<entity definition name>"
```

Serialize all entity definitions, using the specified working directory:

```csharp
ch-cli serialization pull entity-definition --folder "<local path>"
```

Serialize all entity definitions that match the specific name to a specific folder:

```csharp
ch-cli serialization pull entity-definition --name "<name-starts*j>" --folder "<local path>"
```

Serialize all entity definitions that match the specified name and remove all local entity definitions that exist in the file system but not in the connected Content Hub instance:

```csharp
ch-cli serialization pull entity-definition -name "<entity definition name>" --remove-missing
```

Serialize all entity definitions that were updated recently (see --minutes):

```csharp
ch-cli serialization pull entity-definition --updates --minutes "<15>"
```
