cli-arcade 2026.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cli_arcade-2026.0.0/LICENSE +9 -0
- cli_arcade-2026.0.0/MANIFEST.in +8 -0
- cli_arcade-2026.0.0/PKG-INFO +136 -0
- cli_arcade-2026.0.0/README.md +103 -0
- cli_arcade-2026.0.0/cli.py +468 -0
- cli_arcade-2026.0.0/cli_arcade.egg-info/SOURCES.txt +34 -0
- cli_arcade-2026.0.0/game_classes/__init__.py +1 -0
- cli_arcade-2026.0.0/game_classes/__pycache__/__init__.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/game_classes/__pycache__/game_base.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/game_classes/__pycache__/highscores.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/game_classes/__pycache__/menu.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/game_classes/__pycache__/tools.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/game_classes/game_base.py +121 -0
- cli_arcade-2026.0.0/game_classes/highscores.py +108 -0
- cli_arcade-2026.0.0/game_classes/menu.py +68 -0
- cli_arcade-2026.0.0/game_classes/tools.py +155 -0
- cli_arcade-2026.0.0/games/__init__.py +1 -0
- cli_arcade-2026.0.0/games/byte_bouncer/__init__.py +1 -0
- cli_arcade-2026.0.0/games/byte_bouncer/__pycache__/byte_bouncer.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/games/byte_bouncer/__pycache__/game.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/games/byte_bouncer/__pycache__/highscores.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/games/byte_bouncer/game.py +208 -0
- cli_arcade-2026.0.0/games/star_ship/__init__.py +1 -0
- cli_arcade-2026.0.0/games/star_ship/__pycache__/game.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/games/star_ship/__pycache__/highscores.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/games/star_ship/__pycache__/nibbles.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/games/star_ship/__pycache__/snek.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/games/star_ship/__pycache__/star_ship.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/games/star_ship/game.py +243 -0
- cli_arcade-2026.0.0/games/terminal_tumble/__init__.py +1 -0
- cli_arcade-2026.0.0/games/terminal_tumble/__pycache__/game.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/games/terminal_tumble/__pycache__/highscores.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/games/terminal_tumble/__pycache__/terminal_tumble.cpython-313.pyc +0 -0
- cli_arcade-2026.0.0/games/terminal_tumble/game.py +380 -0
- cli_arcade-2026.0.0/pyproject.toml +3 -0
- cli_arcade-2026.0.0/setup.cfg +56 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bro Code Technologies LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cli-arcade
|
|
3
|
+
Version: 2026.0.0
|
|
4
|
+
Summary: Collection of terminal CLI games
|
|
5
|
+
Home-page: https://github.com/Bro-Code-Technologies/cli_games/tree/main/windows
|
|
6
|
+
Author: Bro Code Technologies LLC
|
|
7
|
+
Author-email: info@brocodetechnologies.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Source, https://github.com/Bro-Code-Technologies/cli_games/tree/main/windows
|
|
10
|
+
Project-URL: Issues, https://github.com/Bro-Code-Technologies/cli_games/tree/main/windows
|
|
11
|
+
Project-URL: Documentation, https://github.com/Bro-Code-Technologies/cli_games/tree/main/windows
|
|
12
|
+
Project-URL: Package, https://pypi.org/project/cli-games/
|
|
13
|
+
Keywords: cli,terminal,games,curses
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
26
|
+
Classifier: Topic :: Games/Entertainment
|
|
27
|
+
Requires-Python: >=3.8
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: appdirs
|
|
31
|
+
Requires-Dist: windows-curses; sys_platform == "win32"
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
|
|
34
|
+
# CLI Games
|
|
35
|
+
|
|
36
|
+
Collection of small terminal games bundled with a single CLI launcher.
|
|
37
|
+
|
|
38
|
+
Requirements
|
|
39
|
+
- Python 3.8+
|
|
40
|
+
- On Windows: install `windows-curses` for curses support:
|
|
41
|
+
|
|
42
|
+
```powershell
|
|
43
|
+
pip install windows-curses
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Quick start (developer)
|
|
47
|
+
|
|
48
|
+
```powershell
|
|
49
|
+
# install editable (recommended during development)
|
|
50
|
+
pip install -e .
|
|
51
|
+
|
|
52
|
+
# list installed console aliases and available games
|
|
53
|
+
clig list
|
|
54
|
+
|
|
55
|
+
# run interactive menu
|
|
56
|
+
clig
|
|
57
|
+
|
|
58
|
+
# run a game by zero-based index or name
|
|
59
|
+
clig run 0
|
|
60
|
+
clig run "Byte Bouncer"
|
|
61
|
+
|
|
62
|
+
# reset highscores for one game or all
|
|
63
|
+
clig reset 0
|
|
64
|
+
clig reset "Byte Bouncer"
|
|
65
|
+
clig reset -y # skip confirmation
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
If the `clig` command is not found after installation, the installer likely wrote scripts to your user Scripts directory. On Windows add this to your PATH (PowerShell):
|
|
69
|
+
|
|
70
|
+
```powershell
|
|
71
|
+
$env:Path += ";$env:APPDATA\Python\Python<version>\Scripts"
|
|
72
|
+
# or permanently via System settings: add %APPDATA%\Python\Python<version>\Scripts to your user PATH
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
You can always run the CLI directly without installing:
|
|
76
|
+
|
|
77
|
+
```powershell
|
|
78
|
+
python -m cli
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Commands
|
|
82
|
+
- `clig` — interactive curses menu
|
|
83
|
+
- `clig list` — print available games and zero-based indices
|
|
84
|
+
- `clig run <index|name>` — run a game directly (index is zero-based)
|
|
85
|
+
- `clig reset [<index|name>] [-y]` — delete highscores for a game or all games
|
|
86
|
+
- Aliases available: `cli-games`, `cli-game`
|
|
87
|
+
|
|
88
|
+
Highscores storage and migration
|
|
89
|
+
- Highscores are now stored in a user-writable application data directory. Typical locations:
|
|
90
|
+
- Windows (appdirs): `%LOCALAPPDATA%\cli-games\games\<game>\highscores.json`
|
|
91
|
+
- Fallback (no appdirs): `%USERPROFILE%\.cli-games\games\<game>\highscores.json`
|
|
92
|
+
- On first run the CLI attempts to migrate any legacy `games/<game>/highscores.json` found in the project into the user data directory.
|
|
93
|
+
|
|
94
|
+
Packaging & publishing (brief)
|
|
95
|
+
|
|
96
|
+
- `setup.cfg` now declares `packages = find:` and `include_package_data = true` so `game_classes/` and `games/` are included in sdist/wheels. Remember to add a `MANIFEST.in` if you need additional files in source distributions.
|
|
97
|
+
- Update `setup.cfg` version.
|
|
98
|
+
- Build: `python -m build` (requires `build` package).
|
|
99
|
+
- Upload: `twine upload dist/*` (requires `twine`).
|
|
100
|
+
- The package exposes several console script aliases (see `setup.cfg` -> `options.entry_points.console_scripts`).
|
|
101
|
+
|
|
102
|
+
Notes & Troubleshooting
|
|
103
|
+
- On Windows, `curses` requires `windows-curses`.
|
|
104
|
+
- The CLI requires a minimum terminal size; if the menu exits with an error, try enlarging your terminal or run `python -m cli` in a larger window.
|
|
105
|
+
- Games should live in their own subdirectory (`games/<slug>/game.py`) and export a `main(stdscr)` entry point. The CLI uses the directory name (slug) as the display title.
|
|
106
|
+
|
|
107
|
+
Terminal recommendations (Windows)
|
|
108
|
+
- Recommended: use Windows Terminal or the VS Code integrated terminal for the best UTF-8 + glyph support.
|
|
109
|
+
- Install Windows Terminal via Microsoft Store or `winget`:
|
|
110
|
+
|
|
111
|
+
```powershell
|
|
112
|
+
winget install --id Microsoft.WindowsTerminal -e
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
- PowerShell (external) often uses OEM code page 437 and may not render some Unicode glyphs. If you prefer the external shell to render glyphs, either use Windows Terminal or make these changes:
|
|
116
|
+
- Change the console font to a glyph-capable font (Cascadia Code PL, Fira Code, DejaVu Sans Mono, or modern Consolas) via the console Properties → Font.
|
|
117
|
+
- Ensure UTF-8 is enabled for the session (temporary):
|
|
118
|
+
|
|
119
|
+
```powershell
|
|
120
|
+
chcp 65001
|
|
121
|
+
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
122
|
+
$env:PYTHONIOENCODING = 'utf-8'
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- To make the change persistent, add the above lines to your PowerShell profile (see `code $profile`), or prefer PowerShell Core (`pwsh`) which typically handles UTF-8 better.
|
|
126
|
+
|
|
127
|
+
- If you cannot enable UTF-8 in your external terminal, the CLI will automatically fall back to safe ASCII glyphs for problematic terminals. To force ASCII output regardless of terminal detection, set the environment variable `CLI_GAMES_FORCE_ASCII=1` before running the CLI.
|
|
128
|
+
|
|
129
|
+
- Advanced: enable system-wide UTF-8 (Region → Administrative → Change system locale → check “Beta: Use Unicode UTF-8 for worldwide language support”) and restart. This affects other apps and requires caution.
|
|
130
|
+
|
|
131
|
+
Contributing
|
|
132
|
+
- Add a new game by creating a subdirectory under `games/` with a `game.py` file that exports `main(stdscr)`.
|
|
133
|
+
- Keep changes minimal and run `clig` locally to verify.
|
|
134
|
+
|
|
135
|
+
License
|
|
136
|
+
- MIT
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# CLI Games
|
|
2
|
+
|
|
3
|
+
Collection of small terminal games bundled with a single CLI launcher.
|
|
4
|
+
|
|
5
|
+
Requirements
|
|
6
|
+
- Python 3.8+
|
|
7
|
+
- On Windows: install `windows-curses` for curses support:
|
|
8
|
+
|
|
9
|
+
```powershell
|
|
10
|
+
pip install windows-curses
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Quick start (developer)
|
|
14
|
+
|
|
15
|
+
```powershell
|
|
16
|
+
# install editable (recommended during development)
|
|
17
|
+
pip install -e .
|
|
18
|
+
|
|
19
|
+
# list installed console aliases and available games
|
|
20
|
+
clig list
|
|
21
|
+
|
|
22
|
+
# run interactive menu
|
|
23
|
+
clig
|
|
24
|
+
|
|
25
|
+
# run a game by zero-based index or name
|
|
26
|
+
clig run 0
|
|
27
|
+
clig run "Byte Bouncer"
|
|
28
|
+
|
|
29
|
+
# reset highscores for one game or all
|
|
30
|
+
clig reset 0
|
|
31
|
+
clig reset "Byte Bouncer"
|
|
32
|
+
clig reset -y # skip confirmation
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If the `clig` command is not found after installation, the installer likely wrote scripts to your user Scripts directory. On Windows add this to your PATH (PowerShell):
|
|
36
|
+
|
|
37
|
+
```powershell
|
|
38
|
+
$env:Path += ";$env:APPDATA\Python\Python<version>\Scripts"
|
|
39
|
+
# or permanently via System settings: add %APPDATA%\Python\Python<version>\Scripts to your user PATH
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
You can always run the CLI directly without installing:
|
|
43
|
+
|
|
44
|
+
```powershell
|
|
45
|
+
python -m cli
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Commands
|
|
49
|
+
- `clig` — interactive curses menu
|
|
50
|
+
- `clig list` — print available games and zero-based indices
|
|
51
|
+
- `clig run <index|name>` — run a game directly (index is zero-based)
|
|
52
|
+
- `clig reset [<index|name>] [-y]` — delete highscores for a game or all games
|
|
53
|
+
- Aliases available: `cli-games`, `cli-game`
|
|
54
|
+
|
|
55
|
+
Highscores storage and migration
|
|
56
|
+
- Highscores are now stored in a user-writable application data directory. Typical locations:
|
|
57
|
+
- Windows (appdirs): `%LOCALAPPDATA%\cli-games\games\<game>\highscores.json`
|
|
58
|
+
- Fallback (no appdirs): `%USERPROFILE%\.cli-games\games\<game>\highscores.json`
|
|
59
|
+
- On first run the CLI attempts to migrate any legacy `games/<game>/highscores.json` found in the project into the user data directory.
|
|
60
|
+
|
|
61
|
+
Packaging & publishing (brief)
|
|
62
|
+
|
|
63
|
+
- `setup.cfg` now declares `packages = find:` and `include_package_data = true` so `game_classes/` and `games/` are included in sdist/wheels. Remember to add a `MANIFEST.in` if you need additional files in source distributions.
|
|
64
|
+
- Update `setup.cfg` version.
|
|
65
|
+
- Build: `python -m build` (requires `build` package).
|
|
66
|
+
- Upload: `twine upload dist/*` (requires `twine`).
|
|
67
|
+
- The package exposes several console script aliases (see `setup.cfg` -> `options.entry_points.console_scripts`).
|
|
68
|
+
|
|
69
|
+
Notes & Troubleshooting
|
|
70
|
+
- On Windows, `curses` requires `windows-curses`.
|
|
71
|
+
- The CLI requires a minimum terminal size; if the menu exits with an error, try enlarging your terminal or run `python -m cli` in a larger window.
|
|
72
|
+
- Games should live in their own subdirectory (`games/<slug>/game.py`) and export a `main(stdscr)` entry point. The CLI uses the directory name (slug) as the display title.
|
|
73
|
+
|
|
74
|
+
Terminal recommendations (Windows)
|
|
75
|
+
- Recommended: use Windows Terminal or the VS Code integrated terminal for the best UTF-8 + glyph support.
|
|
76
|
+
- Install Windows Terminal via Microsoft Store or `winget`:
|
|
77
|
+
|
|
78
|
+
```powershell
|
|
79
|
+
winget install --id Microsoft.WindowsTerminal -e
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
- PowerShell (external) often uses OEM code page 437 and may not render some Unicode glyphs. If you prefer the external shell to render glyphs, either use Windows Terminal or make these changes:
|
|
83
|
+
- Change the console font to a glyph-capable font (Cascadia Code PL, Fira Code, DejaVu Sans Mono, or modern Consolas) via the console Properties → Font.
|
|
84
|
+
- Ensure UTF-8 is enabled for the session (temporary):
|
|
85
|
+
|
|
86
|
+
```powershell
|
|
87
|
+
chcp 65001
|
|
88
|
+
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
89
|
+
$env:PYTHONIOENCODING = 'utf-8'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
- To make the change persistent, add the above lines to your PowerShell profile (see `code $profile`), or prefer PowerShell Core (`pwsh`) which typically handles UTF-8 better.
|
|
93
|
+
|
|
94
|
+
- If you cannot enable UTF-8 in your external terminal, the CLI will automatically fall back to safe ASCII glyphs for problematic terminals. To force ASCII output regardless of terminal detection, set the environment variable `CLI_GAMES_FORCE_ASCII=1` before running the CLI.
|
|
95
|
+
|
|
96
|
+
- Advanced: enable system-wide UTF-8 (Region → Administrative → Change system locale → check “Beta: Use Unicode UTF-8 for worldwide language support”) and restart. This affects other apps and requires caution.
|
|
97
|
+
|
|
98
|
+
Contributing
|
|
99
|
+
- Add a new game by creating a subdirectory under `games/` with a `game.py` file that exports `main(stdscr)`.
|
|
100
|
+
- Keep changes minimal and run `clig` locally to verify.
|
|
101
|
+
|
|
102
|
+
License
|
|
103
|
+
- MIT
|