cli-arcade 2026.0.0__tar.gz → 2026.1.1__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.1.1/CHANGELOG.md +16 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/MANIFEST.in +2 -1
- cli_arcade-2026.1.1/PKG-INFO +76 -0
- cli_arcade-2026.1.1/PYPI_README.md +43 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/README.md +24 -19
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/cli.py +87 -9
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/cli_arcade.egg-info/SOURCES.txt +2 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/highscores.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/tools.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/highscores.py +1 -1
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/tools.py +2 -2
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/byte_bouncer/__pycache__/game.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/game.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/setup.cfg +10 -10
- cli_arcade-2026.0.0/PKG-INFO +0 -136
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/LICENSE +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/__init__.py +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/__init__.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/game_base.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/menu.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/game_base.py +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/menu.py +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/__init__.py +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/byte_bouncer/__init__.py +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/byte_bouncer/__pycache__/byte_bouncer.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/byte_bouncer/__pycache__/highscores.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/byte_bouncer/game.py +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/star_ship/__init__.py +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/highscores.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/nibbles.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/snek.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/star_ship.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/star_ship/game.py +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/terminal_tumble/__init__.py +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/terminal_tumble/__pycache__/game.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/terminal_tumble/__pycache__/highscores.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/terminal_tumble/__pycache__/terminal_tumble.cpython-313.pyc +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/terminal_tumble/game.py +0 -0
- {cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/pyproject.toml +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## 2026.0.0
|
|
6
|
+
- Initial release as CLI Game.
|
|
7
|
+
|
|
8
|
+
## 2026.1.0
|
|
9
|
+
- Project renamed to CLI Arcade.
|
|
10
|
+
- Packaging metadata updated for PyPI.
|
|
11
|
+
- Documentation refresh.
|
|
12
|
+
|
|
13
|
+
### 2026.1.1
|
|
14
|
+
- Updated TITLE ASCII art.
|
|
15
|
+
- Added `clia update` command to check for and install updates from PyPI.
|
|
16
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cli-arcade
|
|
3
|
+
Version: 2026.1.1
|
|
4
|
+
Summary: Collection of terminal CLI games
|
|
5
|
+
Home-page: https://github.com/Bro-Code-Technologies/cli-arcade/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-arcade/tree/main/windows
|
|
10
|
+
Project-URL: Issues, https://github.com/Bro-Code-Technologies/cli-arcade/tree/main/windows
|
|
11
|
+
Project-URL: Documentation, https://github.com/Bro-Code-Technologies/cli-arcade/tree/main/windows
|
|
12
|
+
Project-URL: Package, https://pypi.org/project/cli-arcade/
|
|
13
|
+
Keywords: cli,terminal,arcade,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 Arcade
|
|
35
|
+
|
|
36
|
+
Collection of small terminal games bundled with a single CLI launcher.
|
|
37
|
+
|
|
38
|
+
Requirements
|
|
39
|
+
- Python 3.8+
|
|
40
|
+
|
|
41
|
+
Quick start
|
|
42
|
+
```powershell
|
|
43
|
+
# list installed console aliases and available games
|
|
44
|
+
clia list
|
|
45
|
+
|
|
46
|
+
# run interactive menu
|
|
47
|
+
clia
|
|
48
|
+
|
|
49
|
+
# run a game by zero-based index or name
|
|
50
|
+
clia run 0
|
|
51
|
+
clia run "Byte Bouncer"
|
|
52
|
+
|
|
53
|
+
# reset highscores for one game or all
|
|
54
|
+
clia reset 0
|
|
55
|
+
clia reset "Byte Bouncer"
|
|
56
|
+
clia reset -y # skip confirmation
|
|
57
|
+
|
|
58
|
+
# check for updates and optionally update
|
|
59
|
+
clia update
|
|
60
|
+
clia update --check # only check for updates
|
|
61
|
+
clia update -y # skip confirmation
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Commands
|
|
65
|
+
- `clia` — interactive curses menu
|
|
66
|
+
- `clia list` — print available games and zero-based indices
|
|
67
|
+
- `clia run <index|name>` — run a game directly (index is zero-based)
|
|
68
|
+
- `clia reset [<index|name>] [-y]` — delete highscores for a game or all games
|
|
69
|
+
- `clia update [--check] [-y]` — check for updates and optionally update
|
|
70
|
+
- Aliases available: `cli-arcade`
|
|
71
|
+
|
|
72
|
+
License
|
|
73
|
+
- MIT
|
|
74
|
+
|
|
75
|
+
Changelog
|
|
76
|
+
- See CHANGELOG.md
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# CLI Arcade
|
|
2
|
+
|
|
3
|
+
Collection of small terminal games bundled with a single CLI launcher.
|
|
4
|
+
|
|
5
|
+
Requirements
|
|
6
|
+
- Python 3.8+
|
|
7
|
+
|
|
8
|
+
Quick start
|
|
9
|
+
```powershell
|
|
10
|
+
# list installed console aliases and available games
|
|
11
|
+
clia list
|
|
12
|
+
|
|
13
|
+
# run interactive menu
|
|
14
|
+
clia
|
|
15
|
+
|
|
16
|
+
# run a game by zero-based index or name
|
|
17
|
+
clia run 0
|
|
18
|
+
clia run "Byte Bouncer"
|
|
19
|
+
|
|
20
|
+
# reset highscores for one game or all
|
|
21
|
+
clia reset 0
|
|
22
|
+
clia reset "Byte Bouncer"
|
|
23
|
+
clia reset -y # skip confirmation
|
|
24
|
+
|
|
25
|
+
# check for updates and optionally update
|
|
26
|
+
clia update
|
|
27
|
+
clia update --check # only check for updates
|
|
28
|
+
clia update -y # skip confirmation
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Commands
|
|
32
|
+
- `clia` — interactive curses menu
|
|
33
|
+
- `clia list` — print available games and zero-based indices
|
|
34
|
+
- `clia run <index|name>` — run a game directly (index is zero-based)
|
|
35
|
+
- `clia reset [<index|name>] [-y]` — delete highscores for a game or all games
|
|
36
|
+
- `clia update [--check] [-y]` — check for updates and optionally update
|
|
37
|
+
- Aliases available: `cli-arcade`
|
|
38
|
+
|
|
39
|
+
License
|
|
40
|
+
- MIT
|
|
41
|
+
|
|
42
|
+
Changelog
|
|
43
|
+
- See CHANGELOG.md
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# CLI
|
|
1
|
+
# CLI Arcade
|
|
2
2
|
|
|
3
3
|
Collection of small terminal games bundled with a single CLI launcher.
|
|
4
4
|
|
|
@@ -17,22 +17,22 @@ Quick start (developer)
|
|
|
17
17
|
pip install -e .
|
|
18
18
|
|
|
19
19
|
# list installed console aliases and available games
|
|
20
|
-
|
|
20
|
+
clia list
|
|
21
21
|
|
|
22
22
|
# run interactive menu
|
|
23
|
-
|
|
23
|
+
clia
|
|
24
24
|
|
|
25
25
|
# run a game by zero-based index or name
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
clia run 0
|
|
27
|
+
clia run "Byte Bouncer"
|
|
28
28
|
|
|
29
29
|
# reset highscores for one game or all
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
clia reset 0
|
|
31
|
+
clia reset "Byte Bouncer"
|
|
32
|
+
clia reset -y # skip confirmation
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
If the `
|
|
35
|
+
If the `clia` 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
36
|
|
|
37
37
|
```powershell
|
|
38
38
|
$env:Path += ";$env:APPDATA\Python\Python<version>\Scripts"
|
|
@@ -46,23 +46,25 @@ python -m cli
|
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
Commands
|
|
49
|
-
- `
|
|
50
|
-
- `
|
|
51
|
-
- `
|
|
52
|
-
- `
|
|
53
|
-
-
|
|
49
|
+
- `clia` — interactive curses menu
|
|
50
|
+
- `clia list` — print available games and zero-based indices
|
|
51
|
+
- `clia run <index|name>` — run a game directly (index is zero-based)
|
|
52
|
+
- `clia reset [<index|name>] [-y]` — delete highscores for a game or all games
|
|
53
|
+
- `clia update [--check] [-y]` — check for updates and optionally update
|
|
54
|
+
- Aliases available: `cli-arcade`
|
|
54
55
|
|
|
55
56
|
Highscores storage and migration
|
|
56
57
|
- Highscores are now stored in a user-writable application data directory. Typical locations:
|
|
57
|
-
- Windows (appdirs): `%LOCALAPPDATA%\cli-
|
|
58
|
-
- Fallback (no appdirs): `%USERPROFILE%\.cli-
|
|
58
|
+
- Windows (appdirs): `%LOCALAPPDATA%\cli-arcade\games\<game>\highscores.json`
|
|
59
|
+
- Fallback (no appdirs): `%USERPROFILE%\.cli-arcade\games\<game>\highscores.json`
|
|
59
60
|
- 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
|
|
|
61
62
|
Packaging & publishing (brief)
|
|
62
63
|
|
|
63
64
|
- `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
65
|
- Update `setup.cfg` version.
|
|
65
|
-
-
|
|
66
|
+
- Update `CHANGELOG.md` for new version.
|
|
67
|
+
- Build: `py -m build` (requires `build` package).
|
|
66
68
|
- Upload: `twine upload dist/*` (requires `twine`).
|
|
67
69
|
- The package exposes several console script aliases (see `setup.cfg` -> `options.entry_points.console_scripts`).
|
|
68
70
|
|
|
@@ -91,13 +93,16 @@ $env:PYTHONIOENCODING = 'utf-8'
|
|
|
91
93
|
|
|
92
94
|
- 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
95
|
|
|
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 `
|
|
96
|
+
- 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_ARCADE_FORCE_ASCII=1` before running the CLI.
|
|
95
97
|
|
|
96
98
|
- 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
99
|
|
|
98
100
|
Contributing
|
|
99
101
|
- 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 `
|
|
102
|
+
- Keep changes minimal and run `clia` locally to verify.
|
|
101
103
|
|
|
102
104
|
License
|
|
103
105
|
- MIT
|
|
106
|
+
|
|
107
|
+
Changelog
|
|
108
|
+
- See CHANGELOG.md
|
|
@@ -4,6 +4,10 @@ import importlib.util
|
|
|
4
4
|
import argparse
|
|
5
5
|
import glob
|
|
6
6
|
import sys
|
|
7
|
+
import json
|
|
8
|
+
import re
|
|
9
|
+
import subprocess
|
|
10
|
+
import urllib.request
|
|
7
11
|
|
|
8
12
|
# helper: recognize Enter from multiple terminals/keypads
|
|
9
13
|
def is_enter_key(ch):
|
|
@@ -14,11 +18,11 @@ def is_enter_key(ch):
|
|
|
14
18
|
return ch in enter_vals
|
|
15
19
|
|
|
16
20
|
TITLE = [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
' ________ ____ ___ ____ _________ ____ ______ ',
|
|
22
|
+
r' / ____/ / / _/ / | / __ \/ ____/ | / __ \/ ____/ ',
|
|
23
|
+
r' / / / / / / / /| | / /_/ / / / /| | / / / / __/ ',
|
|
24
|
+
r' / /___/ /____/ / / ___ |/ _, _/ /___/ ___ |/ /_/ / /___ ',
|
|
25
|
+
r' \____/_____/___/ /_/ |_/_/ |_|\____/_/ |_/_____/_____/ '
|
|
22
26
|
]
|
|
23
27
|
|
|
24
28
|
def _discover_games():
|
|
@@ -66,7 +70,7 @@ def _read_console_aliases():
|
|
|
66
70
|
return []
|
|
67
71
|
|
|
68
72
|
try:
|
|
69
|
-
dist = importlib_metadata.distribution('cli-
|
|
73
|
+
dist = importlib_metadata.distribution('cli-arcade')
|
|
70
74
|
aliases = [ep.name for ep in dist.entry_points if ep.group == 'console_scripts']
|
|
71
75
|
return sorted(set(aliases))
|
|
72
76
|
except Exception:
|
|
@@ -296,12 +300,49 @@ def _read_version_from_setupcfg():
|
|
|
296
300
|
return '0.0.0'
|
|
297
301
|
|
|
298
302
|
try:
|
|
299
|
-
return importlib_metadata.version('cli-
|
|
303
|
+
return importlib_metadata.version('cli-arcade')
|
|
300
304
|
except Exception:
|
|
301
305
|
return '0.0.0'
|
|
302
306
|
|
|
307
|
+
|
|
308
|
+
def _version_key(ver):
|
|
309
|
+
parts = []
|
|
310
|
+
for chunk in re.split(r'(\d+)', ver):
|
|
311
|
+
if not chunk:
|
|
312
|
+
continue
|
|
313
|
+
if chunk.isdigit():
|
|
314
|
+
parts.append((0, int(chunk)))
|
|
315
|
+
else:
|
|
316
|
+
parts.append((1, chunk.lower()))
|
|
317
|
+
return parts
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
def _fetch_latest_version(package):
|
|
321
|
+
url = f"https://pypi.org/pypi/{package}/json"
|
|
322
|
+
try:
|
|
323
|
+
with urllib.request.urlopen(url, timeout=5) as resp:
|
|
324
|
+
data = json.load(resp)
|
|
325
|
+
return data.get('info', {}).get('version')
|
|
326
|
+
except Exception as e:
|
|
327
|
+
print(f" [ERROR] Failed to check latest version: {e}")
|
|
328
|
+
return None
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
def _is_update_available(current, latest):
|
|
332
|
+
if not latest:
|
|
333
|
+
return False
|
|
334
|
+
try:
|
|
335
|
+
return _version_key(latest) > _version_key(current)
|
|
336
|
+
except Exception:
|
|
337
|
+
return latest != current
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
def _run_pip_update(package):
|
|
341
|
+
cmd = [sys.executable, '-m', 'pip', 'install', '--upgrade', package]
|
|
342
|
+
return subprocess.call(cmd)
|
|
343
|
+
|
|
303
344
|
def main():
|
|
304
|
-
# support simple CLI subcommands (e.g. `
|
|
345
|
+
# support simple CLI subcommands (e.g. `clia list`)
|
|
305
346
|
# build epilog with examples and any console script aliases from setup.cfg
|
|
306
347
|
epilog_lines = [
|
|
307
348
|
'Examples:',
|
|
@@ -309,6 +350,7 @@ def main():
|
|
|
309
350
|
f' %(prog)s list [-h]',
|
|
310
351
|
f' %(prog)s run [-h] [0, "Byte Bouncer"]',
|
|
311
352
|
f' %(prog)s reset [-h] [0, "Byte Bouncer"] [-y]',
|
|
353
|
+
f' %(prog)s update [--check] [-y]',
|
|
312
354
|
]
|
|
313
355
|
aliases = _read_console_aliases()
|
|
314
356
|
if aliases:
|
|
@@ -317,7 +359,7 @@ def main():
|
|
|
317
359
|
|
|
318
360
|
parser = argparse.ArgumentParser(
|
|
319
361
|
prog=os.path.basename(sys.argv[0]) or 'games',
|
|
320
|
-
description='Run the CLI
|
|
362
|
+
description='Run the CLI Arcade menu or subcommands.',
|
|
321
363
|
epilog=epilog,
|
|
322
364
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
323
365
|
)
|
|
@@ -348,6 +390,15 @@ def main():
|
|
|
348
390
|
)
|
|
349
391
|
resetp.add_argument('game', nargs='?', help='Optional game name or zero-based index (omit to reset all)')
|
|
350
392
|
resetp.add_argument('-y', '--yes', action='store_true', help='Do not prompt; proceed with deletion')
|
|
393
|
+
updatep = sub.add_parser(
|
|
394
|
+
'update',
|
|
395
|
+
help='Update cli-arcade package from PyPI',
|
|
396
|
+
description='Check PyPI for a newer version and update if available.',
|
|
397
|
+
epilog='Examples:\n %(prog)s\n %(prog)s --check\n %(prog)s -y\n',
|
|
398
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
399
|
+
)
|
|
400
|
+
updatep.add_argument('-c', '--check', action='store_true', help='Only check for updates (do not install)')
|
|
401
|
+
updatep.add_argument('-y', '--yes', action='store_true', help='Do not prompt; proceed with update')
|
|
351
402
|
args, _rest = parser.parse_known_args()
|
|
352
403
|
|
|
353
404
|
if args.cmd == 'list':
|
|
@@ -421,6 +472,33 @@ def main():
|
|
|
421
472
|
_reset_game_by_index(choice, yes=yes)
|
|
422
473
|
return
|
|
423
474
|
|
|
475
|
+
if args.cmd == 'update':
|
|
476
|
+
package = 'cli-arcade'
|
|
477
|
+
current = _read_version_from_setupcfg()
|
|
478
|
+
if current == '0.0.0':
|
|
479
|
+
print(' [INFO] Installed version not detected (running from source?).')
|
|
480
|
+
latest = _fetch_latest_version(package)
|
|
481
|
+
if not latest:
|
|
482
|
+
print(' [INFO] Unable to determine latest version.')
|
|
483
|
+
return
|
|
484
|
+
if _is_update_available(current, latest):
|
|
485
|
+
print(f" [INFO] Update available: {current} -> {latest}")
|
|
486
|
+
if args.check:
|
|
487
|
+
return
|
|
488
|
+
if not getattr(args, 'yes', False):
|
|
489
|
+
ans = input(' [ACTION] Update now? [y/N]: ')
|
|
490
|
+
if not ans.lower().startswith('y'):
|
|
491
|
+
print(' [CANCELED]')
|
|
492
|
+
return
|
|
493
|
+
code = _run_pip_update(package)
|
|
494
|
+
if code == 0:
|
|
495
|
+
print(f" [OK] Updated {package}.")
|
|
496
|
+
else:
|
|
497
|
+
print(f" [ERROR] Update failed with exit code {code}.")
|
|
498
|
+
return
|
|
499
|
+
print(f" [OK] You are up to date ({current}).")
|
|
500
|
+
return
|
|
501
|
+
|
|
424
502
|
# run the menu under curses, then launch the chosen game's main()
|
|
425
503
|
choice = curses.wrapper(_menu)
|
|
426
504
|
if choice is None:
|
{cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/highscores.cpython-313.pyc
RENAMED
|
Binary file
|
|
Binary file
|
|
@@ -17,7 +17,7 @@ class HighScores:
|
|
|
17
17
|
they will be migrated to the user data directory on first use.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
def __init__(self, game, default=None, appname='cli-
|
|
20
|
+
def __init__(self, game, default=None, appname='cli-arcade', appauthor=None):
|
|
21
21
|
if default is None:
|
|
22
22
|
default = {'score': {'player': 'Player', 'value': 0}}
|
|
23
23
|
# copy default to avoid shared mutable state
|
|
@@ -80,13 +80,13 @@ def _supports_unicode():
|
|
|
80
80
|
"""Decide whether to use Unicode glyphs.
|
|
81
81
|
|
|
82
82
|
Rules:
|
|
83
|
-
- Honor `
|
|
83
|
+
- Honor `CLI_ARCADE_FORCE_ASCII` (1/true/yes) -> False
|
|
84
84
|
- On classic Windows PowerShell/conhost (no modern terminal env vars) prefer ASCII
|
|
85
85
|
- If encodings are explicitly ASCII -> False
|
|
86
86
|
- Otherwise prefer Unicode (True)
|
|
87
87
|
"""
|
|
88
88
|
try:
|
|
89
|
-
if os.environ.get('
|
|
89
|
+
if os.environ.get('CLI_ARCADE_FORCE_ASCII', '').lower() in ('1', 'true', 'yes'):
|
|
90
90
|
return False
|
|
91
91
|
|
|
92
92
|
# On Windows, many older/conhost-based shells lack glyph fonts.
|
{cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/byte_bouncer/__pycache__/game.cpython-313.pyc
RENAMED
|
Binary file
|
{cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/game.cpython-313.pyc
RENAMED
|
Binary file
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
[metadata]
|
|
2
2
|
name = cli-arcade
|
|
3
|
-
version = 2026.
|
|
3
|
+
version = 2026.1.1
|
|
4
4
|
description = Collection of terminal CLI games
|
|
5
5
|
author = Bro Code Technologies LLC
|
|
6
6
|
author_email = info@brocodetechnologies.com
|
|
7
7
|
license = MIT
|
|
8
8
|
license_files =
|
|
9
9
|
LICENSE
|
|
10
|
-
long_description = file:
|
|
10
|
+
long_description = file: PYPI_README.md
|
|
11
11
|
long_description_content_type = text/markdown
|
|
12
|
-
url = https://github.com/Bro-Code-Technologies/
|
|
12
|
+
url = https://github.com/Bro-Code-Technologies/cli-arcade/tree/main/windows
|
|
13
13
|
project_urls =
|
|
14
|
-
Source = https://github.com/Bro-Code-Technologies/
|
|
15
|
-
Issues = https://github.com/Bro-Code-Technologies/
|
|
16
|
-
Documentation = https://github.com/Bro-Code-Technologies/
|
|
17
|
-
Package = https://pypi.org/project/cli-
|
|
14
|
+
Source = https://github.com/Bro-Code-Technologies/cli-arcade/tree/main/windows
|
|
15
|
+
Issues = https://github.com/Bro-Code-Technologies/cli-arcade/tree/main/windows
|
|
16
|
+
Documentation = https://github.com/Bro-Code-Technologies/cli-arcade/tree/main/windows
|
|
17
|
+
Package = https://pypi.org/project/cli-arcade/
|
|
18
18
|
keywords =
|
|
19
19
|
cli
|
|
20
20
|
terminal
|
|
21
|
+
arcade
|
|
21
22
|
games
|
|
22
23
|
curses
|
|
23
24
|
classifiers =
|
|
@@ -46,9 +47,8 @@ install_requires =
|
|
|
46
47
|
|
|
47
48
|
[options.entry_points]
|
|
48
49
|
console_scripts =
|
|
49
|
-
|
|
50
|
-
cli-
|
|
51
|
-
cli-game = cli:main
|
|
50
|
+
clia = cli:main
|
|
51
|
+
cli-arcade = cli:main
|
|
52
52
|
|
|
53
53
|
[egg_info]
|
|
54
54
|
tag_build =
|
cli_arcade-2026.0.0/PKG-INFO
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
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
|
|
File without changes
|
|
File without changes
|
{cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/__init__.cpython-313.pyc
RENAMED
|
File without changes
|
{cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/game_base.cpython-313.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/highscores.cpython-313.pyc
RENAMED
|
File without changes
|
{cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/nibbles.cpython-313.pyc
RENAMED
|
File without changes
|
{cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/snek.cpython-313.pyc
RENAMED
|
File without changes
|
{cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/star_ship.cpython-313.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cli_arcade-2026.0.0 → cli_arcade-2026.1.1}/games/terminal_tumble/__pycache__/game.cpython-313.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|