Clusterify.AI

DevOps & Automation Manual

Magento 2 ChatBot & Assistant CLI Commands & Automation Guide

A complete command-line interface specification for backend developers, DevOps engineers, and autonomous AI agents. Manage 100% of extension configuration, visibility, and catalog synchronization from the terminal.

Designed for Autonomous AI Agent & CI/CD Communication

Every command in the Clusterify CLI suite supports structured JSON output and adheres strictly to standard Linux exit codes (0 for success, 1 for error). Autonomous AI agents, remote deployment runners, and bash scripts can verify connection states, reindex products, and alter page visibility with deterministic precision.

Continuous Roadmap • Extended Monthly via Rapid Development

Command Catalog & Syntax Reference

bin/magento clusterify:chatbot:config:show

CLI #01

Displays current configuration in table or JSON format. Supports scope selection and unmasked secrets.

$ bin/magento clusterify:chatbot:config:show --format=json

bin/magento clusterify:chatbot:config:set

CLI #02

Updates any configuration field, encrypts secrets, and automatically cleans the config cache.

$ bin/magento clusterify:chatbot:config:set enabled 1

bin/magento clusterify:chatbot:config:test

CLI #03

Tests network connectivity and authenticates credentials live against /v1/ping using the PHP SDK.

$ bin/magento clusterify:chatbot:config:test --format=json

bin/magento clusterify:chatbot:config:pagetype-visibility:list

CLI #04

Lists all dynamically discovered layout handles across core and 3rd-party modules with active visibility states.

$ bin/magento clusterify:chatbot:config:pagetype-visibility:list --category=checkout

bin/magento clusterify:chatbot:config:pagetype-visibility:set

CLI #05

Enables or disables visibility for a specific layout handle, an entire category, or all pages at once.

$ bin/magento clusterify:chatbot:config:pagetype-visibility:set checkout disable --by-category

bin/magento clusterify:chatbot:config:pagetype-visibility:reset

CLI #06

Resets visibility rules to safe defaults (Cart & Checkout disabled) or clears scope overrides.

$ bin/magento clusterify:chatbot:config:pagetype-visibility:reset --clear-override

bin/magento clusterify:chatbot:sync:status

CLI #07

Displays active sync settings, state of the 3 dedicated indexers, and live API URL quota usage.

$ bin/magento clusterify:chatbot:sync:status --format=json

bin/magento clusterify:chatbot:sync:run

CLI #08

Triggers reindexing for CMS, Category, or Product indexers, publishing batches of 100 to RabbitMQ.

$ bin/magento clusterify:chatbot:sync:run --entity=product

bin/magento clusterify:chatbot:sync:consume

CLI #09

Processes and drains pending RabbitMQ tasks into Clusterify.AI, cleanly exiting upon completion.

$ bin/magento clusterify:chatbot:sync:consume --limit=50

Multi-Scope Scripting Best Practices

  • Target Specific Storefronts: Pass the --scope and --scope-code options to configure localized Spanish or German store views without affecting global defaults.
  • Automatic Cache Invalidation: Writing any value via the CLI automatically cleans Magento's configuration cache.
  • Credential Security: Secret keys are encrypted in the database and masked by default in terminal readouts. Use --show-secrets only in secure environments.
Developer CLI FAQ

Frequently Asked Questions: CLI Commands & Automation

Technical answers on JSON parsing, exit codes, CI/CD scripting, and AI agent orchestration.

How does the --format=json flag enable autonomous AI agent orchestration?
Every CLI command supports --format=json, emitting strict, machine-parseable JSON to stdout with deterministic Linux exit codes (0 for success, 1 for error). Autonomous AI agents (Claude, GPT, Gemini, or custom DevOps agents) can parse configuration states, trigger reindexing, and diagnose API health programmatically without human GUI interaction.
Can all 10 CLI commands execute in headless CI/CD environments like Jenkins or GitHub Actions?
Yes. The commands run as native Symfony Console binaries through bin/magento without requiring an X11 display, browser, or active web session. They are designed for automated zero-downtime deployment pipelines.
How do I test live API connectivity without saving credentials to the database?
Pass credentials on-the-fly to the test command: bin/magento clusterify:chatbot:config:test --public-key=pk_live_... --secret-key=sk_live_... --format=json. It tests the /v1/ping endpoint live without touching core_config_data.
How does config:set ensure sensitive API secret keys are secure?
When saving secret_key, the command delegates to Magento's cryptographic vault (EncryptorInterface). Keys are encrypted with your store's unique deployment key (env.php 'crypt') before writing to the database.
Why are secret keys masked in config:show output by default?
To prevent accidental exposure in terminal recordings, CI/CD console logs, or shared screens, secret keys are masked by default (e.g. sk_live_••••••••••••3d2e). Passing --show-secrets reveals the full unmasked key when required.
How do I configure settings for a specific Store View or Website via the CLI?
Use the --scope and --scope-code options. For example: bin/magento clusterify:chatbot:config:set public_uuid <UUID> --scope=store --scope-code=french. Learn more about our multi-store architecture.
What is the difference between sync:run and sync:consume?
sync:run is a producer command that triggers indexers to chunk modified entity IDs in batches of 100 into RabbitMQ. sync:consume is a consumer command that drains up to --limit messages from AMQP into the Clusterify API and immediately exits. Consult our RabbitMQ sync architecture.
Can I preview extracted Markdown locally before queueing or calling APIs?
Yes. Passing --dry-run to bin/magento clusterify:chatbot:sync:run --entity=product --dry-run dumps the sanitized Markdown payload, attributes, and canonical URLs directly to stdout without publishing to RabbitMQ or making network calls.
Does config:set automatically invalidate the Magento configuration cache?
Yes. Every successful write through clusterify:chatbot:config:set automatically cleans Magento's config cache type via TypeListInterface, ensuring new values take effect immediately.
How frequently is the CLI command suite updated?
The CLI tool suite is extended monthly via rapid development. New minor versions regularly add diagnostic filters, batch queue controls, and additional automation capabilities. Test coverage is verified across 133 unit tests on our automated testing page.