main() — ui Function Reference
Architecture documentation for the main() function in index.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 71c2ba0e_8809_23a7_78c7_056942667014["main()"] d4164289_3de9_0784_ea6e_e33d5cea66a4["index.ts"] 71c2ba0e_8809_23a7_78c7_056942667014 -->|defined in| d4164289_3de9_0784_ea6e_e33d5cea66a4 style 71c2ba0e_8809_23a7_78c7_056942667014 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shadcn/src/index.ts lines 22–48
async function main() {
const program = new Command()
.name("shadcn")
.description("add items from registries to your project")
.version(
packageJson.version || "1.0.0",
"-v, --version",
"display the version number"
)
program
.addCommand(init)
.addCommand(create)
.addCommand(add)
.addCommand(diff)
.addCommand(view)
.addCommand(search)
.addCommand(migrate)
.addCommand(info)
.addCommand(build)
.addCommand(mcp)
.addCommand(registry)
// Legacy registry commands.
program.addCommand(registryBuild).addCommand(registryMcp)
program.parse()
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does main() do?
main() is a function in the ui codebase, defined in packages/shadcn/src/index.ts.
Where is main() defined?
main() is defined in packages/shadcn/src/index.ts at line 22.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free