---
url: /api/cli-core/types/interfaces/interface-command-opts.md
description: api documentation of CommandOpts from @tsed/cli-core
---

## Usage

```typescript
import { CommandOpts } from "@tsed/cli-core";
```

> See [/packages/cli-core/src/interfaces/CommandOptions.ts](https://github.com/tsedio/tsed-cli/blob/v7.8.1/packages/cli-core/src/interfaces/CommandOptions.ts#L0-L0).

## Overview

```ts
interface CommandOpts {
    description: string;
    type?: Type<any>;
    itemType?: Type<any>;
    defaultValue?: string | number | boolean | any;
    required?: boolean;
    customParser?: (value: any) => any;
}
```

## description

```ts
description: string;
```

Description of the commander.option()

## type

```ts
type?: Type<any>;
```

Use type to parse the option (String, Number, Boolean, Array)

## itemType

```ts
itemType?: Type<any>;
```

Use item type to parse items

## defaultValue

```ts
defaultValue?: string | number | boolean | any;
```

Default value

## required

```ts
required?: boolean;
```

Define a require option

## customParser:

```ts
customParser?: (value: any) => any;
```

Use a custom Parser
