Skip to main content

Definition

Assembly: CloudNimble.ClaudeEssentials.dll Namespace: CloudNimble.ClaudeEssentials.Hooks.Tools.Inputs Inheritance: System.Object

Syntax

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

.ctor

Syntax

public GrepToolInput()

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

CaseInsensitive

Gets or sets whether to perform case insensitive search.

Syntax

public System.Nullable<bool> CaseInsensitive { get; set; }

Property Value

Type: System.Nullable<bool>?

Glob

Gets or sets the glob pattern to filter files.

Syntax

public string Glob { get; set; }

Property Value

Type: string?

Remarks

Examples: “.js”, ”.

HeadLimit

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

Syntax

public System.Nullable<int> HeadLimit { get; set; }

Property Value

Type: System.Nullable<int>?

Remarks

Equivalent to ”| head -N”. Defaults to 0 (unlimited).

LinesAfter

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

Syntax

public System.Nullable<int> LinesAfter { get; set; }

Property Value

Type: System.Nullable<int>?

Remarks

Requires output_mode: “content”, ignored otherwise.

LinesBefore

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

Syntax

public System.Nullable<int> LinesBefore { get; set; }

Property Value

Type: System.Nullable<int>?

Remarks

Requires output_mode: “content”, ignored otherwise.

LinesContext

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

Syntax

public System.Nullable<int> LinesContext { get; set; }

Property Value

Type: System.Nullable<int>?

Remarks

Requires output_mode: “content”, ignored otherwise.

Multiline

Gets or sets whether to enable multiline mode.

Syntax

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.

Offset

Gets or sets the number of lines/entries to skip before applying head_limit.

Syntax

public System.Nullable<int> Offset { get; set; }

Property Value

Type: System.Nullable<int>?

Remarks

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

OutputMode

Gets or sets the output mode.

Syntax

public string OutputMode { get; set; }

Property Value

Type: string?

Remarks

Options: “content” (shows matching lines), “files_with_matches” (shows only file paths, default), “count” (shows match counts).

Path

Gets or sets the file or directory to search in.

Syntax

public string Path { get; set; }

Property Value

Type: string?

Remarks

Defaults to current working directory if not specified.

Pattern

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

Syntax

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).

ShowLineNumbers

Gets or sets whether to show line numbers in output.

Syntax

public System.Nullable<bool> ShowLineNumbers { get; set; }

Property Value

Type: System.Nullable<bool>?

Remarks

Requires output_mode: “content”, ignored otherwise. Defaults to true.

Type

Gets or sets the file type to search.

Syntax

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

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?