Skip to content

Dronakurl/storytime

Repository files navigation

Storytime!

View and create interactive stories

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

Screenshot of Storytime Web App

Screenshot of Storytime Terminal User Interface

Usage

How to install

  • 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>"

Start the Storytime web app

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.

Storytime loves the command line

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.

Helper script: Check integrity of your story

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.