cli() — astro Function Reference
Architecture documentation for the cli() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 7bca0dcc_def0_4a57_f212_a606fe44f550["cli()"] 77e94539_cbbc_447e_0bb6_d3977c1fa5b1["index.ts"] 7bca0dcc_def0_4a57_f212_a606fe44f550 -->|defined in| 77e94539_cbbc_447e_0bb6_d3977c1fa5b1 6302ee25_0719_bd98_a65a_ef18d03c4616["resolveCommand()"] 7bca0dcc_def0_4a57_f212_a606fe44f550 -->|calls| 6302ee25_0719_bd98_a65a_ef18d03c4616 25e670b0_baf7_d1c0_92b6_8e24a4a2266b["runCommand()"] 7bca0dcc_def0_4a57_f212_a606fe44f550 -->|calls| 25e670b0_baf7_d1c0_92b6_8e24a4a2266b style 7bca0dcc_def0_4a57_f212_a606fe44f550 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/cli/index.ts lines 273–282
export async function cli(argv: string[]) {
const flags = yargs(argv, { boolean: ['global'], alias: { g: 'global' } });
const cmd = resolveCommand(flags);
try {
await runCommand(cmd, flags);
} catch (err) {
const { throwAndExit } = await import('./throw-and-exit.js');
await throwAndExit(cmd, err);
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does cli() do?
cli() is a function in the astro codebase, defined in packages/astro/src/cli/index.ts.
Where is cli() defined?
cli() is defined in packages/astro/src/cli/index.ts at line 273.
What does cli() call?
cli() calls 2 function(s): resolveCommand, runCommand.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free