CLI & Operations
Adonis EOS includes a suite of CLI tools and database utilities for development and production maintenance.
1. CLI Commands (Makers)
Use these commands to scaffold new CMS artifacts following the code-first approach.
Artifact Scaffolding
Command | Output |
|---|---|
|
|
| Backend & Frontend stubs |
|
|
|
|
|
|
|
|
| Menu registration scaffold |
Maintenance Utilities
node ace mcp:dump-context: Exports code-derived context for auditing/diffing.node ace mcp:serve: Starts the Model Context Protocol (MCP) server for AI integration.
Maintenance Scripts
These utilities are intended for use by developers or Cursor agents and are located in the scripts/ directory. Run them using tsx.
tsx scripts/audit_internal_links.ts: Scans content for hardcoded URLs and suggests post references.tsx scripts/check_user.ts <email> [password]: Checks user existence and optionally verifies password.tsx scripts/debug_db.ts: Low-level database inspection script.
Administrative Operations
Populate Canonical URLs: Accessible via the Admin UI under Settings > SEO (or via
POST /api/seo/canonical-urls/populate). This backfills canonical URLs based on current URL patterns.
2. Export & Import Pipeline
A first-class JSON-based pipeline for moving content between environments and creating backups.
Content Seeding (Seeders)
Development:
index_seeder.tsimportsdevelopment-export.jsonand re-seeds documentation from markdown.Production: Used for the initial setup or content promotion via
production-export.json.
Import Strategies
Strategy | Behavior |
|---|---|
Replace | Clears tables then inserts new rows (Destructive). |
Merge | Inserts new rows; skips conflicts. |
Overwrite | Updates existing rows by ID and inserts new ones. |
Skip | Only imports if the table is empty. |
Admin Interface
Database operations are accessible via the Admin UI under Database > Export/Import, providing a visual way to manage full backups or partial content transfers.
3. Maintenance Mode
Adonis EOS supports a maintenance mode that intercepts all non-admin requests and displays a maintenance page.
Activation Methods
Admin UI: Navigate to Settings > Site Settings and toggle the "Maintenance Mode" switch. This is stored in the database.
Environment Variable: As a failsafe (e.g., if you cannot access the admin panel or the database is having issues), you can force maintenance mode via
.env:
MAINTENANCE_MODE=true
Behavior
Admin Access: Users with
admin.accesspermissions (and the login/logout routes) can still access the site to resolve issues.Failsafe: If
MAINTENANCE_MODE=trueis set in the environment, it takes priority over the database setting.DB-Down Support: If the database is unreachable and
MAINTENANCE_MODE=trueis set, the site will still show a basic maintenance page instead of a raw 500 error.
4. Logs & Auditing
Activity Logs: Track CMS actions (who changed what and when). Managed via
ActivityLogService.Webhook Deliveries: Audit outbound relay history and retry status in the Webhooks settings.