Skip to main content

Workflows

This page describes common multi-command workflows for the EAI CLI. Each workflow combines several commands into an end-to-end process for a specific task.

Set Up a New Vertical

Create a new vertical application from scratch and get it running locally.

Steps

# 1. Scaffold a new project from the template
eai init my-vertical

# 2. Move into the project directory
cd my-vertical

# 3. Authenticate with the platform
eai login

# 4. Pull environment configuration from the cloud
eai env pull

# 5. Validate your Object Type definitions
eai types validate

# 6. Seed Object Types to the platform
eai types seed

# 7. Start the local development server
eai dev

What each step does

StepCommandPurpose
1eai initClones the Vertical Template, installs dependencies, and sets up the project structure.
2cd my-verticalNavigate into the newly created project directory.
3eai loginOpens a browser window for Microsoft Entra ID authentication and stores tokens locally.
4eai env pullDownloads API endpoints, tenant configuration, and other environment variables to .env.local.
5eai types validateChecks that the Object Type definitions in src/eai.config/object-types.ts are valid.
6eai types seedPushes the validated Object Types to the platform so resources can be created.
7eai devStarts the Next.js development server with platform connectivity on port 3000.

Manage Object Types

Define, validate, and sync your data model between local definitions and the platform.

Validate and seed

After editing src/eai.config/object-types.ts, validate and push your changes:

# Validate locally, then seed to the platform
eai types validate && eai types seed

Preview changes before seeding

Use diff and dry-run to review what will change:

# See differences between local and remote types
eai types diff

# Preview what would be seeded without making changes
eai types seed --dry-run

# If everything looks good, seed for real
eai types seed

Sync changes from the Configurator UI

If someone made changes through the web-based Configurator, pull them to your local definitions:

# Pull remote types to local TypeScript definitions
eai types pull

# Verify the pulled types are valid
eai types validate

Seed a specific tenant or environment

# Seed only a specific tenant
eai types seed --tenant-key my-tenant

# Seed to the staging environment
eai types seed --env staging

Full Object Type lifecycle

# 1. Validate definitions
eai types validate

# 2. Preview changes
eai types diff

# 3. Seed to development
eai types seed --dry-run
eai types seed

# 4. Verify schema is published
eai resources schema
StepCommandPurpose
1eai types validateCatch schema errors before pushing to the platform.
2eai types diffReview additions, removals, and modifications.
3eai types seedPush Object Types to the platform (use --dry-run first).
4eai resources schemaConfirm the types are published and available for resource operations.

Deploy Your Vertical

Set up the deployment pipeline and deploy your vertical application to Azure App Service.

First-time setup

# 1. Configure GitHub Actions and repository secrets
eai deploy setup --repo eai-tools/my-vertical

# 2. Trigger the first deployment
eai deploy trigger

# 3. Monitor the deployment
eai deploy status

Subsequent deployments

After the initial setup, you only need to trigger and monitor:

# Trigger a new deployment
eai deploy trigger

# Check deployment status
eai deploy status

Pre-deployment checklist

Before deploying, verify that everything is in order:

# 1. Run the doctor to check for issues
eai doctor

# 2. Verify platform connectivity
eai verify

# 3. Validate Object Types
eai types validate

# 4. Deploy
eai deploy trigger
StepCommandPurpose
1eai deploy setupGenerates the GitHub Actions workflow and configures secrets. Only needed once.
2eai deploy triggerKicks off the build and deployment to Azure.
3eai deploy statusShows build progress, deployment state, and any errors.

Set Up a New Tenant

Create a new tenant and configure its environment.

Steps

# 1. Create the tenant
eai tenant create \
--name "My Application" \
--slug my-app \
--domain "myapp.com,app.myenterprise.ai"

# 2. Push environment configuration to the new tenant
eai env push

# 3. Seed Object Types for the tenant
eai types seed --tenant-key my-app

# 4. Verify the tenant is operational
eai verify
StepCommandPurpose
1eai tenant createCreates a new isolated tenant with the specified name, slug, and domains.
2eai env pushPushes environment configuration so the tenant has the correct API settings.
3eai types seedSeeds Object Types for the specific tenant so resources can be created.
4eai verifyConfirms that all platform services are accessible for the new tenant.

Troubleshooting Workflow

When something is not working, follow this diagnostic sequence:

# 1. Run comprehensive diagnostics
eai doctor

# 2. Check platform connectivity
eai verify

# 3. Check your authentication status
eai whoami

# 4. If issues are found, try automatic fixes
eai doctor --fix

# 5. If auth is expired, re-authenticate
eai logout && eai login

# 6. Re-sync environment configuration
eai env pull