Skip to content

M4Marvin/charon

Repository files navigation

Charon

My take on properly building an app that combines features from Chub, SillyTavern, and everything else I always wanted.

Charon is a self-hosted web app for roleplaying with AI characters. Import character cards from SillyTavern or Chub, chat with branching message trees, swipe between replies, and keep everything local.


Features

  • Branching conversations — every swipe creates a new branch. Navigate freely, edit inline, never lose a reply.
  • Character cards V2 + V3 — import .png cards from SillyTavern, Chub, or anywhere. No conversion needed.
  • Your own API key — BYO OpenAI-compatible provider (OpenAI, Anthropic via proxy, OpenRouter, Ollama, vLLM, etc.). Keys encrypted at rest.
  • Lorebooks — attach background lore to a chat. The AI reads relevant entries automatically.
  • Personas — define multiple personas and switch per chat.
  • Markdown rendering — bold, italic, code blocks, images, <style> scoping, dialogue highlighting. Streaming-safe with fade-in.
  • Self-hosted — your data stays in a local SQLite file. No cloud, no telemetry, no accounts except yours.

Quick start

Option A: Docker (recommended)

docker compose up -d

Open http://localhost:3000. Data persists in a Docker volume.

Option B: bun

bun install
echo 'DATABASE_URL="dev.db"' > .env
echo 'BETTER_AUTH_SECRET="your-64-char-secret"' >> .env
echo 'ENCRYPTION_KEY="your-32-char-secret"' >> .env
bun run dev

Don't have bun?

curl -fsSL https://bun.sh/install | bash

Or see bun.sh for other install methods.

Generate secrets:

openssl rand -hex 64  # BETTER_AUTH_SECRET
openssl rand -hex 32  # ENCRYPTION_KEY

First-time setup

  1. Open http://localhost:3000 and Sign up — pick a username and password.
  2. Go to Settings+ Add provider, enter your API endpoint, key, and default model.
  3. Go to CharactersImport and upload one or more .png character cards.
  4. Click + New Chat, pick a character, and start typing.

Characters not included. Grab some from Chub or copy .png files from a SillyTavern public/characters/ folder.

Chat controls

Action How
Send Type in the composer, press Enter
Swipe (regenerate) Click ← / → on an assistant message, or Ctrl+← / Ctrl+→
Edit Click the ✏️ icon, edit, click ✓
Impersonate Ctrl+Shift+Enter (write as your persona)
Continue Ctrl+Enter (extend assistant's last message)
Delete branch Trash icon on any message

Import from SillyTavern

# Copy your old data in
cp -r /path/to/SillyTavern/public/* public/data/
bun run migrate

Production

bun run build
bun run start         # port 3000

Set APP_URL to your public URL for auth cookies. The production server is the same app, built once.


For developers

See CONTRIBUTING.md for setup, project layout, architecture, and commands.

About

My take on properly building an AI character chat app — combining features from Chub, SillyTavern, and everything else I always wanted. Self-hosted, branching conversations, character cards V2+V3, lorebooks, personas.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages