3 A simple command line interface for managing instances of BookStack. Provides the following commands:
5 - **Init** - Setup a fresh BookStack installation within a folder.
6 - **Backup** - Creates a backup of an existing BookStack installation to a single ZIP file.
7 - **Restore** - Restore a backup ZIP into an instance of BookStack.
8 - **Update** - Update an existing BookStack installation to the latest version.
10 This CLI is intended to be platform abstract, intended for plain installs that follow our scripts/manual instructions.
11 This is intended to work independently of BookStack itself, so it can be used even if a BookStack instance is not available or broken, although it could be distributed with and called upon by the core BookStack codebase.
15 This project uses composer to manage PHP dependencies. They can be installed as follows:
21 This project is intended to be bundled up into a single [phar file](https://www.php.net/manual/en/intro.phar.php) for portability and separation with BookStack itself.
22 This can be done by running the compile file:
28 Tests can be ran via PHPUnit within the docker environment as described below. **It is not advised** to run tests outside of this docker environment since tests are written to an expected pre-configured system environment.
30 #### Docker Environment
32 A docker-compose setup exists to create a clean, contained environment, which is important for this project since the
33 CLI checks and interacts with many system-level elements.
36 # Build the environment container
39 # Enter the environment
40 docker compose run app
42 # From there you'll be dropped into a bash shell within the project directory.
43 # You could proceed to install dependencies via composer via:
46 # Then you can run tests via:
49 # To clean-up and delete the environment:
50 docker compose rm -fsv
53 Within the environment a pre-existing BookStack instance can be found at `/var/www/bookstack` for testing.
57 I welcome issues and PRs but keep in mind that I'd like to keep the feature-set narrow to limit support/maintenance burden.
58 Therefore, I likely won't leave issues open long, or merge PRs, for requests to add new features or for changes that increase the scope of what this script already supports.