# Create Application

### <mark style="color:red;">Usage</mark>

```bash
# Interactive mode (recommended)
pnpm create akinon-app

# With project name
pnpm create akinon-app my-app

# With all options
pnpm create akinon-app my-app -- --type fullpage --package-manager pnpm --no-install
```

### <mark style="color:red;">Options</mark>

<table><thead><tr><th width="255.9609375">Option</th><th width="74.671875">Alias</th><th width="257.4453125">Description</th><th>Default</th></tr></thead><tbody><tr><td><code>--type &#x3C;type></code></td><td><code>-t</code></td><td>Project type</td><td>(interactive)</td></tr><tr><td><code>--package-manager &#x3C;manager></code></td><td><code>-p</code></td><td>Package manager to use</td><td><code>pnpm</code></td></tr><tr><td><code>--no-install</code></td><td>-</td><td>Skip dependency installation</td><td><code>false</code></td></tr><tr><td><code>--debug</code></td><td><code>-d</code></td><td>Output extra debugging info</td><td><code>false</code></td></tr></tbody></table>

### <mark style="color:red;">Project Types</mark>

#### fullpage

A standalone full-page application that takes over the entire content area of the shell.

```bash
pnpm create akinon-app my-app -- --type fullpage
```

**Use cases:**

* Dashboard applications
* Data management interfaces
* Complex multi-page applications

**Generated structure:**

```
my-app/
├── src/
│   ├── components/
│   ├── hooks/
│   ├── routes/
│   │   ├── __root.tsx
│   │   ├── index.tsx
│   │   └── about.tsx
│   ├── AppWrapper.tsx
│   ├── config.ts
│   ├── main.tsx
│   └── providers.tsx
├── public/
│   └── locales/
├── package.json
├── tsconfig.json
├── vite.config.ts
└── shell.config.js
```

#### plugin

A partial application that loads within a specific placeholder in the shell.

```bash
pnpm create akinon-app my-widget -- --type plugin
```

**Use cases:**

* Sidebar widgets
* Dashboard widgets
* Embedded components in other pages

**Generated structure:**

```
my-widget/
├── src/
│   ├── components/
│   │   └── Content.tsx
│   ├── App.tsx
│   ├── AppWrapper.tsx
│   ├── config.ts
│   ├── main.tsx
│   └── providers.tsx
├── public/
│   └── locales/
├── package.json
├── tsconfig.json
├── vite.config.ts
└── shell.config.js
```

#### multi-fullpage

Multiple full-page applications served from a single codebase with different base paths.

```bash
pnpm create akinon-app my-apps -- --type multi-fullpage
```

**Use cases:**

* Application suites
* Different views for different user roles
* Modular application architecture

#### multi-plugin

Multiple plugins served from a single codebase with different placeholder IDs.

```bash
pnpm create akinon-app my-widgets -- --type multi-plugin
```

**Use cases:**

* Widget libraries
* Multiple dashboard components
* Reusable plugin sets

### <mark style="color:red;">Interactive Mode</mark>

When no options are provided, the CLI runs in interactive mode:

```bash
pnpm create akinon-app
```

Interactive prompts:

1. **Project name** - What is your project name?
2. **Project type** - Select a project type
3. **Package manager** - Which package manager would you like to use?
4. **Install dependencies** - Install dependencies?

### <mark style="color:red;">Example Workflow</mark>

```bash
# Create a new fullpage application
$ pnpm create akinon-app

? What is your project name? order-management
? Select a project type: Fullpage App
? Which package manager would you like to use? pnpm (recommended)
? Install dependencies? Yes

Project Configuration:
   Name: order-management
   Type: Fullpage App
   Path: /Users/dev/projects/order-management
   Package Manager: pnpm
   Install: Yes

✔ Project created successfully!

Creating a new Akinon UI Protocol app in /Users/dev/projects/order-management.

Using pnpm.

Installing dependencies:
- @akinon/app-client
- @akinon/akilocale
- @akinon/akidate
- @akinon/ui-layout
- ...

✔ Dependencies installed

Success! Created order-management at /Users/dev/projects/order-management

Inside that directory, you can run several commands:

  pnpm dev
    Starts the development server.

  pnpm build
    Bundles the app for production.

  pnpm test
    Runs the test suite.

  pnpm shell
    Starts the development shell server.

We suggest that you begin by typing:

  cd order-management
  pnpm dev
```

### <mark style="color:red;">After Creation</mark>

After creating your project:

```bash
# Navigate to project
cd my-app

# Start development server
pnpm dev

# Start shell server (in another terminal)
pnpm shell
```

### <mark style="color:red;">Project Configuration</mark>

#### config.ts

Application configuration for the shell:

```typescript
// Fullpage application
import type { FullpageApplicationConfig } from '@akinon/app-client';

export const config: Omit<FullpageApplicationConfig, 'navigation'> = {
  isDev: true,
  forceRedirect: true,
  menu: [
    { label: 'Home', path: '/' },
    { label: 'About', path: '/about' },
  ],
};
```

```typescript
// Plugin application
import type { PluginApplicationConfig } from '@akinon/app-client';

export const config: PluginApplicationConfig = {
  isDev: true,
  forceRedirect: true,
  placeholderId: 'my-placeholder',
};
```

#### shell.config.js

Development shell configuration:

```javascript
export default {
  apps: [
    {
      url: 'http://localhost:5173',
      path: '/my-app',
      name: 'My Application',
      type: 'full_page',
      navTitle: 'My App'
    }
  ],
  shell: {
    port: 4000,
    theme: 'omnitron',
    title: 'Development Shell'
  },
  sidebar: {
    items: [
      { key: 'my-app', label: 'My Application', icon: 'dashboard' }
    ]
  }
};
```

### <mark style="color:red;">Next Steps</mark>

* Development Shell - Test your application
* Examples - See complete examples


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akinon.com/akinon-ui/cli/commands/create-application.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
