@shellui/cli
v0.2.0
Published
ShellUI CLI - Command-line tool for ShellUI
Downloads
905
Maintainers
Readme
@shellui/cli
ShellUI CLI - Command-line tool for ShellUI
Installation
npm install -g @shellui/cliOr install as a dev dependency:
npm install --save-dev @shellui/cliUsage
shellui start [path/to/project] [--host]
shellui build [path/to/project]Commands
start - Start the ShellUI development server
shellui start shellui start ./my-project shellui start --host # listen on 0.0.0.0 for network accessbuild - Build the ShellUI application for production
shellui build shellui build ./my-project
Project Structure
The CLI is organized for maintainability with a clear separation of concerns:
src/
├── cli.js # Main CLI orchestrator
├── commands/ # All commands in separate files
│ ├── index.js # Command registry
│ ├── start.js # Start command implementation
│ └── build.js # Build command implementation
└── utils/ # Utility functions
├── index.js # Utilities export
├── config.js # Configuration loading
└── vite.js # Vite-specific utilitiesDevelopment
Adding a New Command
- Create a new file in
src/commands/(e.g.,new-command.js) - Export a command function:
export async function newCommandCommand(args) {
// Command implementation
}- Register it in
src/cli.js:
import { newCommandCommand } from './commands/index.js';
cli.command('new-command [args]', 'Description').action(newCommandCommand);- Export it from
src/commands/index.js:
export { newCommandCommand } from './new-command.js';See src/commands/README.md for more details.
License
MIT
