Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

English | 简体中文 | Русский | الفلسطينية (العربية)

✍️ Author — AI-Powered Creative Writing Platform

An AI-powered writing studio for novelists, screenwriters, and storytellers.

Author is an AI-assisted creative writing tool designed for fiction writers. It brings together a professional rich text editor, an intelligent AI writing assistant, and a complete worldbuilding management system — all in one seamless experience.

🌐 Live Demo: author-delta.vercel.app

📦 Gitee Mirror (国内镜像): gitee.com/yuanshijilong/author


💬 Why I Built This

I've been using AI for a while now — from the early days of ChatGPT 3.5, to Gemini 2.0 Exp Thinking, and eventually settling on Gemini 2.5 Pro Thinking after the ChatGPT o1 era.

As a novelist, I care deeply about AI's ability to handle language. Novels are long, so I need models with strong context windows and high recall. But what truly moved me about Gemini was its characters — there were moments when the words on screen made me want to cry. That's emotional resonance. I need writing that embraces the full complexity of being human.

Then the coding-focused trend took over. Every company started optimizing for code. I thought it was a good thing — until Gemini 3.1 Pro started describing its characters in biological and psychological terminology. Code-optimized models had begun deconstructing humans into biological components. Claude Opus 4.6 was even worse: every character spoke with peak efficiency — concise, economical, not like a human, but like a machine wearing a human mask.

I could no longer see the models understanding human complexity. They didn't care about what humans do — only what humans are. They stopped showing personality through behavior and emotion, and instead slapped simple definitions onto human beings.

I watched the versatility of these models being gutted. I don't want us to live in a cold world of code. I built this project so that AI can preserve our own language — beyond the mechanical operators.

To all the authors, screenwriters, hobbyists, readers, and players who use this project: I hope you can bring out the best of your craft, create works with a human touch, and keep the flame of our language alive. 🔥


✨ Features

📝 Professional Editor

  • Rich text editor powered by Tiptap — bold, italic, headings, lists, code blocks, and more
  • Word-style pagination with WYSIWYG layout
  • Inline remarks / comments — mark any sentence with a side note; DOCX annotated exports use native Word comments
  • KaTeX math formula support
  • Customizable fonts, font size, line height, and colors
  • Text to speech on desktop and Android — read the selection or current chapter with pause, resume, voice, and speed controls
  • Current paragraph highlight — optional focus tint plus a retained caret when the editor loses focus
  • Real-time word / character / paragraph count

🤖 AI Writing Assistant

  • Multi-provider support: ZhipuAI GLM-4 / DeepSeek / OpenAI / Google Gemini / Claude / SiliconFlow / Volcengine / Moonshot + custom endpoints
  • Smart model fetching — one-click fetch full model list from API, keep saved models manageable even if a provider stops returning them
  • Continue / Rewrite / Polish / Expand — one-click generation
  • Immersive Writing Engine (Ghost Text) streaming preview — see AI output in real-time like Cursor, with accept/reject
  • Free chat mode — discuss plot, characters, and settings with AI
  • Configurable chat send shortcut — choose Enter to send or Ctrl/⌘ + Enter to send, for both compact and expanded chat input
  • Global AI Memory (Context Engine) — AI automatically reads your character profiles, worldbuilding, and previous chapters to maintain story consistency

📚 Worldbuilding Manager

  • Tree-structured management for characters, locations, items, outlines, and writing rules
  • Three writing modes: Web Novel / Literary Fiction / Screenplay, each with dedicated fields
  • Color-coded categories with glassmorphism design
  • Rename top-level categories per work from the full settings panel or the sidebar category popover edit mode
  • Settings automatically injected into AI context

💾 Data Management

  • Local-first — all data stored in browser IndexedDB, never uploaded to servers
  • Snapshot system — manual/auto versioning with one-click rollback
  • Project import/export — full project JSON backup
  • Multi-format export — one-click export current chapter or batch export (TXT / Markdown / DOCX / EPUB / PDF), with body-only or annotated versions

📱 Mobile App

  • Android app — native Flutter app with Google Sign-In cloud sync and richer reading mode controls
  • Read and write your novels on the go
  • Syncs with desktop client via the same cloud account, with desktop WebDAV/LAN transfer options for portable workflows

🌐 Internationalization

  • 🇨🇳 简体中文 / 🇺🇸 English / 🇷🇺 Русский

🎨 User Experience

  • Eye-comfort warm tones / dark mode toggle
  • Interactive onboarding tour
  • Help panel with keyboard shortcuts

💻 Desktop & Mobile

No Node.js required! Download the pre-built installer:

Just install and start writing. All features work out of the box.

Author 1.3+, Author Pro, Reader, and Reader Mobile are separate commercial product lines and are not distributed from this open-source repository.

💡 To build the desktop app from source: npm run build && npx electron-builder --win

🐛 Troubleshooting / Debug Logs

If you encounter a white screen, crash, or startup failure:

  • In the app, open Help → About → Export Diagnostic Logs to download author-diagnostic-*.json.
  • On the desktop client, Help → About → Open Log Folder opens the local log location.
  • Desktop main log: %APPDATA%\author-app\author-debug.log (C:\Users\<YourUsername>\AppData\Roaming\author-app\author-debug.log).
  • Desktop crash reports: %APPDATA%\author-app\crash-reports\author-crash-*.json.
  • Browser, source-code, and Vercel deployments do not have the desktop log folder; use the in-app diagnostic export instead.
  • Diagnostic files redact API Keys, tokens, Authorization headers, secrets, and public IPs.

🚀 Getting Started

💡 Highly Recommended: For most users who only need daily writing and multi-device synchronization, please directly download and install the client. Source code deployment or Vercel deployment is only recommended for advanced users who need secondary development or are willing to configure Firebase/WebDAV storage themselves.

Requirements

  • Node.js 18+
  • npm 9+ or pnpm 8+

Installation

# Clone the repository
git clone https://github.com/YuanShiJiLoong/author.git
# Or use Gitee mirror (faster in China)
# git clone https://gitee.com/yuanshijilong/author.git
cd author

# Install dependencies
npm install
# Or use pnpm (no phantom dependency issues)
# pnpm install
# pnpm approve-builds    # Required by pnpm to activate native packages

# Configure environment variables (optional)
cp .env.example .env.local
# Edit .env.local with your API keys
# You can also configure them in the app's Settings panel

Development Server

npm run dev

Open http://localhost:3000 to start writing.

Production Build

npm run build
npm start

Deploy to Vercel

💡 ⚠️ Note: The version deployed via Vercel does not have Firebase cloud sync configured by default. You can either configure Firebase yourself or use the in-app WebDAV/LAN sync options. If you just want multi-device synchronization with minimal setup, please download the client directly.

Deploy with Vercel

☁️ Sync Setup (Self-Deploy)

💡 Tip: The desktop client (Windows/macOS) supports built-in Firebase sync, optional WebDAV sync, and temporary LAN transfer. If you find configuring Firebase too tedious, use the desktop client and choose Preferences → Cloud Sync for WebDAV or LAN options.

If you insist on self-deploying via source code or Vercel and want Firebase multi-device sync, follow these steps to configure your own Firebase database. WebDAV and LAN sync can be configured in the app without Firebase.

1. Create a Firebase Project

  1. Go to Firebase ConsoleCreate Project
  2. Enable Authentication → Sign-in method → Google
  3. Create a Firestore Database (Start in production mode)
  4. Set Firestore Security Rules to restrict per-user access:
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /users/{userId}/{document=**} {
      allow read, write: if request.auth != null && request.auth.uid == userId;
    }
  }
}

2. Configure Environment Variables

Copy .env.example to .env.local and fill in the Firebase section:

NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id

You can find these values in Firebase Console → Project Settings → General → Your Apps → SDK Config.

3. For Vercel Deployment

Add the same variables in Vercel Dashboard → Project Settings → Environment Variables, then redeploy.

💡 Firebase API keys are designed to be public (client-side identifiers). Data security is enforced by Firebase Auth + Firestore Security Rules, not by hiding the API key.


🔄 Updating

Desktop Client Users

Download the latest installer from the Releases page and install it over your current version. Your data is stored in the browser/Electron profile and will not be lost.

Self-Deployed Users (Source)

Option 1: In-App Auto Update

Open Help Panel → About → Check for Updates and click "Update Now". This automatically runs git pull → npm install → npm run build.

⚠️ You must restart the server after updating for changes to take effect. The app will display restart instructions.

Option 2: Manual Update

# 1. Pull latest code
git pull origin main

# 2. Install dependencies (if any new ones)
npm install
# or: pnpm install && pnpm approve-builds

# 3. Rebuild (required for production mode)
npm run build

# 4. Restart the server
# Development mode: Ctrl+C to stop, then restart
npm run dev

# Production mode: Ctrl+C to stop, then restart
npm start

# Using PM2:
pm2 restart author

⚠️ Running git pull without restarting the server will NOT apply the update. The running Node.js process still uses the old code.

Vercel Users

If you deployed via Vercel fork, just sync your fork with upstream on GitHub — Vercel will automatically redeploy.


⚙️ AI Configuration

Author supports multiple AI providers. Configure via environment variables or in-app settings:

ProviderEnv VariableGet API Key
ZhipuAI (GLM-4)ZHIPU_API_KEYopen.bigmodel.cn
Google Gemini (Native)GEMINI_API_KEYaistudio.google.com
Google Gemini (OpenAI-compat)GEMINI_API_KEYaistudio.google.com
DeepSeekIn-app configplatform.deepseek.com
OpenAIIn-app configplatform.openai.com
OpenAI ResponsesIn-app configplatform.openai.com
Claude (Anthropic)CLAUDE_API_KEYconsole.anthropic.com
SiliconFlow (硅基流动)In-app configsiliconflow.cn
Volcengine (火山引擎/豆包)In-app configconsole.volcengine.com
Moonshot (Kimi)In-app configplatform.moonshot.cn
Custom (OpenAI-compat)In-app configAny OpenAI-compatible endpoint
Custom (Gemini format)In-app configAny Gemini-compatible endpoint
Custom (Claude format)In-app configAny Claude-compatible endpoint

💡 Tip: You can configure multiple API keys for the same provider to create a key pool. Simply separate the keys with commas , or spaces. The system will automatically rotate through them (round-robin) to distribute the load and avoid rate limits.

💡 No API key required for most editing features. AI features need at least one provider configured.


🔍 Web Search Configuration

Author supports AI-powered web search for real-time information. Different providers handle search differently:

ProviderSearch MethodExtra Setup
Gemini (Native)Built-in Google SearchNo extra config needed
OpenAI / OpenAI ResponsesBuilt-in Web SearchNo extra config (needs search model)
DeepSeek / ZhipuAI / SiliconFlow / OthersExternal Search APISearch engine Key required

For providers without built-in search, choose a search engine and enter your API Key:

Tavily (Recommended — Simplest)

  1. Visit tavily.com and create an account
  2. After login, find your API Key on the Dashboard (format: tvly-...)
  3. In Author Settings → Web Search → Select Tavily → Paste the Key

Free tier: 1,000 requests/month

Exa (Semantic Search)

  1. Visit exa.ai and create an account
  2. Get your API Key from the Dashboard
  3. In Author Settings → Web Search → Select Exa → Paste the Key

Free tier: 1,000 requests/month — Semantic search optimized for AI use cases

Custom Search API URL (Proxy Pool)

If you've set up a Tavily/Exa proxy pool using multiple free-tier accounts, you can configure a custom API URL in the search settings:

  1. In Author Settings → Web Search → Search engine config area
  2. Find the "🔗 Custom API URL (optional)" input field
  3. Enter your proxy URL, e.g. https://your-proxy.com
  4. Leave blank to use the official default URL

💡 The system automatically appends /search to your URL — no need to add it manually


🧠 Vectorization (Embedding) & RAG Settings Retrieval

💡 This feature is designed for long-form works with many settings entries (>20). Typical short stories usually don't need this.

What Is Vectorization?

By default, AI conversations inject all settings entries into the context. When the number of entries is large, this exceeds the model's context length limit.

Vectorized retrieval (RAG) works differently: each settings entry is converted into a mathematical vector. During a conversation, the system automatically calculates semantic similarity and only injects the most relevant entries into the context — instead of dumping everything.

When Do You Need It?

ScenarioRecommendation
Settings entries < 20Not needed — full injection works fine
Settings entries 20–100Recommended — improves recall accuracy
Settings entries > 100Highly recommended — critical settings won't be forgotten

How to Configure

  1. Open SettingsAPI Configuration
  2. Find and enable the "Separate Embedding API" toggle
  3. Fill in the following:
SettingDescription
Embedding API KeyAPI key for the embedding model (can share the same key as your chat model provider)
Embedding Base URLAPI endpoint (e.g., https://api.openai.com/v1)
Embedding ModelModel name (see recommendations below)

Recommended Models

ProviderModel NameNotes
OpenAItext-embedding-3-smallCost-effective, 1536 dimensions
OpenAItext-embedding-3-largeHigher accuracy, 3072 dimensions
ZhipuAIembedding-3Optimized for Chinese, 2048 dimensions
SiliconFlowBAAI/bge-m3Multilingual, free tier available

Automatic Vectorization

  • Auto-trigger: After a settings entry changes, the system automatically debounces for 3 seconds before triggering vectorization.
  • Incremental update: Only modified entries are updated. It avoids full rebuilds to save API quotas and time.
  • Local storage: Vector data is stored locally in IndexedDB and never uploaded to any server.
  • Auto-initialization: When importing settings or syncing from the cloud, the system will automatically build missing vector indexes in the background.

Manual Rebuild

If you switch Embedding models or the vector index becomes corrupted, you can manually rebuild:

  1. Open SettingsAPI Configuration
  2. Click the "Rebuild Vector Index" button
  3. Wait for all entries to be re-vectorized

Workflow

User edits settings entry → 3s debounce → Call Embedding API for vector
                                                    ↓
                                           Store in local IndexedDB
                                                    ↓
AI conversation → Vectorize user input → Cosine similarity matching → Inject Top-K settings into context

💾 Settings Import Format Documentation

Author supports importing settings from multiple formats: JSON / Markdown / TXT / DOCX / PDF.

Core Structure: Four Tiers

The import system uses structural markers to strictly distinguish the following four tiers. Regardless of the format used, this nested structure must be followed: Category → Entry → Field → Value (can be multiline)

Therefore, any custom category, custom tag, or custom field can be correctly recognized and losslessly restored.

Format Reliability & Tier Marker Reference

RatingFormatCategoryEntryFieldMultiline
⭐⭐⭐⭐⭐ (Lossless)JSONcategorynamecontent key-val\n newline
⭐⭐⭐⭐⭐ (Lossless)MD## Category Name### Entry Name**Tag**: ValueIndented text
⭐⭐⭐⭐ (Lossless)TXT│ Category Name【Entry Name】〈Tag〉: ValueIndented text
⭐⭐⭐ (High-Fidelity)DOCXHeading 1Heading 2Bold Tag + colonIndented paragraph
⭐⭐ (High-Fidelity)PDF■ Category Name◆ Entry Name▸ Tag: ValueIndented text

Markdown Format Template (Recommended)

Use ## for categories, ### for entry names, and **Tag**: Content for fields:

## Any Custom Category

### John Doe

**Role**: Protagonist
**Background Story**: Born deep in the mountains.
  Studied martial arts with his grandfather since childhood.
  His master said: "You must find the answers yourself."
**Custom Bloodline**: Half-dragon bloodline

### Sarah White
**Gender**: Female
**Personality**: Lively and cheerful, detail-oriented

TXT Format Template

Use for the category box, 【】 for entry names, and 〈Tag〉: for fields:

┌──────────────────────────
│ Any Custom Category
└──────────────────────────

【John Doe】
〈Gender〉: Male
〈Background Story〉: Born deep in the mountains.
  Studied martial arts with his grandfather since childhood.
  His master said: "You must find the answers yourself."
〈Custom Bloodline〉: Half-dragon bloodline

DOCX Format Template

In Word, use Heading styles and bolding to mark structure:

  • Heading 1 (H1) → Category Name (e.g., "Any Custom Category")
  • Heading 2 (H2) → Entry Name (e.g., "John Doe")
  • Body First ParagraphBold Field Name: Content (e.g., Custom Bloodline: Half-dragon bloodline)
  • Body Continuation → Multiline content with first-line indent

💡 Compatibility Design & Notes

  1. Auto Tag Fallback (Backwards Compatibility) — If a structural marker is missing in TXT/Markdown (e.g., using Name: John Doe instead of **Name**: John Doe), the system will automatically parse it compatibly only if Name belongs to the known core field set. However, to guarantee 100% recognition and extraction of custom fields, you must add the structural formatting.
  2. Multiline Value Handling — Whenever you start with **Tag**: or 〈Tag〉: , any subsequent lines indented by 2 spaces will be considered the body of that field (multiline value extraction), until the next structural tag is encountered.
  3. DOCX / PDF Parsing Limitations — PDFs are extracted using specially designed identifiers. If the imported PDF/DOCX file was not generated by this system, a heuristic parser will attempt to extract the content as best as possible, but 100% fidelity cannot be guaranteed.
  4. JSON is the Most Complete — JSON is undoubtedly the strictest format and the only one capable of 100% migrating all attributes (including writing mode and project info). If you are simply changing writing devices, JSON import/export is strongly recommended.

🔒 Privacy & Data Security

Local Storage (Safe)

  • All creative data (chapters, settings, snapshots) is stored 100% locally in your browser (IndexedDB) — never uploaded to any server
  • API Keys are stored in browser localStorage

⚠️ Data Flow When Using AI Features

When using AI features (continue, rewrite, chat, etc.), the following data passes through the deployer's server on its way to the AI provider:

  • Your API Key
  • The text content you send to AI
Your Browser → Deployer's Server → AI Provider (ZhipuAI/Gemini/DeepSeek/etc.)

If you're using someone else's deployed public instance, while the deployer promises not to inspect logs, the technical capability to intercept data exists. Therefore:

  1. ✅ You can use a public instance for a quick trial
  2. ⚠️ After trying it, immediately destroy your API Key at your provider's website
  3. 🔐 For real use, fork and deploy your own private instance — then all data only passes through your own server

💡 Deploying your own instance is easy: Fork this repo → One-click deploy to Vercel → Done. Takes less than 5 minutes.


📄 License

This project is licensed under AGPL-3.0.

In short:

  • ✅ Free to use, modify, and distribute
  • ✅ Personal and commercial use allowed (as long as you open-source your changes)
  • ⚠️ Modified versions must also be open-sourced under AGPL-3.0 (including network services / SaaS)
  • ⚠️ Original copyright notice must be preserved
  • ❌ Closed-source commercial use is NOT allowed

This repository is the Author 1.2.x open core. See Author Open Core Boundary for the public/private product boundary and release rules.


📜 Legal Documents

By using Author, you agree to our Privacy Policy and Terms of Service. These documents are available in multiple languages:

DocumentEnglish中文Русскийالعربية
Privacy PolicyPRIVACY.mdPRIVACY.zh.mdPRIVACY.ru.mdPRIVACY.ar.md
Terms of ServiceTERMS.mdTERMS.zh.mdTERMS.ru.mdTERMS.ar.md

💡 For users in mainland China: If GitHub is inaccessible, you can view these documents via the Gitee mirror. The legal documents are also bundled with every desktop release and accessible offline within the application.


🙏 Acknowledgments

🤖 AI Companions

NameRole
ChatGPT 5.5 (xhigh)Primary reasoning and coding model
Claude Opus 4.6 (Thinking)Architecture, implementation, and debugging collaborator
Gemini 3.1 Pro (High)UI review, screenshot analysis, design iteration
Gemini 3 FlashBuilt-in browser automation tool

🛠️ AI Programming IDE

🔌 MCP Tools

  • Chrome DevTools MCP — Browser testing, performance analysis, DOM inspection
  • Firebase MCP — Cloud database management, security rules validation, project config
  • GitHub MCP — Repository management, automated releases, code search

☁️ Backend & Database

📦 Frontend & Open Source

  • Next.js — React full-stack framework
  • Tiptap — Core editor framework
  • Zustand — State management
  • KaTeX — Math rendering

🌟 Inspiration & Reference

Author's multi-provider API configuration experience was inspired by RikkaHub, Cherry Studio and other open-source AI clients in their approach to Provider, model, Base URL, and local key management.

🔤 Typography

关于 About

Author - AI-powered writing platform for novelists and screenwriters

语言 Languages

JavaScript92.3%
CSS7.4%
PowerShell0.2%
HTML0.1%
Dockerfile0.0%
Shell0.0%
NSIS0.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
225
Total Commits
峰值: 64次/周
Less
More

核心贡献者 Contributors