{"id":13475611,"url":"https://github.com/ScreenStaring/shopify_id_export","last_synced_at":"2025-03-27T00:31:36.460Z","repository":{"id":57545704,"uuid":"287403335","full_name":"ScreenStaring/shopify_id_export","owner":"ScreenStaring","description":"Export Shopify product and variant IDs —along with other identifiers— to a CSV or JSON file","archived":false,"fork":false,"pushed_at":"2025-01-31T23:45:39.000Z","size":33,"stargazers_count":20,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T06:54:23.983Z","etag":null,"topics":["csv","golang","json","shopify","shopify-developers","shopify-development","shopify-export","shopify-partners"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ScreenStaring.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-14T00:00:32.000Z","updated_at":"2025-01-31T23:45:43.000Z","dependencies_parsed_at":"2024-12-12T04:29:34.888Z","dependency_job_id":null,"html_url":"https://github.com/ScreenStaring/shopify_id_export","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"6dcc0e93fce44fec87ecf090af2ceba77acdca4d"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreenStaring%2Fshopify_id_export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreenStaring%2Fshopify_id_export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreenStaring%2Fshopify_id_export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreenStaring%2Fshopify_id_export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScreenStaring","download_url":"https://codeload.github.com/ScreenStaring/shopify_id_export/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245760754,"owners_count":20667887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","golang","json","shopify","shopify-developers","shopify-development","shopify-export","shopify-partners"],"created_at":"2024-07-31T16:01:21.890Z","updated_at":"2025-03-27T00:31:36.455Z","avatar_url":"https://github.com/ScreenStaring.png","language":"Go","funding_links":[],"categories":["Go","Tools","工具"],"sub_categories":["Command Line Tools","命令行工具"],"readme":"# Shopify ID Export\n\nDump Shopify product and variant IDs —along with other identifiers— to a CSV or JSON file.\n\nWhen data munging in Shopify you'll often need to (cross-)reference product IDs, variant IDs, SKUs,\nbarcodes, etc... Shopify does not make product nor variant ID available via their product export.\n\nOther times one is provided a product spreadsheet with SKUs but the target system relies\non product/variant IDs.\n\nThis program can help.\n\n\n## Shopify REST API Removal\n\nTo account for Shopify's [Products and Variants API removal](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model)\nv0.1.0 has been updated from the REST Admin API to the GraphQL Admin API. From testing (prior to Feb 1st, 2025, the REST API cutoff) this changed\nresulted in a 4x increase in export time! 😱\n\n## Installation\n\nDownload the version for your platform on the [releases page](https://github.com/screenstaring/shopify_id_export/releases).\nWindows, macOS/OS X, and GNU/Linux are supported.\n\n## Usage\n\n### Credentials\n\nTo use the command you'll need access to the Shopify store you want to export from.\n\nIf you have access to the store via Shopify Admin, this can be done by [generating private app API credentials](https://shopify.dev/tutorials/generate-api-credentials).\nOnce obtained they can be specified to the `shopify_id_export` command:\n\n```\nshopify_id_export -k my-app-key -p my-app-password shop\n```\n\nIf the store has your app installed, you can use the credentials generated when the shop installed your app:\n\n```\nshopify_id_export -t shop-token shop\n```\n\nIn both cases credentials can be set via environment variables. See [Options](#options).\n\n### Options\n\n```\nshopify_id_export [hjv] [-k key] [-p password] [-r root-property] [-t token] shop\n\nOptions\n-h --help                display this help message\n-j --json                output dump as JSON\n-k --key       key       Shopify API key; defaults to the SHOPIFY_API_KEY environment variable\n-p --password  password  Shopify API password; defaults to the SHOPIFY_API_PASSWORD environment variable\n-r --json-root property  use property as the top-level property for each JSON object\n-s --size      integer   page size to use when retrieving products (default: 250)\n-t --token     token     Shopify API token; defaults to the SHOPIFY_API_TOKEN environment variable\n--timeout      integer   set Shopify client timeout (default: 10 seconds)\n-v --version             display version information\n--verbose                output Shopify API request/response (default: false)\n\nBy default data is output to a CSV file.\n\nValid properties for the --json-root option are: barcode, product_id, product_title, handle, variant_id, sku\n```\n\n### Output to CSV\n\nThis is the default output format. A file named `shop.csv` will be created in the current directory. `shop` will replaced by the shop's name.\n\n#### Combining CSVs\n\nOnce you have a CSV with the missing product info you can combine it with original CSV via the [`xsv`](https://github.com/BurntSushi/xsv) program.\n(csvkit's [`csvjoin`](https://csvkit.readthedocs.io/en/latest/scripts/csvjoin.html) will work as well).\n\nFor example, if the original spreadsheet contains a column called `Product SKU` it can be combined with Shopify ID Export's spreadsheet via:\n```\nxsv join 'Product SKU' original-data.csv SKU shop.csv | xsv select '!SKU' \u003e combined-data.csv\n```\n\nThe 2nd command `xsv select '!SKU'` removes the `SKU` column as it's now redundant.\n\nFor more info and options see `xsv join --help`.\n\n### Output to JSON\n\nTo output a JSON file use the `-j` option:\n```\nshopify_id_export -j -t shop-token shop\n```\n\nThis will create a file named `shop.json` in the current directory. `shop` will be replaced by the shop's name.\n\nIf you're cross-referencing IDs it may be useful to set the root property for the JSON object output for each product/variant.\n\nThis will output each object with the variant's SKU as the root:\n```\nshopify_id_export -j -r sku -t shop-token shop\n```\n\nValid properties for the `-r`/`--json-root` option are: `product_id`, `product_title`, `barcode`, `handle`, `variant_id`, `sku`.\n\n## See Also\n\n- [Shopify Development Tools](https://github.com/ScreenStaring/shopify-dev-tools) - Assists with the development and/or maintenance of Shopify apps and stores\n\n\n## License\n\nReleased under the MIT License: http://www.opensource.org/licenses/MIT\n\n---\n\nMade by [ScreenStaring](http://screenstaring.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FScreenStaring%2Fshopify_id_export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FScreenStaring%2Fshopify_id_export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FScreenStaring%2Fshopify_id_export/lists"}