The export and compare work quite well. but import doesn't. it is very comlicated due to references to other objects etc. so i'm happy to not worry about it too much right now
A powerful CLI tool for managing and migrating Shopify metafield definitions between stores. This tool helps developers and store managers export, compare, and import metafield definitions across different Shopify stores.
- 📤 Export Metafield Definitions: Extract all metafield definitions from a source store
- 📥 Import Metafield Definitions: Import definitions into a target store
- 🔍 Compare Definitions: Analyze differences between stores
- 📋 List Metafields: View all metafield definitions in a store
- ✨ Supported Owner Types:
- Collections
- Customers
- Orders
- Products
- Product Variants
- Clone this repository:
git clone https://github.com/your-username/shopify-meta-push.git
cd shopify-meta-push- Install dependencies:
pip install -r requirements.txt- Create a
.envfile with your Shopify Admin API credentials:
SHOPIFY_ADMIN_TOKEN=your_admin_api_tokenExport definitions from your source store:
python export_metafields.py --store source-store.myshopify.comThis will create a JSON file containing all metafield definitions.
Compare metafield definitions between source and target stores:
python compare_metafields.py --source definitions_export_source.json --target definitions_export_target.jsonThis generates a metafield_diff.json file showing differences between stores.
Import the missing or changed definitions to your target store:
python import_metafields.py --store target-store.myshopify.comView all metafield definitions in a store:
python list_metafields.py --store your-store.myshopify.comContributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Create a .env file in the project root with the following variables:
SHOPIFY_ADMIN_TOKEN=your_admin_api_token[Add your license information here]
[Add support information or contact details here]