# HelpReplFn

**Kind:** Class

**Source:** [`packages/core/repl/native-functions/help-repl-fn.ts`](https://github.com/nestjs/nest/blob/master/packages/core/repl/native-functions/help-repl-fn.ts#L6)

**Part of:** [Core](subsystem-packages-core)

`HelpReplFn` implements the native `help` command for the core REPL. Its `action()` method displays available REPL commands or usage guidance, helping users discover supported interactive functionality.

**Extends:** `ReplFunction`

## Methods

| Method | Signature | Returns |
|---|---|---|
| `action` | `action()` | `void` |

## Properties

| Property | Type |
|---|---|
| `fnDefinition` | `ReplFnDefinition` |
| `buildHelpMessage` | `any` |

## Diagram

```mermaid
graph LR
  U[REPL User] --> C[help command]
  C --> H[HelpReplFn]
  H --> A[action()]
  A --> O[Help text written to REPL output]
```

## Usage

```ts
import { HelpReplFn } from "@core/repl/native-functions/help-repl-fn";

// Construct the command with the same REPL dependencies used by the command registry.
const helpCommand = new HelpReplFn(/* REPL context or output dependencies */);

// Execute the native help command.
helpCommand.action();
```

## AI Coding Instructions

- Keep `action()` focused on presenting help content; avoid adding command-execution logic to this class.
- Register `HelpReplFn` through the REPL native-function or command registry so users can invoke it interactively.
- Keep displayed command names and descriptions synchronized with the commands actually available in the REPL.
- Preserve the REPL’s existing output mechanism and formatting conventions when changing help text.
