{"id":50352659,"url":"https://github.com/zoumas/pokedexcli","last_synced_at":"2026-05-29T21:30:39.146Z","repository":{"id":355194159,"uuid":"1227157288","full_name":"zoumas/pokedexcli","owner":"zoumas","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-02T10:50:08.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-02T11:28:48.721Z","etag":null,"topics":["golang","pokeapi"],"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/zoumas.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-02T09:36:47.000Z","updated_at":"2026-05-02T10:50:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zoumas/pokedexcli","commit_stats":null,"previous_names":["zoumas/pokedexcli"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zoumas/pokedexcli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoumas%2Fpokedexcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoumas%2Fpokedexcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoumas%2Fpokedexcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoumas%2Fpokedexcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoumas","download_url":"https://codeload.github.com/zoumas/pokedexcli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoumas%2Fpokedexcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33672124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["golang","pokeapi"],"created_at":"2026-05-29T21:30:38.159Z","updated_at":"2026-05-29T21:30:39.141Z","avatar_url":"https://github.com/zoumas.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pokedexcli\n\n`pokedexcli` is an interactive command-line Pokedex built in Go. It uses the [PokeAPI](https://pokeapi.co/) to browse location areas, discover which Pokemon can appear there, attempt catches, and inspect the Pokemon you have added to your in-memory Pokedex.\n\nThe project started from the boot.dev guided course, but the repository now documents the finished application rather than the tutorial steps.\n\n## Features\n\n- interactive REPL with a simple command-driven workflow\n- paginated browsing of PokeAPI location areas\n- location exploration to list available Pokemon encounters\n- catch attempts with success chance based on a Pokemon's base experience\n- in-memory Pokedex for inspecting caught Pokemon during the current session\n- generic in-memory caching layer to reduce repeated API calls\n- table-driven tests covering command behavior, REPL flow, API integration helpers, and cache expiration\n\n## Requirements\n\n- Go 1.26.2 or a compatible Go toolchain\n- network access to `https://pokeapi.co/`\n\n## Running the CLI\n\nFrom the repository root:\n\n```bash\ngo run .\n```\n\nTo build a local binary:\n\n```bash\ngo build -o pokedexcli .\n./pokedexcli\n```\n\n## Command reference\n\n| Command | Arguments | Description |\n| --- | --- | --- |\n| `help` | none | Print the available commands. |\n| `map` | none | Fetch the next page of location areas. |\n| `mapb` | none | Fetch the previous page of location areas. |\n| `explore` | `\u003clocation-area\u003e` | List the Pokemon that can be encountered in a location area. |\n| `catch` | `\u003cpokemon\u003e` | Attempt to catch a Pokemon and add it to your Pokedex if successful. |\n| `inspect` | `\u003cpokemon\u003e` | Show height, weight, stats, and types for a caught Pokemon. |\n| `pokedex` | none | List the Pokemon currently stored in your Pokedex. |\n| `exit` | none | Exit the CLI. |\n\n## Example session\n\n```text\nPokedex \u003e help\nWelcome to the Pokedex!\nUsage:\n\ncatch: Attempts to catch a Pokemon by name\nexit: Exit the Pokedex\nexplore: Explores a location area and lists the Pokemon that can be found there\nhelp: Displays a help message\ninspect: Desplays detailed information about a Pokemon in your Pokedex by name\nmap: Displays a list of location areas\nmapb: Displays a list of location areas in the previous page\npokedex: Lists all the Pokemon you have caught in your Pokedex\nPokedex \u003e map\ncanalave-city-area\neterna-city-area\npastoria-city-area\n...\nPokedex \u003e explore canalave-city-area\nExploring canalave-city-area...\nFound Pokemon:\n - tentacool\n - tentacruel\n ...\nPokedex \u003e catch tentacool\nThrowing a Pokeball at tentacool...\ntentacool was caught!\nYou may now inspect it with the inspect command.\nPokedex \u003e inspect tentacool\nName: tentacool\nHeight: 9\nWeight: 455\nStats:\n - hp: 40\n - attack: 40\n ...\nTypes:\n - water\n - poison\n```\n\n## How the application works\n\n`pokedexcli` keeps a single session configuration in memory for the lifetime of the process. That configuration owns:\n\n- one reusable `http.Client`\n- pagination state for location browsing\n- separate caches for location pages, explored areas, and Pokemon lookups\n- the current in-memory Pokedex\n\nCatch outcomes are probabilistic. Pokemon with lower base experience are easier to catch, while stronger Pokemon become progressively harder, with a minimum catch chance floor.\n\nThe Pokedex is not persisted to disk, so restarting the CLI starts a fresh session.\n\n## Project structure\n\n| Path | Responsibility |\n| --- | --- |\n| `main.go` | Application entrypoint. |\n| `repl.go` | Read-eval-print loop and command dispatch. |\n| `command.go` | Command registration and command handlers. |\n| `internal/pokeapi` | Typed PokeAPI client helpers and response models. |\n| `internal/pokecache` | Generic expiring in-memory cache. |\n| `*_test.go` | Unit and integration-style tests for CLI behavior and helpers. |\n\n## Testing\n\nRun the full test suite from the repository root:\n\n```bash\ngo test ./...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoumas%2Fpokedexcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoumas%2Fpokedexcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoumas%2Fpokedexcli/lists"}