CLI Command Reference

Comprehensive guide to all commands in rahulchaube-cli.

Execute & Build Commands

`rahulchaube run <script|file>`

Run a script defined in package.json or execute a JS/TS file directly.

rahulchaube run index.ts
rahulchaube run dev

`rahulchaube test`

Execute unit tests in the current workspace.

rahulchaube test
# Output: [OK] 12 tests passed (45ms)

`rahulchaube build [entry]`

Bundle JavaScript or TypeScript applications for production with minification and code-splitting.

rahulchaube build src/index.ts --outdir dist --minify

Package Manager Commands

`rahulchaube install`

Install all dependencies specified in package.json.

rahulchaube install
# Output: [OK] Installed 110 packages (0.42s)

`rahulchaube add <package>`

Add a new dependency to the project.

rahulchaube add react framer-motion
rahulchaube add --dev typescript @types/react

`rahulchaube remove <package>`

Remove a dependency from package.json.

rahulchaube remove lodash

`rahulchaube update [package]`

Update dependencies to their latest compatible semantic versions.

rahulchaube update

`rahulchaube why <package>`

Explain why a dependency is installed and display its resolution chain.

rahulchaube why clsx
# Output: clsx is required by tailwind-merge

`rahulchaube graph`

Render an ASCII representation of the project dependency graph.

rahulchaube graph

`rahulchaube cache clean`

Clean local package resolution and binary caches.

rahulchaube cache clean

Maintenance & Diagnostics

`rahulchaube doctor`

Diagnose environment variables, node versions, and system PATH settings.

rahulchaube doctor
# Output: [OK] Node.js v20.x detected
# Output: [OK] Bun engine ready
# Output: Environment optimal.

`rahulchaube explain <error>`

AI-assisted error analysis and debugging recommendations.

rahulchaube explain "Cannot find module 'react'"

`rahulchaube optimize`

Analyze project source code and output performance optimization tips.

rahulchaube optimize