August 2025. Many commands. Create site, add plugin, run migrations, generate types.
All in different scripts. Need to remember where everything is.
Solution
typus-cli. Single entry point.
typus create my-site
typus plugin add newsletter
typus db migrate
typus generate types
How it's built
Commander.js for parsing commands. Inquirer for interactive questions.
program
.command('create <name>')
.description('Create new site')
.option('--template <template>', 'Template to use')
.action(async (name, options) => {
await createSite(name, options)
})
What it can do
- create - new site from template
- plugin add/remove - manage plugins
- db migrate/seed/reset - database
- generate types/routes/docs - code generation
- release - create release
- dev/build/start - development and run
How much code
3700 files in a week. Most of it - templates and generators.
The CLI itself - ~50 files. The rest - what it generates.
Why my own
npm init, create-vite, create-next - all do their own thing. I need my own, tailored for TYPUS.
Plugins, DSL, multi-site - standard tools don't have this.