{"id":21252077,"url":"https://github.com/leoglme/pokebay-cli","last_synced_at":"2025-04-14T03:52:39.237Z","repository":{"id":230633956,"uuid":"779853480","full_name":"Leoglme/PokeBay-CLI","owner":"Leoglme","description":"Typescript cli tool to simplify and automate the listing of Pokémon items on eBay, such as cards, graded cards, boosters, displays and so on. ","archived":false,"fork":false,"pushed_at":"2024-04-04T04:21:01.000Z","size":5990,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T17:51:55.504Z","etag":null,"topics":["ebay-api","ebay-sdk","pokemon","typescript"],"latest_commit_sha":null,"homepage":"https://dibodev.com/","language":"TypeScript","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/Leoglme.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2024-03-31T00:46:48.000Z","updated_at":"2024-11-01T23:45:55.000Z","dependencies_parsed_at":"2024-04-04T05:27:31.472Z","dependency_job_id":null,"html_url":"https://github.com/Leoglme/PokeBay-CLI","commit_stats":null,"previous_names":["leoglme/pokebay-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leoglme%2FPokeBay-CLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leoglme%2FPokeBay-CLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leoglme%2FPokeBay-CLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leoglme%2FPokeBay-CLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Leoglme","download_url":"https://codeload.github.com/Leoglme/PokeBay-CLI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819359,"owners_count":21166474,"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":["ebay-api","ebay-sdk","pokemon","typescript"],"created_at":"2024-11-21T03:46:08.144Z","updated_at":"2025-04-14T03:52:39.201Z","avatar_url":"https://github.com/Leoglme.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  PokeBay-CLI\n\nTypescript cli tool to simplify and automate the listing of Pokémon items on eBay, such as cards, graded cards, boosters, displays and so on.\n## Contents\n- [Installation](#installation)\n- [Configuration](#configuration)\n    - [.env Variables](#env-variables)\n    - [Preparing Images](#preparing-images)\n    - [Creating items.json](#creating-itemsjson)\n- [Usage](#usage)\n- [Building items.json with ChatGPT](#building-itemsjson-with-chatgpt)\n- [Running the Script](#running-the-script)\n\n## Installation\n\nClone the repository and install dependencies:\n\n```bash\ngit clone https://github.com/Leoglme/PokeBay-CLI\ncd  PokeBay-CLI\nnpm install\n```\n\n## Configuration\n\n### .env Variables\n\nCreate a `.env` file based on `.env.example` provided, and fill in your [eBay](https://developer.ebay.com/develop/apis) and [imgbb API](https://api.imgbb.com/) credentials:\n\n```plaintext\n# eBay Sandbox (for testing)\nEBAY_APP_ID_SANDBOX=YourSandboxAppID\nEBAY_DEV_ID_SANDBOX=YourSandboxDevID\nEBAY_CERT_ID_SANDBOX=YourSandboxCertID\nEBAY_AUTH_TOKEN_SANDBOX=YourSandboxAuthToken\n\n# eBay Production (for live listings)\nEBAY_APP_ID_PROD=YourProdAppID\nEBAY_DEV_ID_PROD=YourProdDevID\nEBAY_CERT_ID_PROD=YourProdCertID\nEBAY_AUTH_TOKEN_PROD=YourProdAuthToken\n\n# IMGBB (for image hosting)\nIMGBB_API_KEY=YourImgbbAPIKey\n```\n\n### Preparing Images\n\nPlace images of the items you wish to list in the `images` directory at the root of the project.\n\n### Creating items.json\n\nCreate an `items.json` file at the project root with the details of the items you wish to list. Use the provided example as a template:\n\n```json\n[\n  {\n    \"name\": \"Hisuian Samurott Vstar\",\n    \"number\": \"230/172\",\n    \"set\": \"s12a Vstar\",\n    \"language\": \"Japonaise\",\n    \"images\": [\"IMG_3417.jpg\", \"IMG_3418.jpg\", \"IMG_3419.jpg\"],\n    \"isGraded\": false,\n    \"condition\": \"Near Mint or Better\",\n    \"price\": 8\n  }\n]\n```\n\nHere is the type of item in the `items.json` file:\n\n```typescript\ntype Card = {\n  name: string;\n  number: string;\n  set: string;\n  language: string;\n  images: string[];\n  isGraded: boolean;\n  grade?: number;\n  gradeCompany?: string;\n  startPrice?: number;\n  price?: number;\n  condition?: EbayConditions;\n  quantity?: number;\n  minimumBestOfferAmount?: number;\n}\n```\n\n\n## Usage\n\n### Building items.json with ChatGPT\n\nTo facilitate creating the `items.json` file, use [this GPT prompt link](https://chat.openai.com/share/96b60da5-b13a-4c0c-88f7-5fc4c515f591). Provide details about your items, and ChatGPT will help structure your JSON file.\n\n---\n\n### Generating `items.json` Automatically\n\nIn addition to manually creating `items.json` or using ChatGPT to build it, PokeBay-CLI now supports automatic generation of this file using a new command:\n\n```bash\nnpm run generateJson\n```\n\nThis command simplifies the process of listing Pokémon items on eBay by automatically filling in the necessary item information based on a set of predefined keywords.\n\n### How It Works\n\n1. **Prepare a `baseInfos` Array**: First, define a `baseInfos` array in the `generateJson.ts` script. Each element of this array should include a `keyword` for searching eBay and an array of `images` for the item.\n\n   Example:\n    ```typescript\n    const baseInfos: BaseInfo[] = [\n        {\n            keyword: '55/102',\n            images: ['IMG_3018.jpg', 'IMG_3019.jpg']\n        }\n    ];\n    ```\n\n2. **Run the Command**: Execute the command in your terminal:\n    ```bash\n    npm run generateJson\n    ```\n   This will search eBay for items matching each keyword, fetch details, and generate an `items.json` file at the project root, filled with the structured data for your listings.\n\n#### Requirements\n\nBefore running the command, ensure you have:\n\n- Placed the images for your items in the `images` directory as specified in your `baseInfos` array.\n\nThis feature aims to streamline the setup process, making it quicker and easier to start listing your Pokémon items on eBay.\n\n### Running the Script\n\nTo start listing your Pokémon items on eBay, run:\n\n```bash\nnpm run start\n```\n\nEnsure you have completed the `.env` setup and prepared `items.json` and images as described above.\n\n---\n\n### Developed with ❤️ by Léo Guillaume (Leoglme) \nLicense: MIT\n[dibodev](https://dibodev.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoglme%2Fpokebay-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleoglme%2Fpokebay-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoglme%2Fpokebay-cli/lists"}