{"id":28256932,"url":"https://github.com/github-samples/gh-game","last_synced_at":"2026-02-27T15:02:08.914Z","repository":{"id":292378319,"uuid":"977034919","full_name":"github-samples/gh-game","owner":"github-samples","description":"This is a GitHub CLI Extension to run games on the command line, originally started by @chrisreddington on Rubber Duck Thursdays.","archived":false,"fork":false,"pushed_at":"2025-06-03T10:58:25.000Z","size":130,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-03T22:35:47.976Z","etag":null,"topics":["cli","gh-extension","gh-extensions","github","github-cli","go","golang","terminal"],"latest_commit_sha":null,"homepage":"https://gh.io/rubberduckthursdays","language":"Go","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/github-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-03T09:22:20.000Z","updated_at":"2025-06-03T10:58:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"a60a9798-ec83-47d5-acd2-e9fa91074052","html_url":"https://github.com/github-samples/gh-game","commit_stats":null,"previous_names":["github-samples/gh-game"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/github-samples/gh-game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-samples%2Fgh-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-samples%2Fgh-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-samples%2Fgh-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-samples%2Fgh-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github-samples","download_url":"https://codeload.github.com/github-samples/gh-game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-samples%2Fgh-game/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260358101,"owners_count":22996956,"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":["cli","gh-extension","gh-extensions","github","github-cli","go","golang","terminal"],"created_at":"2025-05-19T23:14:35.302Z","updated_at":"2026-02-27T15:02:08.909Z","avatar_url":"https://github.com/github-samples.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gh-game\n\nA GitHub CLI extension that allows you to play games through the GitHub CLI.\n\n## Features\n\n- **Multiple Games**: Play coin toss, higher or lower, rock paper scissors, tic tac toe, and word guess games\n- **Terminal-Based**: Fully playable through your terminal using GitHub CLI\n- **Interactive UI**: User-friendly terminal interfaces for all games\n- **Score Tracking**: Keep track of your scores and streaks in supported games\n\n## Background\n\nThe gh-game extension serves as both a fun diversion and a showcase of GitHub CLI extension capabilities.\n\n### Roadmap\n\n- Additional games to be added in the future\n\n## Installation\n\n```sh\ngh extension install github-samples/gh-game\n```\n\n## Requirements\n\n- Go 1.23 or newer\n- GitHub CLI installed\n- Terminal with Unicode support for optimal experience\n\n### Setting Up Development Environment\n\n1. Clone the repository\n2. Run `go build` to build the extension\n3. Run `go test ./...` to run the tests\n\n### Development Container\n\nThis project includes a [development container configuration](.devcontainer/devcontainer.json) for VS Code, which provides a consistent development environment with:\n- Go 1.23\n- GitHub CLI\n- Several VS Code extensions for GitHub\n\n## Commands\n\n### Coin Toss\n\nPlay a coin toss game where you try to guess whether the coin will land on heads or tails. Keep your streak going by guessing correctly!\n\n```sh\ngh game cointoss heads  # or tails\n```\n\nThe game will continue as long as you keep guessing correctly, allowing you to build up a streak. You can quit at any time by selecting \"Quit\" when prompted for your next guess.\n\n### Higher or Lower\n\nPlay a number guessing game where you predict if the next random number will be higher or lower than the current one. See how long you can maintain your streak of correct guesses!\n\n```sh\ngh game higherlower\n```\n\nOptional flags:\n- `--min` or `-m`: Set the minimum possible number (default: 1)\n- `--max` or `-M`: Set the maximum possible number (default: 100)\n\nExample with custom range:\n```sh\ngh game higherlower --min 1 --max 1000\n```\n\n### Rock Paper Scissors\n\nPlay Rock Paper Scissors against the computer. Best of 3, 5, 7, or 9 rounds.\n\n```sh\ngh game rockpaperscissors\n```\n\nChoose your move (rock, paper, or scissors) in each round, and the computer will randomly select its move. The game follows standard Rock Paper Scissors rules:\n- Rock crushes Scissors\n- Scissors cuts Paper\n- Paper covers Rock\n\n### Tic Tac Toe\n\nPlay the classic game of Tic Tac Toe against another player. Players take turns placing X's and O's on a 3x3 grid, trying to get three in a row horizontally, vertically, or diagonally.\n\n```sh\ngh game tictactoe\n```\n\nThe game provides an interactive interface where you can select positions on the board using numbers 1-9, corresponding to the grid positions from left to right, top to bottom.\n\n### Word Guess\n\nPlay a word guessing game where you guess a GitHub-related term one letter at a time. Try to reveal the word before running out of guesses!\n\n```sh\ngh game wordguess\n```\n\nThe game selects a random GitHub-related term, and you need to guess it by suggesting one letter at a time. Each correct letter is revealed in its position. Each incorrect guess reduces your remaining guesses. You win by guessing the complete word before making 6 incorrect guesses.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. Check out our [contributing guidelines](CONTRIBUTING.md) for more details on how to get involved.\n\n## Maintainers\n\nThis project is maintained by the GitHub Developer Relations team. See [CODEOWNERS](CODEOWNERS) file for specific maintainers.\n\n## License\n\nThis project is available as open source under the terms of the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub-samples%2Fgh-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub-samples%2Fgh-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub-samples%2Fgh-game/lists"}