> ## Documentation Index
> Fetch the complete documentation index at: https://docs.major.build/llms.txt
> Use this file to discover all available pages before exploring further.

# major app

> Create, run, and deploy applications with the Major CLI.

`major app` is the main command group for managing your applications. It ensures you have the necessary tools installed before running.

| Subcommand         | Purpose                                  |
| ------------------ | ---------------------------------------- |
| `major app create` | Create a new app from a template.        |
| `major app clone`  | Download and set up an existing app.     |
| `major app start`  | Start the development server.            |
| `major app deploy` | Deploy changes to production.            |
| `major app info`   | Show the current application's metadata. |
| `major app logs`   | Query logs from a deployed app.          |
| `major app editor` | Open the App Editor in your browser.     |

<Callout icon="circle-info">
  Most commands work by detecting which application you are in. Make sure you are in the correct directory.
</Callout>

## `major app create`

```bash theme={null}
major app create
```

**When to use:** creating a brand-new internal app.

**What happens:**

1. Prompts for application name + description.
2. Allows you to choose an app template to use.
3. Lets you select a theme for the app (or uses your organization's default).
4. Creates the app scaffolding and grants you access to the scaffolded app.
5. Lets you configure which connectors you want your app to have access to.
6. Generates a `.env` file so you can start developing locally.

## `major app clone`

```bash theme={null}
major app clone
```

**When to use:** onboarding to an existing app or updating your local copy.

**What happens:**

1. Lists available applications in your organization.
2. Clones the repository (or pulls the latest changes if it exists).
3. Ensures you have access to the GitHub repository.
4. Sets up your local environment configuration to match production.

## `major app start`

```bash theme={null}
major app start
```

**When to use:** starting development locally.

**What happens:**

1. Fetches the latest environment variables and credentials.
2. Updates your local `.env` file.
3. Installs dependencies and starts the development server.

## `major app deploy`

```bash theme={null}
major app deploy
```

**When to use:** publishing changes to production.

**What happens:**

1. Prompts you to commit any unsaved changes.
2. Pushes your code to the remote repository.
3. Triggers a new build and deployment.
4. Streams the deployment status and provides the live URL.

## `major app info`

```bash theme={null}
major app info
```

Displays metadata for the current application, including its name, deployment status, and live URL.

## `major app logs`

```bash theme={null}
major app logs [options]
```

**When to use:** viewing or searching production logs from a deployed app.

Logs are collected from your app's container stdout and stderr. Output is human-readable by default.

| Flag           | Description                                                         |
| -------------- | ------------------------------------------------------------------- |
| `--since`      | Show logs since a duration (e.g. `30m`, `1h`) or RFC3339 timestamp. |
| `--until`      | Show logs up until an RFC3339 timestamp.                            |
| `--search`     | Filter to lines matching this substring (case-sensitive).           |
| `--limit`      | Maximum number of log lines to return (1–5000, default 500).        |
| `--next-token` | Pagination cursor returned by a previous call.                      |
| `--json`       | Output in JSON format.                                              |

## `major app editor`

```bash theme={null}
major app editor
```

Opens the App Editor in your browser, where you can manage access, connectors, and app settings.

## App deployment via MCP

AI assistants in app-coder sessions use the `deploy_app` MCP tool to deploy your app from GitHub. Before deploying, the orchestrator instructs you to commit and push your code. The tool then deploys the latest version of your application and includes built-in permission checks to ensure only authorized users can trigger deployments.

**deploy\_app tool:**

* Deploys the latest version of your app from GitHub.
* Enforces permission checks for deployment access.
* Supports optional URL slug overrides to customize your app's deployment URL.

To use this tool in an AI-coder session, the AI assistant will call `deploy_app` with your application context. Deployments respect your organization's RBAC settings.
