pedit

module
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT

README

pedit — Pair edit your local files.

CI Release OpenSSF Scorecard

https://github.com/user-attachments/assets/14bec9ab-8c14-495c-8faf-9cdd98d8fd5b

Run pedit on a file and send the link. Others edit it in their browsers, and every edit is saved back to your file as it comes in.

❯ pedit notes.md

  notes.md is ready to write together.

  Send this link to the people you want to invite:
    https://edit.piconic.ai/r/<room-id>#<key>

  Press Ctrl+C when you are done. Everything is saved to notes.md.

  ● Alice and Bob are here
  • Your file, right now. No account for anyone, nothing for the others to install. The edits land in the local file you named, ready for your editor, your agent or your next commit.
  • Nobody in the middle can read it. Updates are encrypted end to end with a key that lives in the link and never reaches the server. The relay passes ciphertext along; what it holds for a room that stays open is encrypted, and none of it is needed once you have taken the edits in.
  • Comments, not just edits. People comment on text, cells and canvas nodes; comments stay out of the file. Hand out links that can only comment or only read, and let scripts and agents answer from the command line.
  • Markdown, CSV and Canvas. A live preview, a table, or a board of nodes and edges in the browser; from the command line, the same files as text in an editor of your own.
  • Build it into your own app. A local app that works on files can get live editing and several people in one document by running pedit beside it, and comments once it shares the file, instead of writing a sync engine of its own. The app keeps owning the file; pedit keeps it saved.
A CSV file as a table, with Alice's selected cell and Bob's selected cell outlined in their colors
Markdown, with a live preview and Bob's cursor CSV as a table, with Bob's selected cell
A canvas file as a board of nodes, edges and a group, with the node Bob has selected outlined
Canvas as a board, with Bob's selected node Comments, seen from a comment-only link

Why pedit?

Local files work naturally with coding agents and your own editor. Keeping documents in Git makes changes reviewable and preserves their history, but asking someone to clone a repository and open a pull request adds friction to a quick editing session.

pedit lets you invite people into the file with a link and edit together in their browsers. They do not need to set up your development environment. The edits land in the same local file, ready for your next agent task, review or commit.

Install

curl -fsSL https://edit.piconic.ai/install.sh | sh
pedit notes.md    # or any text file you have; `pedit` alone starts a new note

Send the printed link and watch the file change. Press Ctrl+C when you are done. Other ways to install, and what to do next, are in Getting started.

How it stays private

The relay sees the room ID and encrypted bytes, never the key or the text. Anyone with the link can do what the link allows, so send it as you would send the file. In a browser you run the editor the relay serves, so you trust its operator. To run no code from the relay, join from the command line with a pedit from Homebrew, go install or a verified release archive (the install scripts come from the relay too), or self-host. Security design has the details and what pedit does not protect against; the public relay says what edit.piconic.ai logs and keeps; what pedit does on your computer lists every file it touches. To report a vulnerability, see SECURITY.md.

Build it into your own app

An app that edits local files, a CMS, a notes tool, an agent's workbench, can hand the editing to pedit. Its pages get a live document that several people edit at once, with cursors, and the file on disk stays saved by pedit, so the app never writes a sync engine or a save loop of its own.

pedit serve runs beside the app and holds the document; the @pedit/serve package connects it to the app's pages. When the app wants people from outside, it shares the same document through a link, or through a review page on the app's own domain, and gets comments with it. @pedit/serve and @pedit/review are experimental (0.x) and released with each pedit version. Start with Embedding.

Self-host

The public relay is shared, so rooms are small: the host and 4 guests, files under about 1 MiB. Deploy your own to raise the limits, or to put it behind Cloudflare Access so only people you allow can join.

Deploy to Cloudflare

Then set server in .pedit/config.yaml to your Worker's URL. Self-hosting covers Access, limits and maintenance.

Documentation

docs/ is the index: guides for using pedit, hosting a relay and embedding it in an app, the design notes behind each feature, and the security records.

Contributing

See CONTRIBUTING.md for development setup and pull requests. MIT license.

Directories

Path Synopsis
cmd
pedit command
Command pedit shares a local text file and co-edits it with others in their browser.
Command pedit shares a local text file and co-edits it with others in their browser.
internal
access
Package access signs in to a pedit server behind Cloudflare Access with cloudflared, so that sharing a file stays a single command.
Package access signs in to a pedit server behind Cloudflare Access with cloudflared, so that sharing a file stays a single command.
attach
Package attach saves images pasted into the shared document next to the host's file, and uploads them again for peers who could not fetch them.
Package attach saves images pasted into the shared document next to the host's file, and uploads them again for peers who could not fetch them.
canvas
Package canvas reads and writes JSON Canvas files (https://jsoncanvas.org) and moves them in and out of a shared document.
Package canvas reads and writes JSON Canvas files (https://jsoncanvas.org) and moves them in and out of a shared document.
clipboard
Package clipboard copies text with the platform's clipboard command.
Package clipboard copies text with the platform's clipboard command.
doctor
Package doctor checks a review page: the page an integrator serves with the @pedit/review component (docs/design/embedding.md).
Package doctor checks a review page: the page an integrator serves with the @pedit/review component (docs/design/embedding.md).
fileowner
Package fileowner tells who owns a file on Windows, by SID.
Package fileowner tells who owns a file on Windows, by SID.
filewriter
Package filewriter writes the shared document back to the host's file.
Package filewriter writes the shared document back to the host's file.
flock
Package flock takes an exclusive advisory lock on an open file without waiting.
Package flock takes an exclusive advisory lock on an open file without waiting.
lineend
Package lineend holds a file whose lines all end in CRLF as LF in a document, and writes it back with CRLF.
Package lineend holds a file whose lines all end in CRLF as LF in a document, and writes it back with CRLF.
merge
Package merge applies edits made to the file outside pedit onto the shared text.
Package merge applies edits made to the file outside pedit onto the shared text.
meta
Package meta reads and writes the metadata file pedit keeps for a shared file under .pedit/meta/, which holds its comments (#121).
Package meta reads and writes the metadata file pedit keeps for a shared file under .pedit/meta/, which holds its comments (#121).
protocol/prototest
Package prototest provides an in-memory stand-in for the Worker.
Package prototest provides an in-memory stand-in for the Worker.
serve
Package serve holds a file's Yjs document for a local app: clients, one per stream on pedit's standard streams (stdio.go), speak the y-websocket protocol (sync and awareness, unencrypted), and pedit alone writes the file and merges saves made by other editors.
Package serve holds a file's Yjs document for a local app: clients, one per stream on pedit's standard streams (stdio.go), speak the y-websocket protocol (sync and awareness, unencrypted), and pedit alone writes the file and merges saves made by other editors.
session
Package session shares a local file in a pedit room.
Package session shares a local file in a pedit room.
sessiondir
Package sessiondir lets short commands reach a running pedit session on the same machine: a session registers a directory of its own under the user's configuration, and a command leaves a request there and waits for the answer (docs/design/comments-cli.md).
Package sessiondir lets short commands reach a running pedit session on the same machine: a session registers a directory of its own under the user's configuration, and a command leaves a request there and waits for the answer (docs/design/comments-cli.md).
suggest
Package suggest finds files whose names are close to one that does not exist, to turn a typo into a ready-to-run command.
Package suggest finds files whose names are close to one that does not exist, to turn a typo into a ready-to-run command.
packages
serve/test/fakepedit command
Command fakepedit stands in for pedit in the @pedit/serve tests.
Command fakepedit stands in for pedit in the @pedit/serve tests.

Jump to

Keyboard shortcuts

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