Skip to content

Commit

Permalink
feat(chat): add chat feature tutorial and commands to README
Browse files Browse the repository at this point in the history
- Included detailed instructions for starting a chat session.
- Added examples for iterate, outline, worldbuilding, and chapters commands.
- Provided help and prompt handling details.
- Formatted for markdown compatibility with escaped code blocks.
  • Loading branch information
Estrada Irribarra, Rodrigo Andres committed Oct 20, 2024
1 parent b5656cc commit 558ba2a
Show file tree
Hide file tree
Showing 6 changed files with 357 additions and 9 deletions.
46 changes: 43 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

Welcome to [**StoryCraftr**](https://storycraftr.app), the open-source project designed to revolutionize how books are written. With the power of AI and a streamlined command-line interface (CLI), StoryCraftr helps you craft your story, manage worldbuilding, structure your book, and generate chapters — all while keeping you in full control.

## Release Notes v0.5.0-alpha1
## Release Notes v0.6.0-alpha2

You can find the release notes for version `v0.5.0-alpha1` [here](https://github.com/raestrada/storycraftr/releases/tag/v0.5.0-alpha1).
You can find the release notes for version `v0.6.0-alpha2` [here](https://github.com/raestrada/storycraftr/releases/tag/v0.6.0-alpha2).

## Step 1: Install StoryCraftr

Expand All @@ -16,7 +16,7 @@ First, install **StoryCraftr** using [pipx](https://pypa.github.io/pipx/), a too
To install **StoryCraftr**, run the following command:

```bash
pipx install git+https://github.com/raestrada/storycraftr.git@v0.5.2-alpha1
pipx install git+https://github.com/raestrada/storycraftr.git@v0.6.0-alpha2
```

### Important: Before using StoryCraftr, make sure to set your OpenAI API key:
Expand Down Expand Up @@ -67,6 +67,46 @@ Writing a book is a journey that involves not only creativity but also structure

With StoryCraftr, you'll never feel stuck again. Let AI guide your creative process, generate ideas, and help you bring your world and characters to life.

## StoryCraftr Chat Feature 💬

The **StoryCraftr Chat** feature allows users to engage directly with an AI assistant, helping to brainstorm, refine, and improve your book in real time. The chat supports various commands for outlining, iterating, and world-building, making it a powerful tool for writers to create and enhance their stories interactively.

### Key Commands:
- **Iterate**: Refine character names, motivations, and even insert new chapters mid-book.
Example:
```bash
!iterate insert-chapter 3 "Add a flashback between chapters 2 and 3."
```

- **Outline**: Generate the general plot, chapter summaries, or key plot points.
Example:
```bash
!outline general-outline "Summarize the overall plot of a dystopian sci-fi novel."
```

- **Worldbuilding**: Build the world’s history, geography, and technology, or develop the magic system.
Example:
```bash
!worldbuilding magic-system "Describe the 'magic' system based on advanced technology."
```

- **Chapters**: Write new chapters or adjust existing ones and generate cover text.
Example:
```bash
!chapters chapter 1 "Write chapter 1 based on the synopsis."
```

You can start a chat session with the assistant using:
```bash
storycraftr chat --book-path /path/to/your/book
```

For help with available commands during the session, simply type:
```bash
help()
```


## Contributing

We welcome contributions of all kinds! Whether you’re a developer, writer, or simply interested in improving the tool, you can help. Here’s how you can contribute:
Expand Down
185 changes: 185 additions & 0 deletions docs/chat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# StoryCraftr Chat Feature Tutorial 💬✨

## Getting Help in Chat

At any time, if you're unsure of what commands are available or how to use them, you can get help within the chat by typing:

```bash
help()
```

This will provide a list of available commands and their usage.

## Using Multi-word Prompts

When asking the assistant to generate or refine content, you should enclose multi-word inputs in quotes to ensure they are processed as a single argument. For example:

```bash
[You]: "Explain how Zevid manipulates the elite using their own biotechnology in the rebellion."
```

This will ensure that the assistant treats the entire input as one cohesive prompt.

## Overview

The **Chat** feature in **StoryCraftr** allows you to interact directly with the AI assistant to brainstorm ideas, refine content, or improve any aspect of your book in real time. The feature includes the ability to prompt specific commands related to story development, iterative refinement, and world-building, all from within the chat environment. This guide will help you get started with using the chat feature effectively.

## Getting Started with Chat

Before you can use the chat feature, ensure that you have **StoryCraftr** installed and that your book project is initialized. Once your project is ready, you can start a chat session with this command:

```bash
storycraftr chat --book-path /path/to/your/book
```

### Example:

```bash
storycraftr chat --book-path ~/projects/la-purga-de-los-dioses
```

Once the session starts, you’ll be able to type messages to the assistant and receive responses directly in your terminal.

## Available Commands within Chat

While in a chat session, you can use commands to quickly execute tasks that StoryCraftr supports, such as refining your outline, improving chapters, or updating your world-building. These commands provide flexibility, allowing you to iterate on various aspects of your novel without leaving the chat.

### Command Examples

You can trigger the following commands within the chat by typing the appropriate prompt.

### **Iterate**: Refining the Story Iteratively

The **Iterate** commands are designed to help you iteratively improve the book's content. You can refine specific aspects such as character names, motivations, or plot points.

- **Check character names**:

```bash
!iterate check-names "Check character names for consistency."
```

- **Refine character motivation**:

```bash
!iterate refine-motivation "Refine character motivation for Zevid."
```

- **Check consistency**:

```bash
!iterate check-consistency "Ensure consistency of character arcs and motivations."
```

- **Insert a chapter**:

```bash
!iterate insert-chapter 3 "Insert a chapter about Zevid's backstory between chapters 2 and 3."
```

### **Outline**: Outlining the Book

The **Outline** commands help you generate or refine various components of your book's outline, including character summaries, plot points, or the entire general outline.

- **General outline**:

```bash
!outline general-outline "Summarize the overall plot of a dystopian sci-fi novel."
```

- **Plot points**:

```bash
!outline plot-points "Identify key plot points in the story."
```

- **Character summary**:

```bash
!outline character-summary "Summarize Zevid’s character."
```

- **Chapter synopsis**:

```bash
!outline chapter-synopsis "Outline each chapter of a dystopian society."
```

### **Worldbuilding**: Building the World of Your Story

With **Worldbuilding** commands, you can flesh out various aspects of your story's world, such as the history, culture, and even the "magic" system (which could be advanced technology in disguise).

- **History**:

```bash
!worldbuilding history "Describe the history of a dystopian world."
```

- **Geography**:

```bash
!worldbuilding geography "Describe the geography of a dystopian society."
```

- **Culture**:

```bash
!worldbuilding culture "Describe the culture of a society controlled by an elite class."
```

- **Technology**:

```bash
!worldbuilding technology "Describe the advanced biotechnology mistaken for magic."
```

- **Magic system**:

```bash
!worldbuilding magic-system "Describe the 'magic' system based on advanced technology."
```

### **Chapters**: Managing and Writing Specific Chapters

The **Chapters** commands focus on generating or improving specific chapters of your book. You can also create cover and back-cover text for your novel using this command group.

- **Generate a chapter**:

```bash
!chapters chapter 1 "Write chapter 1 based on the synopsis provided."
```

- **Insert a chapter**:

```bash
!chapters insert-chapter 5 "Insert a chapter revealing Zevid’s manipulation."
```

- **Generate cover text**:

```bash
!chapters cover "Generate the cover text for the novel."
```

- **Generate back-cover text**:

```bash
!chapters back-cover "Generate the back-cover text for the novel."
```

## Exiting the Chat

When you're ready to exit the chat, simply type:

```bash
exit()
```

This will end the chat session and return you to the terminal.

## Conclusion

The **StoryCraftr Chat** feature, combined with powerful commands like **Iterate**, **Outline**, **Worldbuilding**, and **Chapters**, provides you with everything you need to write your book efficiently. Whether you are refining existing content or generating new chapters, this feature allows you to enhance your creative process with ease.

---

Happy writing with **StoryCraftr** and its powerful chat feature! ✍️✨
2 changes: 1 addition & 1 deletion docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ First, install **StoryCraftr** using [pipx](https://pypa.github.io/pipx/), a too
To install **StoryCraftr**, run the following command:

```bash
pipx install git+https://github.com/raestrada/storycraftr.git@v0.5.2-alpha1
pipx install git+https://github.com/raestrada/storycraftr.git@v0.6.0-alpha2
```

### Important: Before running the `storycraftr` command
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
<meta name="twitter:card" content="summary_large_image">

<div class="release-link">
<a href="https://github.com/raestrada/storycraftr/releases/tag/v0.5.0-alpha1">Release Notes v0.5.0-alpha1</a>
<a href="https://github.com/raestrada/storycraftr/releases/tag/v0.6.0-alpha2">Release Notes v0.6.0-alpha2</a>
</div>

<nav>
Expand Down Expand Up @@ -310,7 +310,7 @@ <h1>Welcome to StoryCraftr 📚✨</h1>
<div class="coming-soon">
🚧 Coming Soon - Beta Release! 🚀
<br>Meanwhile, you can download the Alpha version, which is fully usable but may still have bugs:
<code>pipx install git+https://github.com/raestrada/storycraftr.git@v0.5.2-alpha1</code>
<code>pipx install git+https://github.com/raestrada/storycraftr.git@v0.6.0-alpha2</code>
</div>
</section>

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "storycraftr"
version = "0.5.2-alpha1"
version = "0.6.0-alpha2"
description = "A CLI tool for writing books using OpenAI."
authors = ["Tu nombre <[email protected]>"]
license = "MIT"
Expand Down
Loading

0 comments on commit 558ba2a

Please sign in to comment.