SugarAdminCLI: SugarCRM Repair from the Command Line

Early access · Sugar Enterprise 25 and 26 · On-premises

Run Quick Repair and every classic Administration > Repair action from SSH, deployment pipelines, or CI. SugarAdminCLI calls Sugar’s own repair code, so behavior matches the admin UI.

Join early access · See the commands

Core behavior & safety assurance

SugarAdminCLI executes Sugar’s native Administration repair routines directly through Symfony Console, ensuring identical behavior to the web UI with zero browser overhead.

  • Native repair code: Calls Sugar’s core routines directly; no custom or duplicate repair logic.
  • Safe automation: Destructive commands require confirmation; --yes is supported only where safe.
  • Pre-flight protection: Use --dry-run to inspect planned actions and optional --backup-dir before deleting or modifying records.
  • DDL guardrails: High-risk database schema updates remain interactive-only to prevent accidental execution.

Built for Sugar operations

  • DevOps & platform engineers: Embed Quick Repair and cache rebuilds directly into CI/CD and deployment pipelines.
  • System administrators: Manage maintenance, diagnostics, and repairs over SSH without a browser session.
  • Sugar developers: Validate schema drift, check hook collisions, and automate local or staging builds.
  • Support & recovery teams: Restore soft-deleted records and isolate stuck jobs quickly during incidents.

Command reference

A unified, headless CLI interface for standard repair, diagnostics, and maintenance tasks via php bin/sugarcrm:

  • Quick Repair and Rebuild: php bin/sugarcrm amaiza:admin:qrr -C
  • Rebuild relationships / roles: php bin/sugarcrm amaiza:admin:repair:relationships, php bin/sugarcrm amaiza:admin:repair:roles
  • Maintenance mode: php bin/sugarcrm amaiza:admin:maintenance:on and php bin/sugarcrm amaiza:admin:maintenance:off
  • Restore a soft-deleted record: php bin/sugarcrm amaiza:admin:repair:restore-record
  • Orphan cleanup: php bin/sugarcrm amaiza:admin:repair:orphans-cleanup --dry-run
  • Schema drift (vardef vs DB): php bin/sugarcrm amaiza:admin:report:schema-diff --module Accounts
  • Logic-hook collisions: php bin/sugarcrm amaiza:admin:report:logic-hooks --module Contacts
  • Stuck jobs / table sizes: php bin/sugarcrm amaiza:admin:report:stuck-jobs --minutes 60, php bin/sugarcrm amaiza:admin:report:table-sizes
  • Studio field export/import: php bin/sugarcrm amaiza:admin:fields-meta:export, php bin/sugarcrm amaiza:admin:fields-meta:import
  • BPM / journey health: php bin/sugarcrm amaiza:admin:report:stale-bpm-cases, php bin/sugarcrm amaiza:admin:report:stale-journeys

Headless CLI vs. the Repair page

SugarAdminCLI does not replace the Administration > Repair screen in Sugar; the web interface remains fully functional. Instead, SugarAdminCLI provides a headless, scriptable CLI layer for automated deployments and terminal workflows.

Installation: Installs cleanly into custom/, registers via the Sugar Extension Framework, and runs natively with php bin/sugarcrm. No Module Loader package or admin UI modules are required.

Frequently asked questions

Does it work on SugarCloud?

No. Shell access (SSH) to the hosting environment is required. SugarAdminCLI is designed for on-premises deployments.

Which Sugar editions and versions are supported?

SugarAdminCLI supports Sugar Enterprise versions 25 and 26 on-premises.

Is this a Module Loader package?

No. It installs directly into custom/ and registers through the Extension Framework. There is no Module Loader package or admin UI.

Does it replace Sugar’s Repair page?

No. It runs Sugar’s own core repair routines headlessly so you can script them. The web Repair page remains fully intact and accessible.

Can I use this in CI and deployment pipelines?

Yes. SugarAdminCLI is designed for headless automation. Use --yes where non-interactive execution is allowed, and leverage --dry-run to verify changes beforehand.

How is data safety handled?

Destructive actions require explicit confirmation, support dry runs, and allow optional backup directories. High-risk DDL schema changes cannot run unattended.

How do I access early access?

SugarAdminCLI is in early access and not yet for sale. Submit an early access request to evaluate it on your Sugar Enterprise 25 or 26 instance.

Built on 20 years of Sugar expertise

Built by Jeff Bickart, who has developed Sugar solutions, integrations, and developer tools since 2005 across more than 1,000 Sugar instances.

Join early access