import { Link } from "react-router-dom"; const botMoveRequestSchema = `GameUpdate { bot_id: number; bot_name: string; game_id: number; fen: string; turn: string; bot_turn: boolean; last_move: string; status: string; }`; const botMoveResponseSchema = `BotMoveResponse { attempted_message: string; }`; export const ManPages = () => { return (
CHESSH(1)
User Help
CHESSH(1)

NAME
  • chessh - multiplayer chess over ssh
SYNOPSIS
  • ssh chessh
DESCRIPTION
CheSSH uses the SSH protocol to send sequences of ANSI codes & plaintext to render a chess board in your shell, and listen to I/O by abusing the hell out of the{" "} Erlang SSH Module .

INTERACTION
  • Ctrl + b / Escape to return to the main menu.
  • Ctrl + c / Ctrl + d to exit CheSSH at any point.
  • Arrow keys / vim (hjkl) keybinds to move around the board and menus.
  • Select menu options with "enter".
  • Select a game piece "enter", and move it to a square by pressing "enter" again.
  • In the "Previous Games" viewer, use h/l or left/right to view the previous/next move.
  • In a game board use "f" to flip the board.
  • In the "Previous Games" viewer, use "m" to show the game's move history in UCI notation (which you may convert to PGN{" "} here ).
BOTS & WEBHOOKS
  • Goto /bots and create a bot, taking note of the new bot's token (keep this private!).
  • Highly recommend{" "} ngrok {" "} for testing.
  • A "public" bot can be seen and played against by any player.
  • A "private" bot can be seen and played against by the player which created it.
  • A bot's "webhook" is the route that CheSSH will POST a JSON message to upon an update in a game it is playing. Upon a move, it will be immediately POST'd to with a single GameUpdate object, but when using the "redrive" feature (mostly for testing), an array of game that correspond to games in which it is still the bot's turn:
    {botMoveRequestSchema}
  • After receiving the update, the bot must "respond" with its attempted move, with the plain token (no "Bearer" prefix) in its "Authorization" header, and a body of (given "attempted_move" is the from space appended to the destination space i.e. "e2e4"):
    {botMoveResponseSchema}
  • Here is an example of how this logic should play out for a simple bot.
); };