{"id":13651407,"url":"https://github.com/robiningelbrecht/pokemon-card-generator","last_synced_at":"2026-03-17T01:39:29.405Z","repository":{"id":115315928,"uuid":"599984135","full_name":"robiningelbrecht/pokemon-card-generator","owner":"robiningelbrecht","description":"A PHP app that generates Pokemon cards by using GPT and Stable Diffusion.","archived":false,"fork":false,"pushed_at":"2023-03-27T14:14:27.000Z","size":107571,"stargazers_count":90,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T07:11:28.908Z","etag":null,"topics":["ai","gpt","stable-diffusion"],"latest_commit_sha":null,"homepage":"https://pokemon-card-generator.robiningelbrecht.be/","language":"PHP","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/robiningelbrecht.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-02-10T10:16:03.000Z","updated_at":"2025-03-25T23:14:09.000Z","dependencies_parsed_at":"2024-01-14T12:38:38.453Z","dependency_job_id":null,"html_url":"https://github.com/robiningelbrecht/pokemon-card-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robiningelbrecht%2Fpokemon-card-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robiningelbrecht%2Fpokemon-card-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robiningelbrecht%2Fpokemon-card-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robiningelbrecht%2Fpokemon-card-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robiningelbrecht","download_url":"https://codeload.github.com/robiningelbrecht/pokemon-card-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023730,"owners_count":21199960,"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":["ai","gpt","stable-diffusion"],"created_at":"2024-08-02T02:00:49.128Z","updated_at":"2026-03-17T01:39:24.368Z","avatar_url":"https://github.com/robiningelbrecht.png","language":"PHP","funding_links":[],"categories":["👑Stable Diffusion"],"sub_categories":["PHP"],"readme":"\u003ch1 align=\"center\"\u003eAI Pokemon card generator\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/robiningelbrecht/pokemon-card-generator/raw/master/readme/banner.png\" alt=\"Banner\"\u003e\n\u003c/p\u003e\n\n---\n\nThis PHP script uses AI to generate new, random Pokemon cards by using \n - `GPT` to generate a name and description\n - `Stable Diffusion` to create a visual\n - [Pokémon TCG](https://github.com/PokemonTCG/pokemon-tcg-data) for accurate moves sets\n - [PokeApi](https://pokeapi.co/) for accurate element types\n\nFirst of all, thanks to [Jack](https://github.com/pixegami) for the amazing work \non the [Python equivalent](https://github.com/pixegami/pokemon-card-generator) of\nthis repository. I was inspired by his creativity to generate Pokémon cards out of thin air, \nalthough I came up with a slightly different approach.\n\n### Comparison\n\n|                                                |     This repo    | Jack's repo |\n|------------------------------------------------|:-------------------:|:-------------:|\n| AI to generate name and description            | OpenAI - GPT3, GPT4 | OpenAI - GPT3 |\n| AI to generate visual                          | Stable Difussion    |  Midjourney   |\n| Generate multiple cards at once                |         ✅          |      ✅        |\n| Generate cards of a specific element           |         ✅          |      ✅        |\n| Generate cards of a specific creature          |         ✅          |      ✅        |\n| Generate a series that evolve from one another |         ✅          |      ✅        |\n| Fully generate a card with one command         |         ✅          |      ❌        |\n| Gallery with overview of generated cards       |         ✅          |      ❌        |\n\n## Installation\n\n```bash\n\u003e git clone git@github.com:robiningelbrecht/pokemon-card-generator.git\n# Build docker containers\n\u003e docker-compose up -d --build\n# Install dependencies\n\u003e docker-compose run --rm php-cli composer install\n```\n\n## Configuration\n\nFor this script to work you'll need two different API keys\n\n### OpenAI\n\n* Set up an OpenAI account by navigating to https://beta.openai.com/signup\n* Create an API key on https://platform.openai.com/account/api-keys\n\n### Replicate.com\n\n* Set up a Replicate account by navigating to https://replicate.com/signin\n* Copy your API key from https://replicate.com/account\n\nThe model used for generating visuals is [OpenJourney](https://replicate.com/prompthero/openjourney).\nIt's a Stable Diffusion model fine-tuned on Midjourney v4 images.\n\n\u003csub\u003eBoth accounts have free tiers at first, but after a while you will need to enter\ncredit card details. It'll cost you around 1-2 cents to generate a card.\u003c/sub\u003e\n\n### .env\n\nCopy `.env.dist` and rename to `.env`, it should at least contain following info:\n\n```dotenv\nOPEN_AI_API_KEY=your-open-ai-api-key\nREPLICATE_API_KEY=your-replicate-api-key\n```\n\n## Generate your first card\n\nAt this point, you should be locked and loaded to generate your first Pokémon card by running\n\n```bash\n\u003e docker-compose run --rm php-cli bin/console app:card:generate\n```\n\nYour CLI should output something along the lines of\n\n\u003cimg src=\"https://github.com/robiningelbrecht/pokemon-card-generator/raw/master/readme/cli-output.png\" alt=\"CLI output\"\u003e\n\nYou'll be able to view your card and all information used to generate it, \nby navigating to the card gallery page: `http://localhost:8080/`.\n\n\u003cimg src=\"https://github.com/robiningelbrecht/pokemon-card-generator/raw/master/readme/example-generated-card.png\" alt=\"Example\"\u003e\n\n### CLI command options\n\n```\n-t, --cardType        The card type you want to generate, omit to use a random one. Valid options are dark, electric, fighting, fire, grass, normal, psychic, steel, water\n-r, --rarity          The rarity of the Pokémon you want to generate, omit to use a random one. Valid options are common, uncommon, rare\n-s, --size            The size of the Pokémon you want to generate, omit to use a random one. Valid options are xl, l, m, s, xs\n-c, --creature        The creature the Pokémon needs to look like (e.g. monkey, dragon, etc.). Omit to to use a random one\n-e, --evolutionSeries Indicates if you want to generate a series that evolve from one another. Options \"size\", \"rarity\" and \"numberOfCards\" will be ignored\n-x, --numberOfCards   The number of cards to generate. A number between 1 and 10 [default: 1]\n-f, --fileType        The image file type you want to use. Valid options are svg, png [default: \"png\"]\n-g, --gptVersion      GPT version to use. Valid options are 3, 4 [default: 4]\n-h, --help            Display help for the given command. When no command is given display help for the list command\n```\n\n\u003csub\u003eThe PNG slightly differs from the SVG because the latter allows for more flexibility while generating the image\u003csub\u003e\n\n## Examples\n\nThere's an example gallery available on https://pokemon-card-generator.robiningelbrecht.be/\n\n\u003cimg src=\"https://github.com/robiningelbrecht/pokemon-card-generator/raw/master/readme/gallery-example.png\" alt=\"Gallery\"\u003e\n\n## Gotta generate 'em all\n\nBe sure to also check https://gotta-generate-em-all.com. \nIt generates and publishes a new card every day 🥳. Cards are also publised to https://www.reddit.com/r/GottaGenerateEmAll/\n\n\u003cimg src=\"https://github.com/robiningelbrecht/pokemon-card-generator/raw/master/readme/gotta-generate-em-all.jpeg\" alt=\"Gotta generate 'em all\"\u003e\n\n## Acknowledgements\n\nThanks to [TheDuckTamerBlanks](https://www.deviantart.com/katarawaterbender) for the blank card templates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobiningelbrecht%2Fpokemon-card-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobiningelbrecht%2Fpokemon-card-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobiningelbrecht%2Fpokemon-card-generator/lists"}