{"id":19622139,"url":"https://github.com/commercetools/sphere-product-type-json-generator","last_synced_at":"2025-07-11T11:32:57.753Z","repository":{"id":13683580,"uuid":"16377358","full_name":"commercetools/sphere-product-type-json-generator","owner":"commercetools","description":"A command line tool for generating ProductTypes JSON representations from CSV templates.","archived":false,"fork":false,"pushed_at":"2024-11-17T12:13:05.000Z","size":1592,"stargazers_count":5,"open_issues_count":26,"forks_count":7,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-06-26T02:07:45.998Z","etag":null,"topics":["audit-import-export"],"latest_commit_sha":null,"homepage":"https://impex.sphere.io","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/commercetools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-MIT","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,"zenodo":null}},"created_at":"2014-01-30T13:01:14.000Z","updated_at":"2024-11-17T12:13:09.000Z","dependencies_parsed_at":"2024-11-18T00:15:28.259Z","dependency_job_id":null,"html_url":"https://github.com/commercetools/sphere-product-type-json-generator","commit_stats":null,"previous_names":["sphereio/sphere-product-type-json-generator"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/commercetools/sphere-product-type-json-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fsphere-product-type-json-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fsphere-product-type-json-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fsphere-product-type-json-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fsphere-product-type-json-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commercetools","download_url":"https://codeload.github.com/commercetools/sphere-product-type-json-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fsphere-product-type-json-generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263077626,"owners_count":23410167,"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":["audit-import-export"],"created_at":"2024-11-11T11:26:10.702Z","updated_at":"2025-07-11T11:32:57.727Z","avatar_url":"https://github.com/commercetools.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"background-color: yellow; color: black; padding: 10px; text-align: center; font-weight: bold;\"\u003e\n  \u003ch2\u003e🚨 Non-maintainable 🚨\u003c/h2\u003e\n  \u003cp\u003eStarting January 1, 2025, we will no longer provide maintenance or updates for the CLI ImpEx tools. After this date, this tool will no longer receive bug fixes, security patches, or new features.\u003c/p\u003e\n\u003c/div\u003e\n\n\n\u003cimg src=\"https://impex.europe-west1.gcp.commercetools.com/static/images/ct-logo.svg\" alt=\"commercetools logo\" width=\"200\"\u003e\n\n# ProductType JSON generator\n\n[![NPM](https://nodei.co/npm/sphere-product-type-json-generator.png?downloads=true)](https://www.npmjs.org/package/sphere-product-type-json-generator)\n\n[![Build Status](https://travis-ci.org/sphereio/sphere-product-type-json-generator.png?branch=master)](https://travis-ci.org/sphereio/sphere-product-type-json-generator) [![Dependency Status](https://david-dm.org/sphereio/sphere-product-type-json-generator.png?theme=shields.io)](https://david-dm.org/sphereio/sphere-product-type-json-generator) [![devDependency Status](https://david-dm.org/sphereio/sphere-product-type-json-generator/dev-status.png?theme=shields.io)](https://david-dm.org/sphereio/sphere-product-type-json-generator#info=devDependencies) [![Coverage Status](https://coveralls.io/repos/sphereio/sphere-product-type-json-generator/badge.png?branch=master)](https://coveralls.io/r/sphereio/sphere-product-type-json-generator?branch=master) [![Code Climate](https://codeclimate.com/github/sphereio/sphere-product-type-json-generator.png)](https://codeclimate.com/github/sphereio/sphere-product-type-json-generator)\n\nThis component allows you to generate commercetools **ProductType** _JSON_ drafts from _CSV_ files in order to create those product types in your commercetools project.\n\n## Getting started\n\nIf you just want to use the tool, we recommend to use [commercetools' impex platform](https://impex.commercetools.com) to avoid any local installation - you only need your browser.\n\nNevertheless you can run the program locally. You need [NodeJS](https://nodejs.org/download/) installed and simply run the following command in your terminal:\n\n```bash\n$ npm install -g sphere-product-type-json-generator\n```\n\nAnd then run:\n```\n$ product-type-generator\n```\n\nThe component requires two _CSV_ files:\n* a _CSV_ file describing product attributes and their values (e.g. for type _Enumeration_)\n* a _CSV_ file describing product types in general and the used attributes\n\n\u003e Please find some example CSV files in the [data](data) folder\n\n### Posting generated product types\nThe generated JSON files can be used then to be directly imported via commercetools HTTP API to your project.\nWe provide a simple command to do that:\n\n```bash\n$ product-type-update\n```\n\nSimply pass the credentials and your file to import via `--source`. If you provide a **directory**, all `*.json` files inside that directory will be uploaded.\n\n## Docker\n\n[![Docker build](http://dockeri.co/image/sphereio/product-type-json-generator)](https://registry.hub.docker.com/u/sphereio/product-type-json-generator/)\n\nThere is also a docker container for easy setup/execution.\n\nRun docker container:\n```bash\ndocker run -v /path/to/files/:/files sphereio/product-type-generator\n```\n\nSet an alias for repeated calls:\n```bash\nalias product-type='docker run -v /path/to/files/:/files sphereio/product-type-generator'\n```\n\n## Development\n\n* Clone this repository and change into the directory\n* Install all necessary dependencies with\n\n```bash\n    npm install\n```\n\n* To run tests you have to set up credentials for sphere project first:\n  For setting credentials you can create file in your home folder `~/.sphere-project-credentials.json` with content:\n  \n```\n{\n    \"{PROJECT_ID}\": {\n        \"client_id\": \"{CLIENT_ID}\",\n        \"client_secret\": \"{CLIENT_SECRET}\"\n    }\n}\n```\n\n Than you can do:\n\n```bash\n  export SPHERE_PROJECT_KEY={PROJECT_ID}\n  npm test\n```\n\n This will start tests under sphere project `{PROJECT_ID}`.\n  \n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).\nMore info [here](CONTRIBUTING.md)\n\n## Releasing\nReleasing a new version is completely automated using the Grunt task `grunt release`.\n\n```javascript\ngrunt release // patch release\ngrunt release:minor // minor release\ngrunt release:major // major release\n```\n\n## License\nCopyright (c) 2014 SPHERE.IO\nLicensed under the [MIT license](LICENSE-MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercetools%2Fsphere-product-type-json-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommercetools%2Fsphere-product-type-json-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercetools%2Fsphere-product-type-json-generator/lists"}