@pyra-js/cli
v0.30.10
Published
🔥 @Pyra/cli - A cli tool for using core cli commands
Downloads
590
Maintainers
Readme
@pyra-js/cli
The Pyra.js command-line interface. Provides the pyra command for starting the dev server, building for production, scaffolding new projects, and diagnosing your setup.
npm install -D @pyra-js/cli
# or
pnpm add -D @pyra-js/cliCommands
| Command | Description |
|---|---|
| pyra dev | Start the dev server with HMR on localhost:3000 |
| pyra build | Production build - outputs to dist/ |
| pyra start | Serve the production build (run pyra build first) |
| pyra init [name] | Interactive project scaffolding |
| pyra graph [path] | Visualize the project dependency graph |
| pyra doctor | Diagnose your project configuration |
# Dev server on a custom port, open browser on start
pyra dev --port 8080 --open
# Production build with sourcemaps
pyra build --sourcemap
# Scaffold a new project interactively
pyra init my-appConfiguration
Create pyra.config.ts in your project root. defineConfig and all user-facing types are exported from this package:
import { defineConfig } from '@pyra-js/cli';
import { createReactAdapter } from '@pyra-js/adapter-react';
export default defineConfig({
adapter: createReactAdapter(),
routesDir: 'src/routes',
server: {
port: 3000,
},
});Full Documentation
License
MIT
