Pika

Pika is a minimal, web-based AI-assisted editor for writers who want to stay in control of their text. It runs locally, stores everything on your machine, and keeps AI in a supporting role — available when you need it, out of the way when you don't.

Built for personal use and open-sourced because good tools should be shared.

Features

  • Plain editor — distraction-free, no formatting options, no heavy editor framework
  • Chapters, storylines, characters — organise your project with multiple documents of each type
  • Inline AI continuation — Ctrl+Enter streams text directly at the cursor
  • Selection actions — select any text to Rewrite, Expand, or Summarize via a floating toolbar; results appear in a non-destructive panel before you accept or discard
  • Research chat — independent chat panel at the bottom, won't touch your document
  • Auto-save — content saved to disk automatically as you type
  • Drafts — manual snapshots you can name and restore
  • Import / Export — zip-based, works with or without metadata
  • Memory sync — sync documents to a Mnem-O-Matic MCP server; documents are stored under a namespace derived from the project name
  • Editable prompts — tune every AI instruction from settings, with {{variable}} template support
  • OpenAI-compatible — works with llama-server, Ollama, LM Studio, OpenAI, Anthropic, or any compatible endpoint

Stack

  • Backend: Go, standard library HTTP, SQLite
  • Frontend: SvelteKit
  • Storage: SQLite for metadata, .md files on disk for content

Requirements

  • Go 1.25+
  • Node.js 20.19+ and npm

Ubuntu/Debian (system packages are often too old for Node — use nvm instead):

sudo apt install golang
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install 22

Getting Started

./start.sh

Then open http://localhost:5173. Ctrl+C stops both processes.

Backend flags pass through:

./start.sh -addr :9090 -workspace ~/writing
Flag Default Description
-addr :8080 Listen address
-db pika.db SQLite database path
-workspace ~/pika/projects Directory for .md files

Manual start

# Backend
cd backend && go run ./cmd/pika

# Frontend (separate terminal)
cd frontend && npm install && npm run dev

Configuration

Open Global Settings from the left panel to configure:

  • Editor model — endpoint, model name, and optional API key used for inline AI actions
  • Chat model — separate endpoint/model for the research chat panel
  • Storyline context — how much surrounding text is sent with each AI request (Small 1k / Medium 2k / Large 4k / Full)
  • AI prompts — override the system prompt and per-action instructions; use {{before}}, {{after}}, {{selection}} as template variables

Project-level overrides (name, system prompt, model) are set per project and take precedence over global defaults.

Memory sync (Mnem-O-Matic)

Open Global Settings → Memory to configure:

  • MCP server URL — the endpoint of your Mnem-O-Matic instance (e.g. https://host/mcp)
  • Bearer token — optional authentication token

Once configured, a sync button appears in the editor next to the drafts panel. Clicking it pushes the current document to Mnem-O-Matic under a namespace derived from the project name (the project-slug). Empty documents are not synced. The server must have a valid TLS certificate trusted by the host system.

License

MIT — see LICENSE.

Top categories

Loading Svelte Themes