By the end, you’ll have two local project folders exchanging edits through current. This uses a disposable playground, so you can understand the workflow before connecting your real game.
Install Corotation and make sure
cor --version works in each terminal. These steps use a
Unix shell and IPv6 loopback. Choose a fresh playground name if
~/corotation-playground already contains your work.
1 Start your current node
In Terminal 1, make a folder for the server and start it. This tutorial binds to your own machine; it is not exposed to your network.
mkdir -p ~/corotation-playground/current
cd ~/corotation-playground/current
ssh-keygen -q -t ed25519 -N '' -f ../playground-key
cor current --bind '[::1]:8787' --authorized-key ../playground-key.pub
Current prints its address, SSH host fingerprint, and data location, and begins making baselines every five minutes. Leave this terminal running.
2 Connect your first workspace
In Terminal 2, create Alice's folder and connect using the disposable playground key. Compare the prompted SSH host fingerprint with Terminal 1, then confirm it.
mkdir -p ~/corotation-playground/alice
cd ~/corotation-playground/alice
cor remote add 'ssh://[::1]:8787' --identity ../playground-key
mkdir -p src
printf 'export const speed = 1;\n' > src/game.js
cor work
Alice’s worker checks the folder and submits its initial content. Leave it
running. The output will include Up to date once the exchange
finishes.
The server address goes into shareable corotation.json. The key
path and host fingerprint stay in .laplace/local.json, which is
excluded from synchronization. You only need to connect this workspace once.
3 Bring in a second workspace
In Terminal 3, create Bob’s empty project and connect it to the same address, using the same disposable playground key. For a real team, authorize a different key for each person:
mkdir -p ~/corotation-playground/bob
cd ~/corotation-playground/bob
cor remote add 'ssh://[::1]:8787' --identity ../playground-key
cor work
Bob receives Alice’s project. In your editor or file browser, open
~/corotation-playground/bob/src/game.js. It should contain
export const speed = 1;.
A teammate with a copy of the project’s corotation.json can start
with just cor work; Corotation discovers the address and
verifies the SSH host on first connection.
4 Make an edit and watch it arrive
Keep both workers running. In your normal editor, change Alice’s
src/game.js to:
export const speed = 2;
Save, then check Bob’s copy. Corotation waits for one second of quiet before syncing. Several quick saves are grouped; continuous editing caps the batching delay at five seconds. Local hashing and transfer time come after that delay.
Once both copies show speed = 2, edit Bob’s file to
speed = 3. Alice receives the return edit. You’ve now synced in
both directions.
5 Keep generated files out
Open Alice’s .gitignore and append the following line. Preserve
the Corotation entries already there:
dist/
The rule itself syncs to Bob. Files you create under dist/ are
excluded, and their activity does not delay real project edits. Nested
.gitignore files are supported too. Learn about overrides in
the ignore guide.
6 Stop and pick up later
Press Ctrl+C in a worker terminal. The files stay on disk. From the same project folder, inspect status and restart with no connection arguments:
cor status
cor work
A configured worker also retries when current is unavailable. If you stop before a pending batch syncs, restarting rescans the workspace and finds your edits.
You’re connected. What next?
Host current for your team and connect an existing project.
Try a deliberate conflictLearn what happens when two people edit from the same base.
When you’re done with the playground, press Ctrl+C in both worker terminals and then in the current terminal. Keep the folders if you want to resume this tutorial later.