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 scaffoldedbun run dev:hotfor hot reload - Console -
asena consoleruns the app with a browser page for its component graph, requests, logs and handlers - Diagnostics -
asena doctorchecks the project for the configuration mistakes that only surface in production - Multi-Adapter Support - Works with both Ergenecore and Hono adapters
Key Features
Create a fully configured Asena project in seconds with interactive prompts for adapter selection, ESLint, and formatting with bun fmt.
Generate controllers with route handlers, services with business logic, middleware, config classes, exception handlers and WebSocket namespaces.
One-shot build and run — the CLI discovers and registers all your components automatically. No manual imports needed.
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.
Bundle with Bun's fast bundler, with full control over minification, source maps and output options. Your entry file is never rewritten.
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:
bun install -g @asenajs/asena-cliCreate your first project:
asena createStart developing:
cd my-project
asena dev startDocumentation
- Installation - Install and verify the CLI
- Commands - All available commands and options
- Console - The browser console for a running app
- Configuration - Configure your project
- Examples - Step-by-step tutorials
Requirements
- Bun Runtime - v1.4 or higher; v1.4.4 or higher for
bun fmt, which formats the projectsasena createsets up formatting for (the default) - TypeScript - 5.x, 6.x or 7.x (installed automatically)
Related
- Get Started Guide - Complete beginner's guide
- Adapters Overview - Choose between Ergenecore and Hono
- Controllers - What the generated controllers do
- Deployment - Running a built project in production