> ## Documentation Index
> Fetch the complete documentation index at: https://ai.easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# GrepToolInput

> Represents the input parameters for the Grep tool. The Grep tool is a powerful content search built on ripgrep.

## Definition

**Assembly:** CloudNimble.ClaudeEssentials.dll

**Namespace:** CloudNimble.ClaudeEssentials.Hooks.Tools.Inputs

**Inheritance:** System.Object

## Syntax

```csharp theme={null}
CloudNimble.ClaudeEssentials.Hooks.Tools.Inputs.GrepToolInput
```

## Summary

Represents the input parameters for the Grep tool.
The Grep tool is a powerful content search built on ripgrep.

## Remarks

Supports full regex syntax (e.g., "log.\*Error", "function\s+\w+").
Filter files with glob parameter or type parameter.

## Constructors

### &#x20;.ctor

#### Syntax

```csharp theme={null}
public GrepToolInput()
```

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public Object()
```

## Properties

### &#x20;CaseInsensitive

Gets or sets whether to perform case insensitive search.

#### Syntax

```csharp theme={null}
public System.Nullable<bool> CaseInsensitive { get; set; }
```

#### Property Value

Type: `System.Nullable<bool>?`

### &#x20;Context

Gets or sets the number of lines to show before and after each match (rg -C).

#### Syntax

```csharp theme={null}
public System.Nullable<int> Context { get; set; }
```

#### Property Value

Type: `System.Nullable<int>?`

#### Remarks

Requires output\_mode: "content", ignored otherwise.

### &#x20;Glob

Gets or sets the glob pattern to filter files.

#### Syntax

```csharp theme={null}
public string Glob { get; set; }
```

#### Property Value

Type: `string?`

#### Remarks

Examples: "*.js", "*.{ts,tsx}"

### &#x20;HeadLimit

Gets or sets the limit on output to first N lines/entries.

#### Syntax

```csharp theme={null}
public System.Nullable<int> HeadLimit { get; set; }
```

#### Property Value

Type: `System.Nullable<int>?`

#### Remarks

Equivalent to "| head -N". Defaults to 250 when unspecified. Pass 0 for unlimited.

### &#x20;LinesAfter

Gets or sets the number of lines to show after each match.

#### Syntax

```csharp theme={null}
public System.Nullable<int> LinesAfter { get; set; }
```

#### Property Value

Type: `System.Nullable<int>?`

#### Remarks

Requires output\_mode: "content", ignored otherwise.

### &#x20;LinesBefore

Gets or sets the number of lines to show before each match.

#### Syntax

```csharp theme={null}
public System.Nullable<int> LinesBefore { get; set; }
```

#### Property Value

Type: `System.Nullable<int>?`

#### Remarks

Requires output\_mode: "content", ignored otherwise.

### &#x20;LinesContext

Gets or sets the number of lines to show before and after each match.
Alias for [GrepToolInput.Context](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Inputs/GrepToolInput.md#context).

#### Syntax

```csharp theme={null}
public System.Nullable<int> LinesContext { get; set; }
```

#### Property Value

Type: `System.Nullable<int>?`

#### Remarks

Requires output\_mode: "content", ignored otherwise.

### &#x20;Multiline

Gets or sets whether to enable multiline mode.

#### Syntax

```csharp theme={null}
public System.Nullable<bool> Multiline { get; set; }
```

#### Property Value

Type: `System.Nullable<bool>?`

#### Remarks

When enabled, '.' matches newlines and patterns can span lines. Default: false.

### &#x20;Offset

Gets or sets the number of lines/entries to skip before applying head\_limit.

#### Syntax

```csharp theme={null}
public System.Nullable<int> Offset { get; set; }
```

#### Property Value

Type: `System.Nullable<int>?`

#### Remarks

Equivalent to "| tail -n +N | head -N". Defaults to 0.

### &#x20;OutputMode

Gets or sets the output mode.

#### Syntax

```csharp theme={null}
public System.Nullable<CloudNimble.ClaudeEssentials.Hooks.GrepOutputMode> OutputMode { get; set; }
```

#### Property Value

Type: `System.Nullable<CloudNimble.ClaudeEssentials.Hooks.GrepOutputMode?>?`

#### Remarks

See [GrepOutputMode](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/GrepOutputMode.md) for possible values. Defaults to [GrepOutputMode.FilesWithMatches](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/GrepOutputMode.md#fileswithmatches).

### &#x20;Path

Gets or sets the file or directory to search in.

#### Syntax

```csharp theme={null}
public string Path { get; set; }
```

#### Property Value

Type: `string?`

#### Remarks

Defaults to current working directory if not specified.

### &#x20;Pattern

Gets or sets the regular expression pattern to search for in file contents.

#### Syntax

```csharp theme={null}
public string Pattern { get; set; }
```

#### Property Value

Type: `string`

#### Remarks

Uses ripgrep syntax. Literal braces need escaping (use "interface\{}" to find "interface{}" in Go code).

### &#x20;ShowLineNumbers

Gets or sets whether to show line numbers in output.

#### Syntax

```csharp theme={null}
public System.Nullable<bool> ShowLineNumbers { get; set; }
```

#### Property Value

Type: `System.Nullable<bool>?`

#### Remarks

Requires output\_mode: "content", ignored otherwise. Defaults to true.

### &#x20;Type

Gets or sets the file type to search.

#### Syntax

```csharp theme={null}
public string Type { get; set; }
```

#### Property Value

Type: `string?`

#### Remarks

Common types: js, py, rust, go, java, etc. More efficient than glob for standard file types.

## Methods

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public virtual string ToString()
```

#### Returns

Type: `string?`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.