Skip to main content
The Max AI CLI (@max-ai/cli) is the fastest way to build and deploy marketplace apps.

Installation

After installation, the max-ai command is available globally.

Authentication

This opens a browser window where you sign in with your Max AI developer account. The CLI stores your API key locally at ~/.max-ai/config.toml. You’ll be prompted to select an environment:

Manual API Key

For CI or headless environments, pass the key directly:

Creating an App

This interactive command:
  1. Validates your authentication
  2. Prompts for app name, slug (checked for availability), and category
  3. Creates the app on the Max AI platform
  4. Scaffolds a full Next.js project from the official template
  5. Writes max-ai.app.toml with your client_id
  6. Installs dependencies

Example

Local Development

This command orchestrates your entire local development workflow:
  1. Conflict detection — Compares your local max-ai.app.toml with the server config. If they differ, prompts you to choose local or server values.
  2. Dev server — Starts npm run dev in the current directory
  3. Cloudflare Tunnel — Exposes your local server via a public HTTPS URL (free, no account needed)
  4. Registration — Registers your app as a draft on the platform with the tunnel URL
  5. Auto-install — Installs the app in your organization so you can test it immediately
Your draft app appears in the marketplace only for your organization, marked with a “Draft” badge. Other organizations cannot see it. The preferred workflow is to develop locally and test your app against the staging API at api.maxcare.dev.

Options

Prerequisites

The tunnel feature requires cloudflared:

Example

Open the App URL to see your app running inside the Max AI dashboard.

Deploying (Beta)

App deployment via the CLI is currently in beta. The deployment workflow may change as we refine the experience.
Deploys your app by registering the current configuration with the Max AI platform. The version is auto-incremented (patch bump) unless you specify one explicitly.

Options

Prerequisites

Before deploying:
  • Set hosting.url in max-ai.app.toml to your production HTTPS URL
  • Your app must be hosted and publicly accessible

Example

Configuration File

The CLI uses max-ai.app.toml as the source of truth for your app’s configuration. This file is created by max-ai app init and synced during development.

Key Fields

You can also edit your app’s configuration as TOML directly in the Developer Console.

Typical Workflow