Download the PHP package emran-alhaddad/statamic-content-sync without Composer
On this page you can find all versions of the php package emran-alhaddad/statamic-content-sync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download emran-alhaddad/statamic-content-sync
More information about emran-alhaddad/statamic-content-sync
Files in emran-alhaddad/statamic-content-sync
Package statamic-content-sync
Short Description Export/import Statamic Entries, Navigation, Taxonomies, Assets, Globals with a CP UI and diff preview.
License MIT
Homepage https://github.com/emran-alhaddad/statamic-content-sync
Informations about the package statamic-content-sync
Statamic Content Sync (UI + Diff)
Export/import Collections, Navigation, Taxonomies, Assets, Globals with a Statamic Control Panel UI. See diffs like Git, choose Accept incoming or Keep current per item, then commit the import safely.
✨ Features
- One UI for everything: Collections, Taxonomies, Navigation trees, Globals, Asset meta.
- Smart pickers: Select the type; then pick specific handles (multi-select).
- Delta-friendly: Filter by sites and optional
since(ISO8601) for narrow exports. - Git-style diff: Side-by-side preview of current vs incoming.
- Granular decisions: Choose per item to keep current or accept incoming.
- CLI included: Mirror UI flows via Artisan commands.
- Statamic v5 / Laravel 10–11 / PHP ≥ 8.1.
Roadmap: field-level merge decisions, queueable commits for large imports, binary asset copy helpers, rollback snapshots.
📦 Install
`
No frontend build required – compiled CP assets are included.
(If you’re developing the addon locally, run npm i && npm run build.)
zsh tip: when installing dev branches, quote constraints (to avoid globbing):
⚙️ Configuration
Publish config → config/content-sync.php:
Optional .env:
🖥️ Control Panel Usage
Open Utilities → Content Sync.
Export
- Choose Type: Collections / Taxonomies / Navigation / Globals / Assets.
- Pick one or more handles from the list (multi-select).
- (Optional) Set Sites (comma-separated) and/or Since (ISO8601).
- Set an output filename (e.g.
my-export.json) and click Export. - The JSON is written to
<disk>/<folder>/...(e.g.storage/app/sync).
Import
- Click Import tab and upload a previously exported JSON.
- Review the diff for each item (Current vs Incoming).
- For each item, choose Accept incoming or Keep current.
- Click Complete Import to apply decisions.
🧰 CLI (Optional)
Export:
Import (preview only):
Import (apply all as “incoming”):
📤 JSON Format (Export)
Other types (taxonomies, navigation, globals, assets) export their relevant fields (e.g., taxonomy terms, nav trees, global localizations, asset meta).
🔐 Permissions & Security
- All routes are under
webwithstatamic.cp.authenticated. - If you need to restrict to super users or a specific role/permission, wrap the routes with your preferred middleware (or add a Gate).
🧪 Local Development
Optionally, link into a Statamic app with a path repository for rapid iteration.
🐞 Troubleshooting
- “Package not found”: Ensure the repo is on Packagist and a tag exists (e.g.
v0.1.0). -
CP JS not loading: Confirm
resources/dist/js/content-sync.jsis committed and provider registers: - *zsh eats `
**: Quote your Composer constraint ("vendor/pkg:*@dev") or usenoglob`.
🗺️ Roadmap
- Per-field merge decisions in the diff UI
- Queueable import & progress
- Binary asset copy helpers (between disks)
- Rollback & audit logs
- Tests + fixtures (Pest)
🤝 Contributing
PRs welcome! Please:
- Run
vendor/bin/pint --test - Build assets via
npm run build - Keep commits scoped & conventional (e.g.,
feat:,fix:,chore:)
📜 License
MIT © Emran Alhaddad