{"id":19030094,"url":"https://github.com/statico/glulxe-httpd","last_synced_at":"2025-04-23T16:01:15.412Z","repository":{"id":42518822,"uuid":"314734414","full_name":"statico/glulxe-httpd","owner":"statico","description":"👾 HTTP+JSON Glulx (.ulx) interactive fiction server with session support","archived":false,"fork":false,"pushed_at":"2023-04-25T21:05:36.000Z","size":214,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-18T01:47:31.769Z","etag":null,"topics":["docker","glulx","glulxe","http","http-server","if","inform","inform7","interactive-fiction","json","nodejs","rest","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/statico.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-21T04:43:40.000Z","updated_at":"2023-08-13T06:36:47.000Z","dependencies_parsed_at":"2025-04-20T06:46:29.124Z","dependency_job_id":null,"html_url":"https://github.com/statico/glulxe-httpd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statico%2Fglulxe-httpd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statico%2Fglulxe-httpd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statico%2Fglulxe-httpd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statico%2Fglulxe-httpd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/statico","download_url":"https://codeload.github.com/statico/glulxe-httpd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250468272,"owners_count":21435451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","glulx","glulxe","http","http-server","if","inform","inform7","interactive-fiction","json","nodejs","rest","typescript"],"created_at":"2024-11-08T21:16:30.580Z","updated_at":"2025-04-23T16:01:14.901Z","avatar_url":"https://github.com/statico.png","language":"JavaScript","readme":"# glulxe-httpd\n\n[![license](https://img.shields.io/github/license/statico/glulxe-httpd.svg?style=flat-square)](https://github.com/statico/glulxe-httpd/blob/master/LICENSE)\n[![build status](https://img.shields.io/github/actions/workflow/status/statico/glulxe-httpd/build.yml?branch=main\u0026style=flat-square)](https://ghcr.io/statico/glulxe-httpd)\n\nglulxe-httpd provides an HTTP REST interface for interacting with interactive fiction (IF) stories in the [Glulx (`.ulx`) format](http://ifwiki.org/index.php/Glulx) using [glulxe](https://github.com/erkyrath/glulxe). Clients (like [my website](https://github.com/statico/langterm)) can connect to the service to start a game and then send commands to it.\n\nSessions are deleted after a while in a feeble attempt to save memory. This service is definitely DoS-able.\n\nWith the `--csv` option, transcripts of commands are saved to a CSV file. (I read what players type on my game to occasionally improve it.)\n\n## Get Started\n\nIf you haven't spent many laborous hours writing an interactive fiction game with [Inform](http://inform7.com/), you can download one from the [Interactive Fiction Database](https://ifdb.tads.org/search?searchfor=format:Glulx%2fBlorb) or grab the classic _Adventure_ game as a `.ulx` file from [the Glulx page](https://www.eblong.com/zarf/glulx/index.html).\n\n### With Docker\n\n    $ docker run -p 8080:8080 -v mygame.ulx:/story.ulx ghcr.io/statico/glulxe-httpd\n\n### With Node.js\n\n1. Get Node.js v12 or so\n1. Install Yarn\n1. `yarn install`\n1. `yarn start mygame.ulx`\n\n## Sending Commands\n\nFirst get a session ID:\n\n    $ curl -X POST http://localhost:8080/new\n    {\n       \"session\": \"xxxxxxx\",\n       \"output\": \"Welcome to Adventure!\\n\\nADVENTURE...\"\n    }\n\nThen send commands:\n\n    $ curl -X POST http://localhost:8080/send \\\n    -H 'Content-type: application/json' \\\n    -d '{ \"message\": \"look\", \"session\": \"xxxxxxx\" }'\n    {\n       \"output\": \"At End Of Road\\nYou are standing at the end...\"\n    }\n\nPro tip: Run the server with `--debug` to always make the session ID `test`.\n\n## See Also\n\nI thought about running [Quixe](https://github.com/erkyrath/quixe) -- a Glulx interpreter written in JavaScript -- from within Node like I did with my original [Z8 server](https://github.com/statico/ifhttp). However, Quixe seems designed for the browser, not Node, and this just seemed a lot simpler.\n\nThese projects are good but don't support sessions and/or don't save transcripts:\n\n- https://github.com/agentcox/glknode\n- https://github.com/erkyrath/remote-if-demo\n\nMy original version of this used a Z-machine emulator for .z8 games: https://github.com/statico/ifhttp\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatico%2Fglulxe-httpd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatico%2Fglulxe-httpd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatico%2Fglulxe-httpd/lists"}