Every great framework needs a great CLI. In Stacks, that CLI is called Buddy — your companion for development, testing, deployment, and everything in between.

What Can Buddy Do?

Buddy is the single entry point for every task in your Stacks project:

./buddy dev          # Start the development server
./buddy build        # Build for production
./buddy test         # Run your test suite
./buddy deploy       # Deploy to the cloud
./buddy generate     # Generate models, migrations, and more
./buddy lint         # Lint and format your code
./buddy key:generate # Generate a new application key

Developer Experience First

Buddy is designed to feel fast and intuitive. Some highlights:

  • Lazy-loaded commands: Only the command you run is loaded, keeping startup under 100ms
  • Interactive mode: Run ./buddy with no arguments for a guided menu
  • Verbose mode: Add --verbose to any command for detailed output
  • Tab completion: Full shell completion support for bash and zsh

Extensible

You can add your own commands by creating files in app/Commands/:

// app/Commands/Greet.ts
export default function (buddy) {
  buddy
    .command('greet <name>', 'Greet someone')
    .action((name) => {
      console.log('Hello, ' + name + '!')
    })
}

Then run it:

./buddy greet World
# Hello, World!

Built on Bun

Buddy runs on Bun, giving it near-instant startup times and excellent TypeScript support without a build step. Your commands are executed directly from TypeScript source.

Try It

Start a new Stacks project and explore what Buddy can do. You might be surprised how much a good CLI can improve your workflow.