---
title: "Class WatchCommand"
slug: "cli--sitecore.ch.cli.plugin.scripting.commands.watchcommand"
abstract: ""
---
# Class WatchCommand

Watches the script working folder for changes and pushes those changes to the Content Hub instance.

## 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.Scripting.CommandHandlers.WatchCommandHandler

WatchCommand

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

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

## Syntax

```csharp
public class WatchCommand : BaseCommand<WatchCommandHandler>
```

## Remarks

**Optional parameters**

- `--endpoint -e` Specifies an alternative endpoint name for the execution of this command.
- `--folder -f` Specifies the script working folder where the script files are located. If the --folder option is not specified, the current folder is assumed to be the script working folder.
- `--log-poll-interval -l` Specifies how often, in seconds, the scripts are polled for new log changes. Default value: 3 second

**Global parameters**

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

## Examples

Watching scripts:

```csharp
ch-cli scripting watch
```

Watching scripts with specific polling interval:

```csharp
ch-cli scripting watch --log-poll-interval "<seconds>"
```
