@hypersocial/cli-games 0.1.0 → 0.1.1

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.
package/dist/cli.js CHANGED
@@ -13665,8 +13665,49 @@ function openMenu(terminal) {
13665
13665
  function launchGame(terminal, game) {
13666
13666
  game.run(terminal);
13667
13667
  }
13668
+ function printHelp() {
13669
+ console.log(`
13670
+ @hypersocial/cli-games \u2014 18 terminal games
13671
+
13672
+ Usage:
13673
+ cli-games Interactive game menu
13674
+ cli-games <game> Launch a game directly
13675
+ cli-games --theme <theme> Set color theme
13676
+ cli-games --list List all games
13677
+ cli-games --help Show this help
13678
+
13679
+ Games:
13680
+ ${games.map((g) => `${g.id.padEnd(16)} ${g.description}`).join("\n ")}
13681
+
13682
+ Themes:
13683
+ cyan (default), amber, green, white, hotpink, blood, ice,
13684
+ bladerunner, tron, kawaii, oled, solarized, nord, highcontrast,
13685
+ banana, cream \u2014 plus Light variants (e.g. cyanLight)
13686
+
13687
+ Controls:
13688
+ Arrow keys / WASD Move / navigate
13689
+ Enter Confirm / select
13690
+ ESC Pause menu
13691
+ Q Quit
13692
+
13693
+ Examples:
13694
+ cli-games snake
13695
+ cli-games tetris --theme green
13696
+ cli-games --theme amber
13697
+ `);
13698
+ }
13668
13699
  function main() {
13669
13700
  const args = process.argv.slice(2);
13701
+ if (args.includes("--help") || args.includes("-h")) {
13702
+ printHelp();
13703
+ process.exit(0);
13704
+ }
13705
+ if (args.includes("--list") || args.includes("-l")) {
13706
+ for (const game of games) {
13707
+ console.log(` ${game.id.padEnd(16)} ${game.description}`);
13708
+ }
13709
+ process.exit(0);
13710
+ }
13670
13711
  let theme = "cyan";
13671
13712
  const themeIdx = args.indexOf("--theme");
13672
13713
  if (themeIdx !== -1 && args[themeIdx + 1]) {