cli-arcade 2026.0.0__py3-none-any.whl → 2026.1.1__py3-none-any.whl

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.py CHANGED
@@ -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():
@@ -66,7 +70,7 @@ def _read_console_aliases():
66
70
  return []
67
71
 
68
72
  try:
69
- dist = importlib_metadata.distribution('cli-games')
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-games')
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. `clig list`)
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 Games menu or subcommands.',
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:
@@ -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
@@ -1,24 +1,24 @@
1
- cli.py,sha256=Kc8jgyneJYYjLedgvniskd2_0mXyBg1R6-TLslJgcgE,17458
2
- cli_arcade-2026.0.0.dist-info/licenses/LICENSE,sha256=1PLSNFyGPi9COkVEeNYcUTuRLqGxzMLLTah05tByD4s,1099
1
+ cli.py,sha256=rSLac21-sWZvb5X_0vMVi4RlxhIIUNgkXLCBQ2Y6mYA,20278
2
+ cli_arcade-2026.1.1.dist-info/licenses/LICENSE,sha256=1PLSNFyGPi9COkVEeNYcUTuRLqGxzMLLTah05tByD4s,1099
3
3
  game_classes/__init__.py,sha256=A0o4vBUktOiONToIJb0hACalszBnFS9ls9WXPn3-KH0,28
4
4
  game_classes/game_base.py,sha256=q779LzYsK8rO0rWrj2iB5407wuLiZvuFiRBx6qQEfPQ,3505
5
- game_classes/highscores.py,sha256=uzK2NJU-hnmMcDT7TEWhkikKn4rnqiJMln8szOqqPX4,4060
5
+ game_classes/highscores.py,sha256=dDK-7lFXSMwIqExXGp6_-7QfQz6CIf12lJ22poeCdh4,4061
6
6
  game_classes/menu.py,sha256=6frg15Ibx_H89g-KmHv53d6uWSUsxluhXMGvn4Nj7xY,2795
7
- game_classes/tools.py,sha256=TKkJ0bv2sbs_smjrXLCJZd9IIcZe_f96ms0uSBYA6gc,4972
7
+ game_classes/tools.py,sha256=CBtS_4n8TgIwfRlGftR5oGg4Nc7u3uetQ0rO-9AffAs,4974
8
8
  game_classes/__pycache__/__init__.cpython-313.pyc,sha256=zSl9ESMUQn5Vo_XXAA8DD7lpFHOtOwBruGvCOJ5qeuo,192
9
9
  game_classes/__pycache__/game_base.cpython-313.pyc,sha256=p6NUAgjNMXwPoNkQq01tUZm_ZYX18jaIMRZOm35vKsk,6962
10
- game_classes/__pycache__/highscores.cpython-313.pyc,sha256=diYyL8QT5LpS_68hz5s_kfHbgaqihyOygTABlkzg2MI,7067
10
+ game_classes/__pycache__/highscores.cpython-313.pyc,sha256=0rYMYs6NOzT-f00Me20F-46kUR_x8ZXk2jngO5amLy4,7080
11
11
  game_classes/__pycache__/menu.cpython-313.pyc,sha256=wseCBPJ5XKtVI8scyJrBZxAW2avD2JF3J0IpRUYzsR8,4459
12
- game_classes/__pycache__/tools.cpython-313.pyc,sha256=OrKBCCTPdimXHQZ7hXRCkB_0IcCQiG9POLdnnKgKjl8,7331
12
+ game_classes/__pycache__/tools.cpython-313.pyc,sha256=l3e625GBKAo_lEbuDWKYzgzRyS4d6lQMcA_O0lc7JnI,7345
13
13
  games/__init__.py,sha256=Rg46lnLj_sezpnXaQTS1NXX5OaRhR_EWpNTyYUxycj4,21
14
14
  games/byte_bouncer/__init__.py,sha256=8hxIHRyUPB-X6vJXh1432ytKjOcfIzCbdpO5mmWA7iQ,33
15
15
  games/byte_bouncer/game.py,sha256=9SFBre-QvjTa5maKP-XjI-Fh-1dNgxeYxxtglrccnA4,8105
16
16
  games/byte_bouncer/__pycache__/byte_bouncer.cpython-313.pyc,sha256=JSTB6-_KCukAAVaZz9TpJ3V4gif_M3n_L5X1KOviSJ8,24605
17
- games/byte_bouncer/__pycache__/game.cpython-313.pyc,sha256=Z5xiPsrisDqe8Mx6FQjW3eHNiXMXuIY5mJlrVmNUfec,13017
17
+ games/byte_bouncer/__pycache__/game.cpython-313.pyc,sha256=9HjBQLhORVJtEw-W5Hg5N7OKuU-hn7LimU7-QRvMHQk,13029
18
18
  games/byte_bouncer/__pycache__/highscores.cpython-313.pyc,sha256=g3FozKpWGDVsTVETNpb6lRHcKA3ZIsQio8Kh7KCGVCI,3125
19
19
  games/star_ship/__init__.py,sha256=X8AdhoccmNVu6yl7MalsxIsMxuEsddRdlvEQmhZMD0A,30
20
20
  games/star_ship/game.py,sha256=Mph_USmrroynsli43vD3luadYAOiPXmbs0JMOCDGxMk,9545
21
- games/star_ship/__pycache__/game.cpython-313.pyc,sha256=TnsJQS7zrwB0zG7CZ7VlTPE_qq063cZdZcL0Z66fu08,14623
21
+ games/star_ship/__pycache__/game.cpython-313.pyc,sha256=cd5IpXpj9WMeW12hLnvYq4pD-SZFkR9m270OsgkvmMQ,14624
22
22
  games/star_ship/__pycache__/highscores.cpython-313.pyc,sha256=nHbEOTWeX0U9D47K2EP5S5uDPI0WW52Eg7h_NesG1OU,3148
23
23
  games/star_ship/__pycache__/nibbles.cpython-313.pyc,sha256=Yv2P-GwEc30zA24aO7k0hkk1AOja6K85AFvmjLIffqQ,20510
24
24
  games/star_ship/__pycache__/snek.cpython-313.pyc,sha256=3Mwyy6vjGFRmNyAWSqV5JRilLOxiCSndBmwua_Y7VTs,13313
@@ -28,8 +28,8 @@ games/terminal_tumble/game.py,sha256=p4lrFHBoHZJLpsUr0jXmR9FI8OTZmwfGIS1Z29MoYzU
28
28
  games/terminal_tumble/__pycache__/game.cpython-313.pyc,sha256=-xFF1wgupqiSoHz3QZwMNHxhAIV_UyIp0YifRdg8ijA,24104
29
29
  games/terminal_tumble/__pycache__/highscores.cpython-313.pyc,sha256=UPnU9Zq88q2TZq1qXyo8e2Y_PdOgwvu5mncIkunFah8,3154
30
30
  games/terminal_tumble/__pycache__/terminal_tumble.cpython-313.pyc,sha256=7oLpmmkYjpLYRC0bjRoEkHbIUNq7FZVJToGoja94m0o,38016
31
- cli_arcade-2026.0.0.dist-info/METADATA,sha256=YdvaQUC9u0xS_teAd3dVSJTn0-hrxVNFE3gzh_erD2Y,5952
32
- cli_arcade-2026.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
33
- cli_arcade-2026.0.0.dist-info/entry_points.txt,sha256=dEd6b2AwMr2o-sSOzi2aAfIy0ViqcnAkuHShiOMVr4o,75
34
- cli_arcade-2026.0.0.dist-info/top_level.txt,sha256=gTfYlz7gHYgPY0ugfJivukCOkNzmOisNR6VuJjAXPF4,23
35
- cli_arcade-2026.0.0.dist-info/RECORD,,
31
+ cli_arcade-2026.1.1.dist-info/METADATA,sha256=H6MJ0uQel9jW5GuXvcSucCQk_P_FhjaRGts_xmSN80I,2525
32
+ cli_arcade-2026.1.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
33
+ cli_arcade-2026.1.1.dist-info/entry_points.txt,sha256=nNElhZv4nM_lrOYpvnOChtJn1XsWwQr8sI344flzzTQ,56
34
+ cli_arcade-2026.1.1.dist-info/top_level.txt,sha256=gTfYlz7gHYgPY0ugfJivukCOkNzmOisNR6VuJjAXPF4,23
35
+ cli_arcade-2026.1.1.dist-info/RECORD,,
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ cli-arcade = cli:main
3
+ clia = cli:main
@@ -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-games', appauthor=None):
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
game_classes/tools.py CHANGED
@@ -80,13 +80,13 @@ def _supports_unicode():
80
80
  """Decide whether to use Unicode glyphs.
81
81
 
82
82
  Rules:
83
- - Honor `CLI_GAMES_FORCE_ASCII` (1/true/yes) -> False
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('CLI_GAMES_FORCE_ASCII', '').lower() in ('1', 'true', 'yes'):
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.
@@ -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
@@ -1,4 +0,0 @@
1
- [console_scripts]
2
- cli-game = cli:main
3
- cli-games = cli:main
4
- clig = cli:main