This is basically a cli client to play.aidungeon.io.
This allows playing AI Dungeon 2 inside a terminal.
I primarily did this to play the game on a DEC VT320 hardware terminal for a more faithful experience.
For more context, read the accompanying blog post.
You need to first login in a web browser to play.aidungeon.io.
You'd then need to grab the Authentication Token that gets retrieved in your browser localStorage.
The easiest way for many might be to open the developer tools (F12
), do a few actions in AI Dungeon and retrieve it from the X-Auth-Token
Request Header of the POST inputs requests.
Then create a file config.yml
in the same folder as ai-dungeon-cli
with the following content:
auth_token: '<MY-AUTH-TOKEN>'
You need python (>= 3.3) along with the requests
library.
Right now, the code is over-optimistic: we don't catch cleanly when the backend is down.
A better user experience could be achieved with the use of the curses library.
For now, only the /quit
action is supported. I need to enable the others (/revert
, /alter
...).
It would also be nice to add support for browsing other players' stories (Explore menu).
We fallback to a pure ASCII version of the splash logo if we detect an incompatible locale / terminal type.
As you might have heard, hosting AI Dungeon costs a lot of money.
This cli client relies on the same infrastructure as the online version (play.aidungeon.io).
So don't hesitate to help support the hosting fees to keep the game up and running.