jj workspaces over the network
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: server lifecycle + docs overhaul

tandem up/down/status/logs for daemon management without systemd.
Control socket (Unix domain socket, JSON lines). Signal handling.
19 new tests (34 total). README restructured, systemd section removed.

+11 -43
+1 -1
Cargo.toml
··· 1 1 [package] 2 2 name = "jj-tandem" 3 - version = "0.1.0" 3 + version = "0.2.0" 4 4 edition = "2021" 5 5 description = "jj workspaces over the network — one server, many agents, real files" 6 6 license = "MIT"
+10 -42
README.md
··· 9 9 ## Install 10 10 11 11 Published on [crates.io](https://crates.io/crates/jj-tandem) as `jj-tandem`. 12 + Requires a Rust toolchain and the [Cap'n Proto compiler](https://capnproto.org/install.html). 12 13 13 14 ```bash 14 15 cargo install jj-tandem 15 16 ``` 16 17 17 - This installs the `tandem` binary. Requires a Rust toolchain and 18 - [Cap'n Proto compiler](https://capnproto.org/install.html) (`capnp`). 19 - 20 - To build from source: 18 + Or build from source: 21 19 22 20 ```bash 23 - git clone https://github.com/laulauland/tandem.git 24 - cd tandem 21 + git clone https://github.com/laulauland/tandem.git && cd tandem 25 22 cargo build --release 26 - # binary at target/release/tandem 27 23 ``` 28 24 29 25 ## Quickstart 30 26 31 27 ```bash 32 - # Start a server (on your VPS, or locally for testing) 28 + # On your server (VPS, or localhost for testing) 33 29 tandem up --repo ~/project --listen 0.0.0.0:13013 34 - 35 - # Check it's running 36 30 tandem status 37 31 38 - # On agent machines: initialize a workspace 39 - tandem init --tandem-server=your-vps:13013 ~/work 32 + # On each agent's machine 33 + tandem init --tandem-server=your-server:13013 ~/work 40 34 cd ~/work 41 35 echo 'pub fn auth() {}' > auth.rs 42 36 tandem new -m "feat: add auth" 43 - 44 - # View logs from the daemon 45 - tandem logs 46 - 47 - # Stop the server 48 - tandem down 49 37 ``` 50 38 51 - Every jj command works through `tandem` — `log`, `new`, `diff`, `file show`, 52 - `bookmark`, `describe` — because tandem implements jj-lib's store traits 53 - as RPC stubs. The server holds a real jj+git repo. 39 + That's it. The agent is now using jj against the remote store — `tandem log`, 40 + `tandem diff`, `tandem file show`, `tandem bookmark` all work because tandem 41 + implements jj-lib's store traits as RPC stubs. The server holds a real jj+git 42 + repo, so `jj git push` on the server ships to GitHub. 54 43 55 44 --- 56 45 ··· 148 137 docker stop tandem-server && docker rm tandem-server 149 138 docker network rm tandem-net 150 139 ``` 151 - 152 - ### With systemd 153 - 154 - Use `tandem serve` (foreground mode) for process managers. 155 - 156 - ```ini 157 - [Unit] 158 - Description=tandem server 159 - After=network.target 160 - 161 - [Service] 162 - ExecStart=/usr/local/bin/tandem serve --listen 0.0.0.0:13013 --repo /srv/project 163 - Restart=on-failure 164 - User=tandem 165 - 166 - [Install] 167 - WantedBy=multi-user.target 168 - ``` 169 - 170 - `tandem serve` also creates a control socket, so `tandem status`, `tandem logs`, 171 - and `tandem down` work against it too. 172 140 173 141 ### With Claude Code / AI agents 174 142