PHPackages                             emran-alhaddad/statamic-content-sync - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. emran-alhaddad/statamic-content-sync

ActiveStatamic-addon[Utility &amp; Helpers](/categories/utility)

emran-alhaddad/statamic-content-sync
====================================

Export/import Statamic Entries, Navigation, Taxonomies, Assets, Globals with a CP UI and diff preview.

v0.1.21(10mo ago)3171↓80%2[1 issues](https://github.com/emran-alhaddad/statamic-content-sync/issues)MITPHPPHP ^8.1

Since Aug 25Pushed 10mo agoCompare

[ Source](https://github.com/emran-alhaddad/statamic-content-sync)[ Packagist](https://packagist.org/packages/emran-alhaddad/statamic-content-sync)[ Docs](https://github.com/emran-alhaddad/statamic-content-sync)[ RSS](/packages/emran-alhaddad-statamic-content-sync/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (22)Used By (0)

Statamic Content Sync (UI + Diff)
=================================

[](#statamic-content-sync-ui--diff)

[![Packagist Version](https://camo.githubusercontent.com/87c2202fd2beec9132c0dea04481e197b535e271f55e2c12e363cf07752a2530/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656d72616e2d616c6861646461642f73746174616d69632d636f6e74656e742d73796e632e737667)](https://packagist.org/packages/emran-alhaddad/statamic-content-sync)[![Total Downloads](https://camo.githubusercontent.com/cb2922b365ff8c2f84c03d65de151d024ff3b9a0acfc5fcfb5450f62d1f8500e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656d72616e2d616c6861646461642f73746174616d69632d636f6e74656e742d73796e632e737667)](https://packagist.org/packages/emran-alhaddad/statamic-content-sync)[![Monthly Downloads](https://camo.githubusercontent.com/5c20a388a482291662f276d98737ae084e005072eeefd83c3fe0194a957862c0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f656d72616e2d616c6861646461642f73746174616d69632d636f6e74656e742d73796e632e737667)](https://packagist.org/packages/emran-alhaddad/statamic-content-sync/stats)[![License](https://camo.githubusercontent.com/e16ab50758d4397f9632593823cd8116bb02086e95c8b6d45e3ae05cba9bee02/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f656d72616e2d616c6861646461642f73746174616d69632d636f6e74656e742d73796e632e737667)](LICENSE)[![PHP](https://camo.githubusercontent.com/d7047f3123cba803f827a22f9f1c6dc3edc133b4a148cc8da49a74add8a2a6d1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f656d72616e2d616c6861646461642f73746174616d69632d636f6e74656e742d73796e632e737667)](https://www.php.net/)[![Laravel](https://camo.githubusercontent.com/28bb4206b9374bdfd1e7ae7320f4d58d8438595eefb1711de4fcb34c02eef009/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d313025324631312d4646324432303f6c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/28bb4206b9374bdfd1e7ae7320f4d58d8438595eefb1711de4fcb34c02eef009/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d313025324631312d4646324432303f6c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)[![Statamic](https://camo.githubusercontent.com/9d8d1ecd5d53ab5925218bd374a1e8c8ecaf8a824b8150a218c51b2a83381444/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d76352d313631463644)](https://camo.githubusercontent.com/9d8d1ecd5d53ab5925218bd374a1e8c8ecaf8a824b8150a218c51b2a83381444/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d76352d313631463644)[![GitHub stars](https://camo.githubusercontent.com/8038e5f3c8c5daf1179b59bb2158f21b9a0258d7abd580da6fe694df062c58d3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f656d72616e2d616c6861646461642f73746174616d69632d636f6e74656e742d73796e633f7374796c653d736f6369616c)](https://github.com/emran-alhaddad/statamic-content-sync)

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
----------

[](#-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
---------

[](#-install)

```
composer require "emran-alhaddad/statamic-content-sync:^0.1"
php artisan vendor:publish --tag=content-sync-config
php artisan statamic:stache:refresh && php artisan cache:clear
```

**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):

```
composer require "emran-alhaddad/statamic-content-sync:dev-main"
```

---

⚙️ Configuration
----------------

[](#️-configuration)

Publish config → `config/content-sync.php`:

```
return [
    'disk'   => env('CONTENT_SYNC_DISK', 'local'),
    'folder' => env('CONTENT_SYNC_FOLDER', 'sync'),
    'chunk'  => env('CONTENT_SYNC_CHUNK', 500),
];
```

Optional `.env`:

```
CONTENT_SYNC_DISK=local
CONTENT_SYNC_FOLDER=sync
CONTENT_SYNC_CHUNK=500

```

---

🖥️ Control Panel Usage
----------------------

[](#️-control-panel-usage)

Open **Utilities → Content Sync**.

### Export

[](#export)

1. Choose **Type**: Collections / Taxonomies / Navigation / Globals / Assets.
2. Pick one or more **handles** from the list (multi-select).
3. (Optional) Set **Sites** (comma-separated) and/or **Since** (ISO8601).
4. Set an output filename (e.g. `my-export.json`) and click **Export**.
5. The JSON is written to `//...` (e.g. `storage/app/sync`).

### Import

[](#import)

1. Click **Import** tab and upload a previously exported JSON.
2. Review the **diff** for each item (Current vs Incoming).
3. For each item, choose **Accept incoming** or **Keep current**.
4. Click **Complete Import** to apply decisions.

---

🧰 CLI (Optional)
----------------

[](#-cli-optional)

Export:

```
php artisan content-sync:export \
  --type=collections \
  --handles=pages,news \
  --sites=english,arabic \
  --since="2025-01-01T00:00:00+03:00" \
  --out=staging-delta.json
```

Import (preview only):

```
php artisan content-sync:import storage/app/sync/staging-delta.json
```

Import (apply all as “incoming”):

```
php artisan content-sync:import storage/app/sync/staging-delta.json --apply
```

---

📤 JSON Format (Export)
----------------------

[](#-json-format-export)

```
{
  "exported_at": "2025-08-25T10:12:34+03:00",
  "type": "collections",
  "handles": ["pages", "news"],
  "sites": ["english"],
  "since": "2025-01-01T00:00:00+03:00",
  "items": [
    {
      "uuid": "a0e42072-fddc-476e-8a92-ae2e2be4b902",
      "collection": "pages",
      "site": "english",
      "slug": "partnerships",
      "published": true,
      "updated_at": "2025-05-04T10:33:53+03:00",
      "data": { "...": "..." }
    }
  ]
}
```

Other types (`taxonomies`, `navigation`, `globals`, `assets`) export their relevant fields (e.g., taxonomy terms, nav trees, global localizations, asset meta).

---

🔐 Permissions &amp; Security
----------------------------

[](#-permissions--security)

- All routes are under `web` with `statamic.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
-------------------

[](#-local-development)

```
git clone git@github.com:emran-alhaddad/statamic-content-sync.git
cd statamic-content-sync
composer install
npm i && npm run build
vendor/bin/pint
```

Optionally, link into a Statamic app with a path repository for rapid iteration.

---

🐞 Troubleshooting
-----------------

[](#-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.js` is committed and provider registers:

    ```
    Statamic::script('content-sync', __DIR__.'/../resources/dist/js/content-sync.js');
    ```
- **zsh eats `*`**: Quote your Composer constraint (`"vendor/pkg:*@dev"`) or use `noglob`.

---

🗺️ Roadmap
----------

[](#️-roadmap)

- Per-field merge decisions in the diff UI
- Queueable import &amp; progress
- Binary asset copy helpers (between disks)
- Rollback &amp; audit logs
- Tests + fixtures (Pest)

---

🤝 Contributing
--------------

[](#-contributing)

PRs welcome! Please:

1. Run `vendor/bin/pint --test`
2. Build assets via `npm run build`
3. Keep commits scoped &amp; conventional (e.g., `feat:`, `fix:`, `chore:`)

---

📜 License
---------

[](#-license)

MIT © Emran Alhaddad

---

🔗 Links
-------

[](#-links)

- Packagist:
- GitHub:
- Issues:
- Actions:

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance48

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

21

Last Release

311d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7cad96f9e9c3c7a4600d1f5c458f3fbce165cbbcfa4600335fae50f5acf59b05?d=identicon)[emran-alhaddad](/maintainers/emran-alhaddad)

---

Top Contributors

[![emran-alhaddad](https://avatars.githubusercontent.com/u/65433346?v=4)](https://github.com/emran-alhaddad "emran-alhaddad (31 commits)")

---

Tags

difflaravelexportcontentimportsyncstatamic

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/emran-alhaddad-statamic-content-sync/health.svg)

```
[![Health](https://phpackages.com/badges/emran-alhaddad-statamic-content-sync/health.svg)](https://phpackages.com/packages/emran-alhaddad-statamic-content-sync)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[statamic/statamic

Statamic

829179.5k](/packages/statamic-statamic)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.7k](/packages/duncanmcclean-statamic-cargo)[firefly-iii/data-importer

Firefly III Data Import Tool.

8035.8k](/packages/firefly-iii-data-importer)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

23111.5k14](/packages/marcorieser-statamic-livewire)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
