Skip to content

Repository files navigation

SillyTavern Character Generator

SillyTavern Character Generator Interface

A web application for creating character cards for SillyTavern. It uses AI models to generate character profiles, including personalities, scenarios, and custom artwork.

Important

This application requires OpenAI-compatible API endpoints for both text and image generation. It works with OpenAI, OpenRouter, and other services that implement the OpenAI API format.

Core Capabilities

Character Synthesis

The generator uses AI to create character profiles based on user input. It generates backstories, personality traits, and opening scenarios. The application supports streaming output, displaying the character generation in real-time.

Image Generation

The application includes an image generation feature that creates prompts based on the character's description. The tool automatically optimizes prompts for the selected image generation model.

Image Generation Controls:

  • Toggle Image Generation: Enable or disable automatic image generation during character creation to manage API costs.
  • Regenerate Image Prompt: Generate a new optimized prompt based on the character description without creating an image.
  • Regenerate Image: Create a new image using the current prompt.
  • Editable Prompts: Manually edit image prompts (up to 1000 characters).
  • Upload Images: Use custom artwork by uploading PNG or JPEG files.

Lore Integration

The generator supports SillyTavern World Info files. This allows generated characters to incorporate specific world lore, ensuring consistency with custom settings.

Note

World Info files are used only during character generation to provide context to the AI. They are not embedded in the exported character cards.

Customization & Control

Generated fields are editable, allowing for manual adjustments.

  • Perspectives: Supports first-person ("I am") and third-person ("She is") narration styles.
  • Resets: Individual fields can be reset to regenerate specific sections.
  • Persistence: API settings and preferences are saved locally in the browser.

Generated Example

Below is an example of a generated character card.

Generated Character Example

Requirements

The application requires Node.js (LTS version recommended).

Installing Node.js

  • Windows: Use Scoop to install Node.js LTS:
    scoop install nodejs-lts
  • Linux: Use your distribution's package manager (e.g., apt, dnf, pacman).
  • macOS: Use Homebrew:
    brew install node

Quick Start

Docker Compose (Recommended)

  1. Clone the repository:

    git clone https://github.com/Tremontaine/character-card-generator
    cd character-card-generator
  2. Start the application:

    docker-compose up -d
  3. Access the interface:

Direct Installation

  1. Install dependencies:

    npm install
    cd proxy && npm install
    cd ..
  2. Start the development server:

    npm run dev

Usage Guide

  1. Configure APIs: Open "API Settings" to enter Text (OpenAI, OpenRouter) and Image API credentials.
  2. Define Concept: Enter a description of the character.
  3. Generate: Click "Generate Character".
  4. Refine: Edit text fields or regenerate images as needed.
  5. Export: Download the character as a SillyTavern-compatible PNG card or a JSON file.

Configuration

The application is configured via the .env file.

Variable Default Description
FRONTEND_PORT 2427 Port for the web interface
PROXY_PORT 2426 Port for the backend proxy

Planned Features

The following features are planned for future releases:

  • IndexedDB Card Storage: Local storage for generated character cards with browsing and management capabilities.
  • Card Editing: Request AI-powered revisions for generated cards.
  • Card Import for Editing: Upload existing character cards to modify them.

License

MIT License - See LICENSE file for details.


Note: This application requires active API credentials for text and image generation.

About

Generate spec-v2 character cards for SillyTavern and similar apps

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages