import type { CommandOptions } from '../../types/ace.ts'; import { BaseCommand } from '../../modules/ace/main.ts'; /** * Command to display a list of all registered routes in the application. * Supports filtering by keywords, middleware, and output formatting options. * Routes can be displayed as a formatted list, table, or JSON. * * @example * ``` * ace list:routes * ace list:routes user * ace list:routes --middleware=auth * ace list:routes --ignore-middleware=guest * ace list:routes --json * ace list:routes --table * ``` */ export default class ListRoutes extends BaseCommand { /** * The command name */ static commandName: string; /** * The command description */ static description: string; /** * Command options configuration. * Requires the application to be started so routes are loaded. */ static options: CommandOptions; /** * Keyword to match against route names, patterns, and controller names */ match: string; /** * Filter routes that include all specified middleware names */ middleware: string[]; /** * Filter routes that do not include all specified middleware names */ ignoreMiddleware: string[]; /** * Output routes as JSON format */ json: boolean; /** * Output routes as a CLI table format */ table: boolean; /** * Output routes as JSONL (one JSON object per line), optimized for * machine consumption by AI agents and CLI tools */ jsonl: boolean; /** * Execute the command to list application routes. * Creates a formatter with the specified filters and outputs routes * in the requested format (JSON, table, or formatted list). */ run(): Promise; }