Skip to content

CLI Tools

Shokupan includes a CLI for scaffolding and code generation.

Terminal window
# Install globally
bun add -g shokupan
# Or use with bunx
bunx shokupan
Terminal window
shokupan generate controller User
# or
skp g controller User

Generates:

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 };
}
}
Terminal window
skp g middleware auth
Terminal window
skp g plugin custom