Download the PHP package aichadigital/bookstack-sync without Composer
On this page you can find all versions of the php package aichadigital/bookstack-sync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aichadigital/bookstack-sync
More information about aichadigital/bookstack-sync
Files in aichadigital/bookstack-sync
Package bookstack-sync
Short Description Laravel package for synchronizing Markdown documentation with BookStack wiki
License AGPL-3.0-or-later
Homepage https://github.com/aichadigital/bookstack-sync
Informations about the package bookstack-sync
BookStack Sync
A Laravel package for synchronizing Markdown documentation with BookStack wiki. Perfect for keeping your project documentation in sync between your codebase and BookStack.
Features
- Bidirectional Sync: Push local Markdown files to BookStack or pull BookStack content to local files
- Local SQLite Cache: Reduces API calls by caching wiki structure locally with change detection
- Bookmark Conversion: Automatically converts AI-generated bookmarks (Claude, Cursor, etc.) to BookStack's URL-encoded format
- Spanish Character Support: Full support for UTF-8 characters (á, é, í, ó, ú, ñ, ç, ü, etc.)
- Artisan Commands: Easy-to-use CLI commands for all operations
- Conflict Resolution: Multiple strategies for handling sync conflicts
- Dry Run Mode: Preview changes before making them
Version Compatibility
| Version | PHP | Laravel | Branch |
|---|---|---|---|
| 2.x | ^8.4 | 12, 13 | main |
| 1.x | ^8.2 | 10, 11, 12 | laravel-12 |
Requirements
- PHP 8.4+
- Laravel 12 or 13
- BookStack instance with API access
Installation
Publish the configuration file:
Configuration
Add these variables to your .env file:
Alternative variable names are also supported for compatibility:
Usage
Artisan Commands
Check Connection Status
Push Local Files to BookStack
Pull from BookStack to Local Files
Export Content
Search
Sync Wiki Structure to Local Cache
Query Local Cache
Programmatic Usage
Bookmark Conversion
The package automatically handles the conversion between AI-generated bookmark formats and BookStack's URL-encoded format:
Direct Parser Usage
Markdown Frontmatter
You can use YAML frontmatter in your Markdown files to specify metadata:
Supported frontmatter fields:
title/name: Page title (overrides filename)chapter: Chapter name (creates if doesn't exist)bookstack_id: Links to existing BookStack page for updates
Sync Configuration
Configure sync behavior in config/bookstack-sync.php:
Local Database Configuration
The package includes a local SQLite cache to reduce API calls and enable change detection:
Environment Variables
How It Works
- Run
php artisan bookstack:syncto populate the local cache - The cache stores all shelves, books, chapters, and pages with their metadata
- During push/pull operations, the package uses content hashes to skip unchanged files
- Deleted items in BookStack are marked with
is_deletedflag for tracking
Spanish Character Encoding Reference
| Character | URL Encoded |
|---|---|
| á | %C3%A1 |
| é | %C3%A9 |
| í | %C3%AD |
| ó | %C3%B3 |
| ú | %C3%BA |
| ñ | %C3%B1 |
| ü | %C3%BC |
| ç | %C3%A7 |
Testing
To run tests against your actual BookStack instance, copy .env.example to .env and configure your credentials:
API Reference
This package uses the BookStack REST API. Key endpoints used:
/api/shelves- Shelf operations/api/books- Book operations/api/chapters- Chapter operations/api/pages- Page operations/api/search- Search across content
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- AichaDigital
- All Contributors
Special thanks to:
- BookStack - The excellent open-source wiki platform that this package integrates with
- Dan Brown - Creator and maintainer of BookStack
Trademark Notice: BookStack® is a registered trademark of Daniel Brown. This package is not affiliated with, endorsed by, or sponsored by BookStack or Daniel Brown.
License
This package is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). Please see License File for more information.
All versions of bookstack-sync with dependencies
spatie/laravel-package-tools Version ^1.16||^2.0
illuminate/contracts Version ^12.0||^13.0
illuminate/support Version ^12.0||^13.0
illuminate/http Version ^12.0||^13.0
guzzlehttp/guzzle Version ^7.0