@adonisjs/ace
Version:
A CLI framework for Node.js
49 lines (48 loc) • 1.22 kB
TypeScript
import { BaseCommand } from './base.ts';
import type { CommandMetaData } from '../types.ts';
/**
* The list command is used to view a list of commands
*
* @example
* ```ts
* // Usage from CLI: node ace list
* // Or with namespace filter: node ace list migrate
* // Or as JSON: node ace list --json
* const listCommand = new ListCommand(kernel, parsed, ui, prompt)
* await listCommand.run()
* ```
*/
export declare class ListCommand extends BaseCommand {
#private;
/**
* Command metadata
*/
static commandName: string;
static description: string;
static help: string[];
/**
* Optional namespaces to filter the command list
*/
namespaces?: string[];
/**
* Flag to output the command list as JSON
*/
json?: boolean;
/**
* Renders a formatted list of options and commands to the console
*/
protected renderList(): void;
/**
* Returns command data as JSON for the --json flag
*/
protected renderToJSON(): CommandMetaData[];
/**
* Executes the list command to display available commands
*
* @example
* ```ts
* await listCommand.run()
* ```
*/
run(): Promise<void>;
}