Skip to content

idangur/ai-dungeon-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Dungeon CLI

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.

AI DUngeon on a VT320

Configuration

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>'

Dependencies

You need python (>= 3.3) along with the requests library.

Limitations and future improvements

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).

Implementation details

We fallback to a pure ASCII version of the splash logo if we detect an incompatible locale / terminal type.

Support

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.

About

🏰 A cli client to play.aidungeon.io

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%