kyte
v0.2.4
Published
A single-command CLI for sharing and collaboratively editing a file
Downloads
9
Readme
Kyte
Kyte is a single-command Node.js CLI that allows easily sharing a local file with other developers, and then collaboratively editing it in real-time, directly from your browser (Google Docs style!).
Getting Started
Note:
Kyte
requires that you have Node.js v8.0.0+ installed, so if you're using an older version, you'll need to upgrade. I'd recommend using the awesomenvs
project for Node.js version management.
Install the
Kyte
CLI on your development machine, using your preferred NPM clientnpm install -g kyte yarn global add kyte
CD into the directory that contains the file you'd like to share
Start sharing it with
Kyte
, which will launch a new browser-based editor, containing the contents of the specified filekyte <filePath>
Note: You can omit the
filePath
argument in order to start a collaborative editing session on an empty file.Send the share URL (that has been copied to your clipboard) to all of the developers that you'd like to collaborate with, and then begin editing the file in real-time!
As an alternative, if you'd prefer not to install the kyte
CLI globally, you could use npx
to share your file with a single command:
npx kyte <filePath>
How does it work?
Under the covers, Kyte
spins up an express
-based server on your local machine, with a ShareDB server on top of it in order to provide the concurrent editing (OT) back-end for the specified file.
The web front-end uses the Monaco editor, and includes "bindings" to translate all of the editor actions into ShareDB
operations, in order to keep all participating developers in sync.
In order to expose the server over the internet (and available to developers outside of your local subnet), it uses ngrok
to create a public tunnel. This means that anyone with access to your share URL can access it, but the URL itself is "unguessable", and the tunnel will be immediately closed as soon as you terminate the kyte
CLI process.