@veloxts/cli
v0.3.2
Published
Developer tooling and CLI commands for VeloxTS framework
Readme
@veloxts/cli
Alpha Release - This framework is in early development. APIs may change between versions. Not recommended for production use yet.
Command-line interface for the VeloxTS Framework.
Installation
The CLI is installed automatically when you create a new VeloxTS project:
npx create-velox-app my-app
cd my-appOr add it to an existing project:
npm install -D @veloxts/cli
# or
pnpm add -D @veloxts/cliCommands
velox dev
Start the development server with hot reload.
velox devOptions:
-p, --port <port>- Port to listen on (default: 3210)-H, --host <host>- Host to bind to (default: localhost)-e, --entry <file>- Entry point file (auto-detected if not specified)
Examples:
# Start on default port 3210
velox dev
# Start on custom port
velox dev --port 8080
# Specify custom entry point
velox dev --entry src/main.tsvelox migrate
Run database migrations using Prisma.
velox migrateOptions:
--deploy- Run migrations in production mode (prisma migrate deploy)--force- Force push schema without migration (development only)
Examples:
# Development: Sync schema with database
velox migrate
# Production: Apply pending migrations
velox migrate --deploy
# Force push schema changes (dev only)
velox migrate --forceDevelopment
Building
pnpm buildType Checking
pnpm type-checkFeatures
- Beautiful terminal output with colors and spinners
- Automatic entry point detection
- Graceful shutdown handling (Ctrl+C)
- Helpful error messages with suggestions
- Intuitive command design
- Built with Commander.js and Clack
Architecture
The CLI is built with:
- Commander.js - Command-line parsing and routing
- Clack - Beautiful interactive prompts
- picocolors - Terminal colors without dependencies
- tsx - TypeScript execution with hot reload
Troubleshooting
Entry Point Not Found
If the CLI can't find your entry point:
velox dev --entry src/index.tsOr ensure your project has one of these files:
src/index.tssrc/main.tsindex.ts
Port Already in Use
Error: Port 3210 is already in useSolution: Use a different port:
velox dev --port 8080Module Resolution Errors
Ensure all dependencies are installed:
npm installAnd that your tsconfig.json has correct module resolution settings.
MVP Limitations
The current v0.1.0 release includes:
Included:
velox dev- Development server with hot reloadvelox migrate- Database migrations (wraps Prisma)
Deferred to v1.1+:
- Code generators (
velox generate controller, etc.) - Database seeding command (
velox db:seed) - Migration rollback command
- Interactive project scaffolding
- Custom command plugins
Related Packages
- @veloxts/core - Core framework
- @veloxts/router - Procedure-based routing
- @veloxts/orm - Prisma integration
- create-velox-app - Project scaffolder
TypeScript Support
All exports are fully typed with comprehensive JSDoc documentation. The package includes type definitions and declaration maps for excellent IDE support.
License
MIT
