Table of contents
Official Content
  • This documentation is valid for:

The geai migrate clone-project diff command allows you to compare two Globant Enterprise AI projects to identify differences in their resources.

This is particularly useful for:

  • Pre-Migration Planning: Understand what will be migrated before running a migration.
  • Post-Migration Verification: Verify that a migration completed successfully by comparing source and destination.
  • Environment Drift Detection: Identify configuration drift between development, staging, and production environments.
  • Audit and Compliance: Document differences between projects for compliance purposes.
  • CI/CD Integration: Automate drift detection in continuous deployment pipelines.

Key Features

Automatic ID detection

Project and organization IDs are automatically detected from API keys when not explicitly provided.

Multiple output formats

Generate comparison reports in text, JSON, or Markdown format.

Selective comparison

Compare all resources or filter by specific resource types (agents, tools, processes, etc.).

Cross-instance support

Compare projects across different GEAI instances (dev vs prod, QA vs staging).

File export

Save comparison results to files for documentation or further analysis.

Comprehensive resource coverage

Supports all resource types:

Basic Usage

Compare all resources between two projects (auto-detect IDs)

geai migrate diff \
  --from-api-key "source_api_key_123" \
  --from-instance "https://api.qa.example.ai" \
  --to-api-key "destination_api_key_456" \
  --to-instance "https://api.prod.example.ai"

This command automatically detects project and organization IDs from the API keys and compares all resource types.

Compare with explicit project IDs

geai migrate diff \
  --from-api-key "source_api_key_123" \
  --from-instance "https://api.qa.example.ai" \
  --from-project-id "proj-qa-001" \
  --to-api-key "destination_api_key_456" \
  --to-instance "https://api.prod.example.ai" \
  --to-project-id "proj-prod-001"

Output Formats

Text format (default – human-readable)

geai migrate diff \
  --from-api-key "source_api_key" \
  --from-instance "https://api.qa.example.ai" \
  --to-api-key "dest_api_key" \
  --to-instance "https://api.prod.example.ai" \
  --format text

JSON Format (machine-readable for automation)

geai migrate diff \
  --from-api-key "source_api_key" \
  --from-instance "https://api.qa.example.ai" \
  --to-api-key "dest_api_key" \
  --to-instance "https://api.prod.example.ai" \
  --format json \
  --output diff-report.json

Markdown format (documentation-friendly)

geai migrate diff \
  --from-api-key "source_api_key" \
  --from-instance "https://api.qa.example.ai" \
  --to-api-key "dest_api_key" \
  --to-instance "https://api.prod.example.ai" \
  --format markdown \
  --output PROJECT_DIFF_REPORT.md

Filtered comparison

Compare only agents

geai migrate diff \
  --from-api-key "source_api_key" \
  --from-instance "https://api.qa.example.ai" \
  --to-api-key "dest_api_key" \
  --to-instance "https://api.prod.example.ai" \
  --resource-types agents

Compare agents and tools only

geai migrate diff \
  --from-api-key "source_api_key" \
  --from-instance "https://api.qa.example.ai" \
  --to-api-key "dest_api_key" \
  --to-instance "https://api.prod.example.ai" \
  --resource-types agents,tools

Compare Agentic Processes, Tasks, and Artifact Types

geai migrate diff \
  --from-api-key "source_api_key" \
  --from-instance "https://api.qa.example.ai" \
  --to-api-key "dest_api_key" \
  --to-instance "https://api.prod.example.ai" \
  --resource-types processes,tasks,artifact_types

Real-World Scenarios

Scenario 1: Pre-Migration Planning

Before migrating from QA to production, understand what will change:

geai migrate diff \
  --from-api-key "qa_api_key" \
  --from-instance "https://api.qa.example.ai" \
  --to-api-key "prod_api_key" \
  --to-instance "https://api.prod.example.ai" \
  --format markdown \
  --output pre-migration-analysis.md

Scenario 2: Post-migration verification

Verify that your migration completed successfully:

geai migrate diff \
  --from-api-key "source_api_key" \
  --from-instance "https://api.source.example.ai" \
  --to-api-key "migrated_api_key" \
  --to-instance "https://api.target.example.ai" \
  --format text

Expected output for a successful migration:

No differences found

(for all resource types)

Scenario 3: CI/CD drift detection

Automate drift detection in your pipeline:

geai migrate diff \
  --from-api-key "dev_api_key" \
  --from-instance "https://api.dev.example.ai" \
  --to-api-key "prod_api_key" \
  --to-instance "https://api.prod.example.ai" \
  --format json \
  --output drift-report.json

# Parse JSON output in your CI/CD pipeline
# Exit with error if differences are found

Scenario 4: quick Agent check

Fast check for agent differences only:

geai migrate diff \
  --from-api-key "qa_api_key" \
  --from-instance "https://api.qa.example.ai" \
  --to-api-key "prod_api_key" \
  --to-instance "https://api.prod.example.ai" \
  --resource-types agents \
  --format text

Understanding Diff Output

Text format sample

================================================================================
PROJECT COMPARISON REPORT
================================================================================

Source Project:      proj-qa-001 (QA Environment)
Destination Project: proj-prod-001 (Production)

Resource Type: agents
───────────────────────────────────────────────────────────────────────────────
Only in source (3):
  - Customer Support Agent (agent-001)
  - Sales Assistant (agent-002)
  - HR Onboarding Agent (agent-003)

Only in destination (1):
  - Legacy Support Bot (agent-legacy-001)

In both projects (5):
  ✓ Data Analyst Agent (agent-shared-001)
  ✓ Email Composer Agent (agent-shared-002)
  ...

Summary: 3 unique to source, 1 unique to destination, 5 in common

JSON format sample

{
  "source_project_id": "proj-qa-001",
  "destination_project_id": "proj-prod-001",
  "comparison_timestamp": "2025-01-15T10:30:00Z",
  "differences": {
    "agents": {
      "only_in_source": "agent-001", "agent-002", "agent-003",
      "only_in_destination": "agent-legacy-001",
      "in_both": "agent-shared-001", "agent-shared-002"
    },
    "tools": {
      "only_in_source": [],
      "only_in_destination": [],
      "in_both": "tool-001", "tool-002"
    }
  }
}

Comparing organization-Level resources

To compare organization-level resources such as files and usage_limits, you must provide organization API keys.

Compare files

geai migrate diff \
  --from-api-key "source_api_key" \
  --from-instance "https://api.qa.example.ai" \
  --from-organization-api-key "source_org_key" \
  --to-api-key "dest_api_key" \
  --to-instance "https://api.prod.example.ai" \
  --to-organization-api-key "dest_org_key" \
  --resource-types files

Compare usage limits

geai migrate diff \
  --from-api-key "source_api_key" \
  --from-instance "https://api.qa.example.ai" \
  --from-organization-api-key "source_org_key" \
  --to-api-key "dest_api_key" \
  --to-instance "https://api.prod.example.ai" \
  --to-organization-api-key "dest_org_key" \
  --resource-types usage_limits

Availability

Since version 2026-02

Last update: December 2025 | © GeneXus. All rights reserved. GeneXus Powered by Globant