Skip to content

CLI Overview ​

The Asena CLI is a powerful command-line tool that streamlines Asena application development. It handles project scaffolding, code generation, building, and development workflows.

What is Asena CLI? ​

Asena CLI provides essential tools for building and managing Asena applications:

  • Project Scaffolding - Create new projects with complete setup
  • Code Generation - Generate controllers, services, middleware, and more
  • Build System - Bundle your application for production
  • Development Mode - One-shot build and run with asena dev start; use the scaffolded bun run dev:hot for hot reload
  • Diagnostics - asena doctor checks the project for the configuration mistakes that only surface in production
  • Multi-Adapter Support - Works with both Ergenecore and Hono adapters

Key Features ​

🚀 Setup
Quick Project Setup

Create a fully configured Asena project in seconds with interactive prompts for adapter selection, ESLint, and Prettier setup.

🔧 Generation
Code Generation

Generate controllers with route handlers, services with business logic, middleware, config classes and WebSocket namespaces.

âš¡ Development
Fast Development

One-shot build and run — the CLI discovers and registers all your components automatically. No manual imports needed.

📦 Production
Production Builds

Bundle with Bun's fast bundler, with full control over minification, source maps and output options. Your entry file is never rewritten.

🩺 Diagnostics
asena doctor

A read-only check for missing decorator flags, duplicate package copies, unsatisfied peer ranges and build settings that mangle component names.

Getting Started ​

Install the CLI globally:

bash
bun install -g @asenajs/asena-cli

Create your first project:

bash
asena create

Start developing:

bash
cd my-project
asena dev start

Documentation ​

Requirements ​

  • Bun Runtime - v1.4 or higher
  • TypeScript - v5.8.2 or higher (installed automatically)

Released under the MIT License.