CLI Reference

Table of contents


Complete command-line interface reference for X2A Convertor.

Main Command

Usage:  [OPTIONS] [COMMAND] [ARGS]...

  X2Ansible - Infrastructure Migration Tool

Options:
  --help  Show this message and exit.

Commands:
  adversarial-run  Run adversarial validation agents for a workflow phase.
  analyze          Perform detailed analysis and create module migration...
  health-check     Check connectivity to the configured model and AAP.
  init             Initialize project with interactive message
  migrate          Migrate project based on migration plan from analysis
  publish-aap      Sync a git repository to Ansible Automation Platform.
  report           Report execution artifacts to the x2a API

adversarial-run

Run adversarial validation agents for a workflow phase.

Usage

uv run app.py adversarial-run [OPTIONS]

Options

  • --phase [required] (default: Sentinel.UNSET) Workflow phase to run adversarial agents for

  • --source-dir (default: .) Source directory containing migration artifacts to review

  • --report-path Path to a report file where findings will be appended

  • --config [required] (default: Sentinel.UNSET) Path to adversarial agents JSON config

Full Help

Usage: adversarial-run [OPTIONS]

  Run adversarial validation agents for a workflow phase.

Options:
  --phase [analyze|migrate]  Workflow phase to run adversarial agents for
                             [required]
  --source-dir DIRECTORY     Source directory containing migration artifacts
                             to review
  --report-path PATH         Path to a report file where findings will be
                             appended
  --config TEXT              Path to adversarial agents JSON config
                             [required]
  --help                     Show this message and exit.

analyze

Perform detailed analysis and create module migration plans

Usage

uv run app.py analyze [OPTIONS] USER_REQUIREMENTS

Arguments

  • USER_REQUIREMENTS

Options

  • --source-dir (default: .) Source directory to analyze

Full Help

Usage: analyze [OPTIONS] USER_REQUIREMENTS

  Perform detailed analysis and create module migration plans

Options:
  --source-dir DIRECTORY  Source directory to analyze
  --help                  Show this message and exit.

health-check

Check connectivity to the configured model and AAP.

Usage

uv run app.py health-check [OPTIONS]

Full Help

Usage: health-check [OPTIONS]

  Check connectivity to the configured model and AAP.

Options:
  --help  Show this message and exit.

init

Initialize project with interactive message

Usage

uv run app.py init [OPTIONS] USER_REQUIREMENTS

Arguments

  • USER_REQUIREMENTS

Options

  • --source-dir (default: .) Source directory to analyze

  • --refresh Skip migration plan generation if migration-plan.md exists, only regenerate metadata

Full Help

Usage: init [OPTIONS] USER_REQUIREMENTS

  Initialize project with interactive message

Options:
  --source-dir DIRECTORY  Source directory to analyze
  --refresh               Skip migration plan generation if migration-plan.md
                          exists, only regenerate metadata
  --help                  Show this message and exit.

migrate

Migrate project based on migration plan from analysis

Usage

uv run app.py migrate [OPTIONS] USER_REQUIREMENTS

Arguments

  • USER_REQUIREMENTS

Options

  • --source-dir (default: .) Source directory to migrate

  • --source-technology (default: Chef) Source technology to migrate from

  • --module-migration-plan (default: Sentinel.UNSET) Module migration plan file produced by the analyze command. Must be in the format: migration-plan-.md. Path is relative to the --source-dir. Example: migration-plan-nginx.md

  • --high-level-migration-plan (default: Sentinel.UNSET) High level migration plan file produced by the init command. Path is relative to the –source-dir. Example: migration-plan.md

Full Help

Usage: migrate [OPTIONS] USER_REQUIREMENTS

  Migrate project based on migration plan from analysis

Options:
  --source-dir DIRECTORY          Source directory to migrate
  --source-technology [chef|puppet|salt|powershell|ansible]
                                  Source technology to migrate from
  --module-migration-plan FILE    Module migration plan file produced by the
                                  analyze command. Must be in the format:
                                  migration-plan-<module_name>.md. Path is
                                  relative to the --source-dir. Example:
                                  migration-plan-nginx.md
  --high-level-migration-plan FILE
                                  High level migration plan file produced by
                                  the init command. Path is relative to the
                                  --source-dir. Example: migration-plan.md
  --help                          Show this message and exit.

publish-aap

Sync a git repository to Ansible Automation Platform.

Creates or updates an AAP Project pointing to the given repository URL and branch, then triggers a project sync without waiting for completion. Push the generated Ansible project to the repository before running this command.

Requires AAP environment variables to be configured (AAP_CONTROLLER_URL, AAP_ORG_NAME, and authentication credentials).

Usage

uv run app.py publish-aap [OPTIONS]

Options

  • --target-repo [required] (default: Sentinel.UNSET) Git repository URL for the AAP project (e.g., https://github.com/org/repo.git).

  • --target-branch [required] (default: Sentinel.UNSET) Git branch for the AAP project.

  • --project-id [required] (default: Sentinel.UNSET) Migration project ID, used for AAP project naming.

Full Help

Usage: publish-aap [OPTIONS]

  Sync a git repository to Ansible Automation Platform.

  Creates or updates an AAP Project pointing to the given repository URL and
  branch, then triggers a project sync without waiting for completion. Push
  the generated Ansible project to the repository before running this command.

  Requires AAP environment variables to be configured (AAP_CONTROLLER_URL,
  AAP_ORG_NAME, and authentication credentials).

Options:
  --target-repo TEXT    Git repository URL for the AAP project (e.g.,
                        https://github.com/org/repo.git).  [required]
  --target-branch TEXT  Git branch for the AAP project.  [required]
  --project-id TEXT     Migration project ID, used for AAP project naming.
                        [required]
  --help                Show this message and exit.

report

Report execution artifacts to the x2a API

Usage

uv run app.py report [OPTIONS]

Options

  • --url [required] (default: Sentinel.UNSET) Full URL to report artifacts to

  • --job-id [required] (default: Sentinel.UNSET) UUID of the completed job

  • --callback-token [required] (default: Sentinel.UNSET) HMAC-SHA256 callback token for request signing

  • --error-message Error message to report (sets status to error)

  • --artifacts (default: Sentinel.UNSET) Artifact as type:url (e.g., migration_plan:https://storage.example/migration-plan.md)

  • --commit-id Git commit SHA from the job’s push to target repo

  • --source-dir Source directory where telemetry was written. Optional for init phase; required for analyze/migrate/publish to include telemetry in the report.

Full Help

Usage: report [OPTIONS]

  Report execution artifacts to the x2a API

Options:
  --url TEXT              Full URL to report artifacts to  [required]
  --job-id TEXT           UUID of the completed job  [required]
  --callback-token TEXT   HMAC-SHA256 callback token for request signing
                          [required]
  --error-message TEXT    Error message to report (sets status to error)
  --artifacts TEXT        Artifact as type:url (e.g.,
                          migration_plan:https://storage.example/migration-
                          plan.md)
  --commit-id TEXT        Git commit SHA from the job's push to target repo
  --source-dir DIRECTORY  Source directory where telemetry was written.
                          Optional for init phase; required for
                          analyze/migrate/publish to include telemetry in the
                          report.
  --help                  Show this message and exit.