[PR #4084] [CLOSED] Admin CLI build #6304

Closed
opened 2026-02-05 10:28:53 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/4084
Author: @ssddanbrown
Created: 3/3/2023
Status: Closed

Base: developmentHead: admin-cli


📝 Commits (10+)

  • 6d055e6 Started playing with a seperate admin-cli
  • f77d4ce Outlined a general working backup approach
  • 6b97325 Split command out to methods, added flags and out path options
  • ead5ebb Added error handling and validation to backup command
  • ff0c183 Added db port support for backup command
  • 3cc761d Added "init" command to admin-cli
  • cbf77ec Extracted program running to its own class
  • 21db0eb Updated env loading to be contained/controlled for usage
  • 4d9d591 Added dep check and composer auto-install to init command
  • 0be1bf7 Migrated to symfony/console

📊 Changes

20 files changed (+2329 additions, -1 deletions)

View changed files

📝 .gitignore (+2 -1)
scripts/.gitignore (+2 -0)
scripts/Commands/BackupCommand.php (+176 -0)
scripts/Commands/CommandError.php (+5 -0)
scripts/Commands/InitCommand.php (+173 -0)
scripts/Commands/RestoreCommand.php (+204 -0)
scripts/Commands/UpdateCommand.php (+92 -0)
scripts/Services/AppLocator.php (+51 -0)
scripts/Services/ArtisanRunner.php (+31 -0)
scripts/Services/BackupZip.php (+68 -0)
scripts/Services/ComposerLocator.php (+50 -0)
scripts/Services/EnvironmentLoader.php (+23 -0)
scripts/Services/InteractiveConsole.php (+31 -0)
scripts/Services/MySqlRunner.php (+120 -0)
scripts/Services/ProgramRunner.php (+122 -0)
scripts/Services/RequirementsValidator.php (+39 -0)
scripts/compile.php (+52 -0)
scripts/composer.json (+21 -0)
scripts/composer.lock (+1032 -0)
scripts/run (+35 -0)

📄 Description

Playing around with building a BookStack CLI for system-level tasks (Backup, Restore, Install, Update, etc..).
Building as a separate component to the BookStack codebase/laravel, compilable to a single phar, so that it function fully independently, even if the main app is in a broken state.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/4084 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 3/3/2023 **Status:** ❌ Closed **Base:** `development` ← **Head:** `admin-cli` --- ### 📝 Commits (10+) - [`6d055e6`](https://github.com/BookStackApp/BookStack/commit/6d055e6f72d2ac5842812f7c825a65589c92977a) Started playing with a seperate admin-cli - [`f77d4ce`](https://github.com/BookStackApp/BookStack/commit/f77d4ce29593d1e3083e68cfe15953ae163d5fdf) Outlined a general working backup approach - [`6b97325`](https://github.com/BookStackApp/BookStack/commit/6b9732588c32890d99108c4a1994e729e1ee96ba) Split command out to methods, added flags and out path options - [`ead5ebb`](https://github.com/BookStackApp/BookStack/commit/ead5ebbee1d0844204e12aa7916fd9c4cd27be08) Added error handling and validation to backup command - [`ff0c183`](https://github.com/BookStackApp/BookStack/commit/ff0c183a66762b2c7cd2026f0c71b338dbcaa511) Added db port support for backup command - [`3cc761d`](https://github.com/BookStackApp/BookStack/commit/3cc761d2d858fb6dd9f604af4a79a4ea453debd3) Added "init" command to admin-cli - [`cbf77ec`](https://github.com/BookStackApp/BookStack/commit/cbf77ecdbf963b62e5c70207d48b9333680a5dc0) Extracted program running to its own class - [`21db0eb`](https://github.com/BookStackApp/BookStack/commit/21db0ebf467675086d0e9ce8e7d2ab1aaef97b0a) Updated env loading to be contained/controlled for usage - [`4d9d591`](https://github.com/BookStackApp/BookStack/commit/4d9d591792594cf140c80ef4597e21627bcbaaff) Added dep check and composer auto-install to init command - [`0be1bf7`](https://github.com/BookStackApp/BookStack/commit/0be1bf7499bfe5ab6d6b701e768e05944c706863) Migrated to symfony/console ### 📊 Changes **20 files changed** (+2329 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -1) ➕ `scripts/.gitignore` (+2 -0) ➕ `scripts/Commands/BackupCommand.php` (+176 -0) ➕ `scripts/Commands/CommandError.php` (+5 -0) ➕ `scripts/Commands/InitCommand.php` (+173 -0) ➕ `scripts/Commands/RestoreCommand.php` (+204 -0) ➕ `scripts/Commands/UpdateCommand.php` (+92 -0) ➕ `scripts/Services/AppLocator.php` (+51 -0) ➕ `scripts/Services/ArtisanRunner.php` (+31 -0) ➕ `scripts/Services/BackupZip.php` (+68 -0) ➕ `scripts/Services/ComposerLocator.php` (+50 -0) ➕ `scripts/Services/EnvironmentLoader.php` (+23 -0) ➕ `scripts/Services/InteractiveConsole.php` (+31 -0) ➕ `scripts/Services/MySqlRunner.php` (+120 -0) ➕ `scripts/Services/ProgramRunner.php` (+122 -0) ➕ `scripts/Services/RequirementsValidator.php` (+39 -0) ➕ `scripts/compile.php` (+52 -0) ➕ `scripts/composer.json` (+21 -0) ➕ `scripts/composer.lock` (+1032 -0) ➕ `scripts/run` (+35 -0) </details> ### 📄 Description Playing around with building a BookStack CLI for system-level tasks (Backup, Restore, Install, Update, etc..). Building as a separate component to the BookStack codebase/laravel, compilable to a single phar, so that it function fully independently, even if the main app is in a broken state. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:28:53 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6304