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
| Step | Command | Purpose |
|---|---|---|
| 1 | eai init | Clones the Vertical Template, installs dependencies, and sets up the project structure. |
| 2 | cd my-vertical | Navigate into the newly created project directory. |
| 3 | eai login | Opens a browser window for Microsoft Entra ID authentication and stores tokens locally. |
| 4 | eai env pull | Downloads API endpoints, tenant configuration, and other environment variables to .env.local. |
| 5 | eai types validate | Checks that the Object Type definitions in src/eai.config/object-types.ts are valid. |
| 6 | eai types seed | Pushes the validated Object Types to the platform so resources can be created. |
| 7 | eai dev | Starts 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
| Step | Command | Purpose |
|---|---|---|
| 1 | eai types validate | Catch schema errors before pushing to the platform. |
| 2 | eai types diff | Review additions, removals, and modifications. |
| 3 | eai types seed | Push Object Types to the platform (use --dry-run first). |
| 4 | eai resources schema | Confirm 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
| Step | Command | Purpose |
|---|---|---|
| 1 | eai deploy setup | Generates the GitHub Actions workflow and configures secrets. Only needed once. |
| 2 | eai deploy trigger | Kicks off the build and deployment to Azure. |
| 3 | eai deploy status | Shows 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
| Step | Command | Purpose |
|---|---|---|
| 1 | eai tenant create | Creates a new isolated tenant with the specified name, slug, and domains. |
| 2 | eai env push | Pushes environment configuration so the tenant has the correct API settings. |
| 3 | eai types seed | Seeds Object Types for the specific tenant so resources can be created. |
| 4 | eai verify | Confirms 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