# PostgresServerResource.WithRepl

- Module: [Aspire.Hosting.PostgreSQL](/reference/api/go/aspire.hosting.postgresql.md)
- Defined on: [PostgresServerResource](/reference/api/go/aspire.hosting.postgresql/postgresserverresource.md)
- Version: `17.0.0`
- Kind: `method`

Adds a REPL command that opens an authenticated PostgreSQL shell in the dashboard terminal dock.

## Remarks

This command is opt-in and available only in run mode. Dashboard users who can execute resource commands
can run commands with the resource's configured credentials. Enable it only for trusted dashboard users,
especially when sharing the dashboard through a tunnel or remote development environment.

## Definition

```go
type PostgresServerResource interface {
    // ... omitted for brevity
    WithRepl() PostgresServerResource
}
```

## Signature

```go
WithRepl() PostgresServerResource
```

## Returns

[`PostgresServerResource`](/reference/api/go/aspire.hosting.postgresql/postgresserverresource.md) -- The resource builder for chaining.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [PostgresServerResource](/reference/api/go/aspire.hosting.postgresql/postgresserverresource.md) -- `handle`
