Lệnh CLI
Lệnh CLI
iSPA CMS cung cấp nhiều lệnh artisan phục vụ quản lý phiên bản, dữ liệu, agent, và deployment.
Quản lý phiên bản
cms:version
Hiển thị phiên bản CalVer hiện tại cùng thông tin PHP và Laravel.
php artisan cms:version
# iSPA CMS v2026.03.0
# Format: CalVer (YYYY.MM.PATCH)
# PHP: 8.3.x
# Laravel: 12.55.0
php artisan cms:version --json
# {"version":"2026.03.0","format":"CalVer (YYYY.MM.PATCH)","php":"8.3.x","laravel":"12.55.0"}
cms:bump
Tăng phiên bản cho toàn bộ hệ thống. Cập nhật file VERSION, tất cả module.json, và tất cả composer.json trong cms/*/.
# Tăng patch: 2026.03.0 -> 2026.03.1
php artisan cms:bump patch
# Tăng minor (tháng mới): 2026.03.0 -> 2026.04.0
php artisan cms:bump minor
# Xem trước không ghi file
php artisan cms:bump patch --dry-run
Lưu ý
Sau khi bump, cần tạo git tag thủ công: git tag v2026.03.1. File base-admin/package.json cũng cần đồng bộ thủ công.
Core — Hệ thống
Quét trạng thái
php artisan core:status:scan
Kiểm tra sức khỏe hệ thống: database connectivity, cache, queue, storage.
Deploy preflight
php artisan core:deploy:preflight
Kiểm tra trước khi deploy: dependencies, migrations pending, config cache.
Enum usage
php artisan core:enum:usage:scan
Tìm các enum không được sử dụng trong codebase.
Core — Bản dịch (i18n)
Audit translation keys
php artisan core:admin-i18n:audit
Kiểm tra toàn bộ key bản dịch admin, phát hiện key thiếu hoặc thừa.
Recover translation keys
php artisan core:admin-i18n:recover
Khôi phục key bản dịch bị mất từ file backup.
Core — Import
Generate import templates
php artisan core:import:generate-templates
Tạo file mẫu Excel/CSV cho hệ thống import. Mỗi domain (contacts, products, users...) có template riêng.
Core — Agentic Subsystem
Hệ thống AI agent tích hợp sẵn trong CMS.
Preflight check
php artisan core:agentic:preflight
Kiểm tra hệ thống agent: API key, tool definitions, profile bindings.
Sync tool definitions
php artisan core:agentic:sync:tools
Đồng bộ tool definitions từ code vào database.
Grant profile tools
php artisan core:agentic:grant:profile-tools
Cấp quyền sử dụng tool cho agent profile.
Run schedules
php artisan core:agentic:run:schedules
Chạy các task agent đã lên lịch.
Game modules
Ledger drift check (GameAdmin)
php artisan gameadmin:ledger:drift:check
Kiểm tra sai lệch giữa sổ cái và số dư thực tế trong hệ thống game economy.
Reconcile balances (GameEconomy)
php artisan gameeconomy:reconcile:balances
Đối soát và điều chỉnh số dư ví người chơi.
Auto promote (GameLeaderboard)
php artisan gameleaderboard:auto:promote
Tự động thăng hạng người chơi dựa trên điểm và tiêu chí cấu hình.
GuuXeCrawler
Pipeline crawl dữ liệu web.
# Cài đặt pipeline
php artisan guuxescrawler:install
# Thêm nguồn crawl
php artisan guuxescrawler:source:add
# Seed URLs
php artisan guuxescrawler:url:seed
# Xếp hàng fetch
php artisan guuxescrawler:enqueue:fetch
# Chạy crawl
php artisan guuxescrawler:run
# Điều phối toàn bộ
php artisan guuxescrawler:orchestrate
# Hoàn tất fetch
php artisan guuxescrawler:finalize:fetch
# Dọn dữ liệu tạm
php artisan guuxescrawler:cleanup
CMS Migration
Chạy migration tuỳ chỉnh
php artisan cms:migrate
Lệnh migration riêng của iSPA CMS, hỗ trợ driver-aware (MySQL vs PostgreSQL) và xử lý foreign key constraints tuỳ theo database driver.

