{"id":15443467,"url":"https://github.com/lemonyte/terminal-snake","last_synced_at":"2026-02-11T22:36:09.166Z","repository":{"id":133545092,"uuid":"404046064","full_name":"lemonyte/terminal-snake","owner":"lemonyte","description":"The classic Snake game, in your terminal.","archived":false,"fork":false,"pushed_at":"2025-03-06T06:49:13.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T07:41:40.537Z","etag":null,"topics":["ascii","game","pyco","python","snake","snake-game","terminal"],"latest_commit_sha":null,"homepage":"","language":"Python","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/lemonyte.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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}},"created_at":"2021-09-07T16:20:27.000Z","updated_at":"2025-03-06T06:49:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"897dfac8-96ca-4b0e-b643-23363a0d13d2","html_url":"https://github.com/lemonyte/terminal-snake","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fterminal-snake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fterminal-snake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fterminal-snake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fterminal-snake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lemonyte","download_url":"https://codeload.github.com/lemonyte/terminal-snake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248943415,"owners_count":21186958,"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":["ascii","game","pyco","python","snake","snake-game","terminal"],"created_at":"2024-10-01T19:35:07.476Z","updated_at":"2026-02-11T22:36:04.141Z","avatar_url":"https://github.com/lemonyte.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terminal Snake\n\nThe classic Snake game, in your terminal.\n\n![Screenshot](https://user-images.githubusercontent.com/49930425/220823010-501ac047-e6de-40cd-b0ef-8ea8f13a8272.png)\n\nThis project was created as a demo for the [Pyco](https://github.com/lemonyte/pyco) library.\n\n## Installation\n\nWith uv:\n\n```shell\nuv tool install git+https://github.com/lemonyte/terminal-snake\n```\n\nWith pip:\n\n```shell\npip install git+https://github.com/lemonyte/terminal-snake\n```\n\nRequires [Python 3.9](https://www.python.org/downloads/) or higher.\n\n## Usage\n\n### Command line\n\n```shell\nsnake [--auto] [--speed \u003cint\u003e]\n```\n\nThe `auto` flag will let the snake control itself.  \nThe `speed` option controls the speed of the game in updates per second. A value of 0 translates to no delay, so the game will run as fast as possible.\n\n### Controls\n\n| Key                            | Description    |\n| ------------------------------ | -------------- |\n| \u003ckbd\u003eESC\u003c/kbd\u003e or \u003ckbd\u003eq\u003c/kbd\u003e | Exit the game  |\n| \u003ckbd\u003eSPACE\u003c/kbd\u003e               | Pause the game |\n| \u003ckbd\u003ew\u003c/kbd\u003e                   | Move up        |\n| \u003ckbd\u003ea\u003c/kbd\u003e                   | Move left      |\n| \u003ckbd\u003es\u003c/kbd\u003e                   | Move down      |\n| \u003ckbd\u003ed\u003c/kbd\u003e                   | Move right     |\n\nWhen resizing the terminal, pause and unpause the game with \u003ckbd\u003eSPACE\u003c/kbd\u003e to update the internal pixel grid accordingly.\n\n## Contributing\n\nContributions are welcome!\n\n### Challenge\n\nIf you have an implementation for the [CPU snake player](src/snake/auto.py) that can achieve a higher score or win the game, please do open an issue or pull request.\n\n## Removed features\n\nThe previous version of this game had a number of features that were removed due to implementation complexity.\nThey may be added back later.\n\n- Looping through walls\n- Configurable colors\n- Snake speed based on length\n\n## License\n\n[MIT License](license.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemonyte%2Fterminal-snake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemonyte%2Fterminal-snake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemonyte%2Fterminal-snake/lists"}