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
  • Console - asena console runs the app with a browser page for its component graph, requests, logs and handlers
  • 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 formatting with bun fmt.

🔧 Generation
Code Generation

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

⚡ Development
Fast Development

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

🧭 Console
asena console

Run the app in development with a browser page to read its dependency graph, call its routes, follow a request through its chain and run a schedule.

📦 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; v1.4.4 or higher for bun fmt, which formats the projects asena create sets up formatting for (the default)
  • TypeScript - 5.x, 6.x or 7.x (installed automatically)

Released under the MIT License.