yosegaki

command module
v0.0.0-...-9a49ada Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 29 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

yosegaki

Collaborative editing server for Vim. The client is vim-yosegaki.

One server runs many sessions at once. Each session has a host who chooses public (anyone with the id can view, editors need the host's approval) or private (guests need the host's approval to enter). Edits are merged with operational transformation.

Installation

Download a binary from Releases, or

go install github.com/mattn/yosegaki@latest

The same binary is needed on every machine running Vim: yosegaki connect relays between Vim (job stdio) and the server (WebSocket over TLS), since Vim channels cannot speak either.

Docker

docker run -d -p 8080:8080 ghcr.io/mattn/yosegaki

Usage

yosegaki serve -addr :8080      # run the server
    -max-memory 96                     # MB for documents, history and send queues
yosegaki connect URL            # stdio bridge used by vim-yosegaki
yosegaki list URL               # print public sessions as JSON

Endpoints:

  • /ws WebSocket for clients
  • /sessions public sessions as JSON

Run it behind a TLS reverse proxy that passes WebSocket upgrades, for example with nginx:

location / {
    proxy_pass http://127.0.0.1:8080;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_read_timeout 1h;
}

Sessions live in memory and end when the host disconnects.

Client IPs come from CF-Connecting-IP, then X-Forwarded-For, then the peer address, so run it behind a proxy that sets them; exposed directly, clients could forge them to dodge the per-IP limits (the memory budget still holds).

Limits: documents up to 1MB, 32 people per session, 16 connections per IP, 10 new sessions per IP per minute, 256 connections in total. When the memory budget runs out, new sessions and growing edits are refused instead of the server running out of memory.

License

MIT

Author

Yasuhiro Matsumoto (a.k.a. mattn)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package ot implements plain text operational transformation compatible with the wire format of ot.js: an operation is a JSON array whose items are a positive number (retain), a negative number (delete) or a string (insert).
Package ot implements plain text operational transformation compatible with the wire format of ot.js: an operation is a JSON array whose items are a positive number (retain), a negative number (delete) or a string (insert).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址