# CommandProvider Interface

import { CommandProvider } from "@tsed/cli-core"

# 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