# CommandProvider Interface

Module
import { CommandProvider } from "@tsed/cli-core"
Source/packages/cli-core/src/interfaces/CommandProvider.ts

# Overview

interface CommandProvider {
    $prompt?<T = any>(initialOptions: any): QuestionOptions<T>;
    $mapContext?(options: any): any;
    $beforeExec?(options: any): Promise<any>;
    $exec(options: any): Tasks | Promise<Tasks>;
    $postInstall?(options: any): Tasks | Promise<Tasks>;
}

# Members

$prompt?<T = any>(initialOptions: any): QuestionOptions<T>

Hook to create the main prompt for the command See https://github.com/enquirer/enquirer for more detail on question configuration.


$mapContext?(options: any): any

Hook to map options


$beforeExec?(options: any): Promise<any>

Run something before the exec hook


$exec(options: any): Tasks | Promise<Tasks>

Run a command


$postInstall?(options: any): Tasks | Promise<Tasks>

Run commands after the npm/yarn install