With storytime, you can create fun interactive stories in your terminal. Just write a markdown file with your dialogues, choices and simple logic. An example file can be found in minimal.md. You can also create a story with the built-in openai integration.
Note
- storytime_ai is the name of the python package
- Documentation hat dronakurl.github.io/storytime/
Install the latest version with pip
pip install 'git+https://github.com/Dronakurl/storytime.git#egg=storytime_ai[extras]'
Set environment variable with openai api key (optional)
To use the story generation with openai, you need to set the environment variable OPENAI_API_KEY to your openai api key. You can get your api key from the openai settings. The environment variable can be set in a file .env in the root directory of this project.
Example .env file
OPENAI_API_KEY="sk-p9GOXXXXX<Your OPENAI_API_KEY>"
Run Storytime with
storytime [markdown_file with your own story]
This will start a webserver on port 8501. You can access the webapp with your browser at http://localhost:8501. The webserver runs with streamlit.
You can also use storytime from the command line. You can use the following commands:
storytime-cli [markdown_file with your own story] storytime-tui [markdown_file with your own story]
The storytime-cli command will start a very simple command line interface. The storytime-tui command will start a terminal user interface made with Textual.
You can check if your story is valid with the following command
storytime-checker [markdown_file with your own story]
It will check if all the choices are valid and if all dialogues are connected.