cli-arcade 2026.1.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.
Files changed (38) hide show
  1. cli_arcade-2026.1.1/CHANGELOG.md +16 -0
  2. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/MANIFEST.in +1 -0
  3. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/PKG-INFO +14 -5
  4. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/PYPI_README.md +9 -0
  5. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/README.md +6 -1
  6. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/cli.py +83 -5
  7. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/cli_arcade.egg-info/SOURCES.txt +1 -0
  8. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/setup.cfg +5 -5
  9. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/LICENSE +0 -0
  10. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/game_classes/__init__.py +0 -0
  11. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/__init__.cpython-313.pyc +0 -0
  12. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/game_base.cpython-313.pyc +0 -0
  13. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/highscores.cpython-313.pyc +0 -0
  14. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/menu.cpython-313.pyc +0 -0
  15. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/game_classes/__pycache__/tools.cpython-313.pyc +0 -0
  16. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/game_classes/game_base.py +0 -0
  17. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/game_classes/highscores.py +0 -0
  18. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/game_classes/menu.py +0 -0
  19. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/game_classes/tools.py +0 -0
  20. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/__init__.py +0 -0
  21. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/byte_bouncer/__init__.py +0 -0
  22. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/byte_bouncer/__pycache__/byte_bouncer.cpython-313.pyc +0 -0
  23. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/byte_bouncer/__pycache__/game.cpython-313.pyc +0 -0
  24. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/byte_bouncer/__pycache__/highscores.cpython-313.pyc +0 -0
  25. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/byte_bouncer/game.py +0 -0
  26. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/star_ship/__init__.py +0 -0
  27. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/game.cpython-313.pyc +0 -0
  28. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/highscores.cpython-313.pyc +0 -0
  29. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/nibbles.cpython-313.pyc +0 -0
  30. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/snek.cpython-313.pyc +0 -0
  31. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/star_ship/__pycache__/star_ship.cpython-313.pyc +0 -0
  32. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/star_ship/game.py +0 -0
  33. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/terminal_tumble/__init__.py +0 -0
  34. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/terminal_tumble/__pycache__/game.cpython-313.pyc +0 -0
  35. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/terminal_tumble/__pycache__/highscores.cpython-313.pyc +0 -0
  36. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/terminal_tumble/__pycache__/terminal_tumble.cpython-313.pyc +0 -0
  37. {cli_arcade-2026.1.0 → cli_arcade-2026.1.1}/games/terminal_tumble/game.py +0 -0
  38. {cli_arcade-2026.1.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
+
@@ -1,4 +1,5 @@
1
1
  include PYPI_README.md
2
+ include CHANGELOG.md
2
3
  include LICENSE
3
4
  include setup.cfg
4
5
  recursive-include game_classes *
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cli-arcade
3
- Version: 2026.1.0
3
+ Version: 2026.1.1
4
4
  Summary: Collection of terminal CLI games
5
- Home-page: https://github.com/Bro-Code-Technologies/cli_arcade/tree/main/windows
5
+ Home-page: https://github.com/Bro-Code-Technologies/cli-arcade/tree/main/windows
6
6
  Author: Bro Code Technologies LLC
7
7
  Author-email: info@brocodetechnologies.com
8
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
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
12
  Project-URL: Package, https://pypi.org/project/cli-arcade/
13
13
  Keywords: cli,terminal,arcade,games,curses
14
14
  Classifier: Development Status :: 4 - Beta
@@ -54,6 +54,11 @@ clia run "Byte Bouncer"
54
54
  clia reset 0
55
55
  clia reset "Byte Bouncer"
56
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
57
62
  ```
58
63
 
59
64
  Commands
@@ -61,7 +66,11 @@ Commands
61
66
  - `clia list` — print available games and zero-based indices
62
67
  - `clia run <index|name>` — run a game directly (index is zero-based)
63
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
64
70
  - Aliases available: `cli-arcade`
65
71
 
66
72
  License
67
73
  - MIT
74
+
75
+ Changelog
76
+ - See CHANGELOG.md
@@ -21,6 +21,11 @@ clia run "Byte Bouncer"
21
21
  clia reset 0
22
22
  clia reset "Byte Bouncer"
23
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
24
29
  ```
25
30
 
26
31
  Commands
@@ -28,7 +33,11 @@ Commands
28
33
  - `clia list` — print available games and zero-based indices
29
34
  - `clia run <index|name>` — run a game directly (index is zero-based)
30
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
31
37
  - Aliases available: `cli-arcade`
32
38
 
33
39
  License
34
40
  - MIT
41
+
42
+ Changelog
43
+ - See CHANGELOG.md
@@ -50,6 +50,7 @@ Commands
50
50
  - `clia list` — print available games and zero-based indices
51
51
  - `clia run <index|name>` — run a game directly (index is zero-based)
52
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
53
54
  - Aliases available: `cli-arcade`
54
55
 
55
56
  Highscores storage and migration
@@ -62,7 +63,8 @@ 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
- - Build: `python -m build` (requires `build` package).
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
 
@@ -101,3 +103,6 @@ Contributing
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
- r' / ____/ / / _/ / ____/ | / |/ / ____/ ___/ ',
19
- r' / / / / / / / / __/ /| | / /|_/ / __/ \__ \ ',
20
- r' / /___/ /____/ / / /_/ / ___ |/ / / / /___ ___/ / ',
21
- r' \____/_____/___/ \____/_/ |_/_/ /_/_____//____/ '
21
+ ' ________ ____ ___ ____ _________ ____ ______ ',
22
+ r' / ____/ / / _/ / | / __ \/ ____/ | / __ \/ ____/ ',
23
+ r' / / / / / / / /| | / /_/ / / / /| | / / / / __/ ',
24
+ r' / /___/ /____/ / / ___ |/ _, _/ /___/ ___ |/ /_/ / /___ ',
25
+ r' \____/_____/___/ /_/ |_/_/ |_|\____/_/ |_/_____/_____/ '
22
26
  ]
23
27
 
24
28
  def _discover_games():
@@ -300,6 +304,43 @@ def _read_version_from_setupcfg():
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
345
  # support simple CLI subcommands (e.g. `clia list`)
305
346
  # build epilog with examples and any console script aliases from setup.cfg
@@ -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:
@@ -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:
@@ -1,3 +1,4 @@
1
+ CHANGELOG.md
1
2
  LICENSE
2
3
  MANIFEST.in
3
4
  PYPI_README.md
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = cli-arcade
3
- version = 2026.1.0
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
@@ -9,11 +9,11 @@ license_files =
9
9
  LICENSE
10
10
  long_description = file: PYPI_README.md
11
11
  long_description_content_type = text/markdown
12
- url = https://github.com/Bro-Code-Technologies/cli_arcade/tree/main/windows
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/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
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
17
  Package = https://pypi.org/project/cli-arcade/
18
18
  keywords =
19
19
  cli
File without changes