CLI Tools
Shokupan includes a CLI for scaffolding and code generation.
Installation
Section titled “Installation”# Install globallybun add -g shokupan
# Or use with bunxbunx shokupanCommands
Section titled “Commands”Generate Controller
Section titled “Generate Controller”shokupan generate controller User# orskp g controller UserGenerates:
import { Get, Post, Put, Delete, Param, Body } from 'shokupan';
export class UserController { @Get('/') async getAll() { return { users: [] }; }
@Get('/:id') async getById(@Param('id') id: string) { return { id }; }
@Post('/') async create(@Body() body: any) { return { created: body }; }
@Put('/:id') async update(@Param('id') id: string, @Body() body: any) { return { id, updated: body }; }
@Delete('/:id') async delete(@Param('id') id: string) { return { id, deleted: true }; }}Generate Middleware
Section titled “Generate Middleware”skp g middleware authGenerate Plugin
Section titled “Generate Plugin”skp g plugin customNext Steps
Section titled “Next Steps”- Controllers - Learn about controllers
- Middleware - Create custom middleware