2021-10-13 17:34:57 +02:00
< div align = "center" >
< h1 > Strapi config-sync plugin< / h1 >
2024-10-05 14:01:01 +02:00
< p style = "margin-top: 0;" > This plugin is a multi-purpose tool to manage your Strapi database records through JSON files. Mostly used to version controlconfig data for automated deployment, automated tests and data sharing for collaboration purposes.< / p >
< a href = "https://docs.pluginpal.io/config-sync" > Read the documentation< / a >
2021-10-13 17:34:57 +02:00
< p >
< a href = "https://www.npmjs.org/package/strapi-plugin-config-sync" >
< img src = "https://img.shields.io/npm/v/strapi-plugin-config-sync/latest.svg" alt = "NPM Version" / >
< / a >
< a href = "https://www.npmjs.org/package/strapi-plugin-config-sync" >
< img src = "https://img.shields.io/npm/dm/strapi-plugin-config-sync" alt = "Monthly download on NPM" / >
< / a >
< a href = "https://codecov.io/gh/boazpoolman/strapi-plugin-config-sync" >
2022-12-30 13:53:27 +01:00
< img src = "https://img.shields.io/github/actions/workflow/status/boazpoolman/strapi-plugin-config-sync/tests.yml?branch=master" alt = "CI build status" / >
2021-10-13 17:34:57 +02:00
< / a >
< a href = "https://codecov.io/gh/boazpoolman/strapi-plugin-config-sync" >
< img src = "https://codecov.io/gh/boazpoolman/strapi-plugin-config-sync/coverage.svg?branch=master" alt = "codecov.io" / >
< / a >
< / p >
< / div >
2021-03-19 19:04:22 +01:00
2021-11-21 20:47:09 +01:00
## ✨ Features
2021-03-21 19:01:55 +01:00
2022-06-19 22:32:57 +02:00
- **CLI** - `config-sync` CLI for syncing the config from the command line
- **GUI** - Settings page for syncing the config in Strapi admin
- **Partial sync** - Import or export only specific portions of config
- **Custom types** - Include your custom collection types in the sync process
- **Import on bootstrap** - Easy automated deployment with `importOnBootstrap`
- **Exclusion** - Exclude single config entries or all entries of a given type
- **Diff viewer** - A git-style diff viewer to inspect the config changes
2021-11-21 21:47:58 +01:00
2024-10-05 14:01:01 +02:00
## ⏳ Getting started
2021-03-21 19:01:55 +01:00
2024-10-05 14:01:01 +02:00
[Read the Getting Started tutorial ](https://docs.pluginpal.io/config-sync ) or follow the steps below:
2021-03-21 19:01:55 +01:00
2021-11-21 20:47:09 +01:00
```bash
# using yarn
yarn add strapi-plugin-config-sync
2021-03-21 19:01:55 +01:00
2021-11-21 20:47:09 +01:00
# using npm
npm install strapi-plugin-config-sync --save
```
Add the export path to the `watchIgnoreFiles` list in the `config/admin.js` file.
2021-03-25 21:24:22 +01:00
This way your app won't reload when you export the config in development.
2021-11-21 20:47:09 +01:00
##### `config/admin.js`:
2021-11-23 19:17:31 +01:00
```
module.exports = ({ env }) => ({
// ...
watchIgnoreFiles: [
2021-12-28 22:10:04 +01:00
'**/config/sync/**',
2021-11-23 19:17:31 +01:00
],
});
```
2021-11-21 20:47:09 +01:00
After successful installation you have to rebuild the admin UI so it'll include this plugin. To rebuild and restart Strapi run:
```bash
# using yarn
2022-01-05 18:05:37 +01:00
yarn build
2021-11-21 20:47:09 +01:00
yarn develop
# using npm
2022-01-05 18:05:37 +01:00
npm run build
2021-11-21 20:47:09 +01:00
npm run develop
```
2022-03-16 22:10:24 +01:00
The **Config Sync** plugin should now appear in the **Settings** section of your Strapi app.
2024-10-05 14:01:01 +02:00
To start tracking your config changes you have to make the first export. This will dump all your configuration data to the `/config/sync` directory. You can export either through [the CLI ](https://docs.pluginpal.io/config-sync/cli ) or [Strapi admin panel ](https://docs.pluginpal.io/config-sync/admin-gui )
2021-11-21 20:47:09 +01:00
Enjoy 🎉
2024-10-05 14:01:01 +02:00
## 📓 Documentation
2021-12-28 22:10:04 +01:00
2024-10-05 14:01:01 +02:00
See our dedicated [repository ](https://github.com/pluginpal/docs ) for all of PluginPal's documentation, or view the Config Sync documentation live:
2021-12-28 22:10:04 +01:00
2024-10-05 14:01:01 +02:00
- [Config Sync documentation ](https://docs.pluginpal.io/config-sync )
2021-03-21 19:01:55 +01:00
2021-11-21 20:47:09 +01:00
## 🤝 Contributing
Feel free to fork and make a pull request of this plugin. All the input is welcome!
2021-03-27 21:24:43 +01:00
## ⭐️ Show your support
Give a star if this project helped you.
2021-11-21 20:47:09 +01:00
## 🔗 Links
2021-03-21 19:01:55 +01:00
2024-10-05 14:01:01 +02:00
- [PluginPal marketplace ](https://www.pluginpal.io/plugin/config-sync )
2021-11-21 20:47:09 +01:00
- [NPM package ](https://www.npmjs.com/package/strapi-plugin-config-sync )
- [GitHub repository ](https://github.com/boazpoolman/strapi-plugin-config-sync )
2024-10-05 14:01:01 +02:00
- [Strapi marketplace ](https://market.strapi.io/plugins/strapi-plugin-config-sync )
2021-03-21 19:01:55 +01:00
2021-11-21 20:47:09 +01:00
## 🌎 Community support
2021-03-21 19:01:55 +01:00
2021-11-21 20:47:09 +01:00
- For general help using Strapi, please refer to [the official Strapi documentation ](https://strapi.io/documentation/ ).
- For support with this plugin you can DM me in the Strapi Discord [channel ](https://discord.strapi.io/ ).
2021-03-21 19:01:55 +01:00
2021-11-21 20:47:09 +01:00
## 📝 Resources
2024-10-05 14:01:01 +02:00
- [MIT License ](https://github.com/pluginpal/strapi-plugin-config-sync/blob/master/LICENSE.md )