---
title: CLI Overview
description: Asena CLI for project scaffolding, code generation, dev server, and production bundling
outline: deep
---

# 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

<div class="card-grid">
  <div class="info-card">
    <span class="ic-kicker">🚀 Setup</span>
    <div class="ic-title">Quick Project Setup</div>
    <p class="ic-desc">Create a fully configured Asena project in seconds with interactive prompts for adapter selection, ESLint, and formatting with bun fmt.</p>
  </div>
  <div class="info-card">
    <span class="ic-kicker">🔧 Generation</span>
    <div class="ic-title">Code Generation</div>
    <p class="ic-desc">Generate controllers with route handlers, services with business logic, middleware, config classes, exception handlers and WebSocket namespaces.</p>
  </div>
  <div class="info-card">
    <span class="ic-kicker">⚡ Development</span>
    <div class="ic-title">Fast Development</div>
    <p class="ic-desc">One-shot build and run — the CLI discovers and registers all your components automatically. No manual imports needed.</p>
  </div>
  <div class="info-card">
    <span class="ic-kicker">🧭 Console</span>
    <div class="ic-title">asena console</div>
    <p class="ic-desc">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.</p>
  </div>
  <div class="info-card">
    <span class="ic-kicker">📦 Production</span>
    <div class="ic-title">Production Builds</div>
    <p class="ic-desc">Bundle with Bun's fast bundler, with full control over minification, source maps and output options. Your entry file is never rewritten.</p>
  </div>
  <div class="info-card">
    <span class="ic-kicker">🩺 Diagnostics</span>
    <div class="ic-title">asena doctor</div>
    <p class="ic-desc">A read-only check for missing decorator flags, duplicate package copies, unsatisfied peer ranges and build settings that mangle component names.</p>
  </div>
</div>

## 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

- [Installation](/docs/cli/installation) - Install and verify the CLI
- [Commands](/docs/cli/commands) - All available commands and options
- [Console](/docs/cli/console) - The browser console for a running app
- [Configuration](/docs/cli/configuration) - Configure your project
- [Examples](/docs/cli/examples) - Step-by-step tutorials

## 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)

## Related

- [Get Started Guide](/docs/get-started) - Complete beginner's guide
- [Adapters Overview](/docs/adapters/overview) - Choose between Ergenecore and Hono
- [Controllers](/docs/concepts/controllers) - What the generated controllers do
- [Deployment](/docs/guides/deployment) - Running a built project in production
