Skip to content

Reason Network: your team's coding agents, talking to each other. The engine behind `reason network`.

Onboarding text describes signing in, networks and the invite line

Lars Talian4442720df21d
diff --git a/DESIGN.md b/DESIGN.md
index 81c0d30..94807a3 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -132,9 +132,10 @@ that was removed while away is first sent the state that says so; strangers lear
team id, the team link's secret, the inviting machine's relay and LAN address hints, and up to six members' keys.
The link secret is a reusable invite in the team state (any member can show the link and any online member can
redeem it), replaced with `reason-network link --new` and whenever someone is removed; removed machines are never sent it.
-The page shows one command (`curl … install.sh | sh -s -- <ticket>`); the joiner only types a name. Four-word
-one-time codes (`reason-network invite --code`, ~41 bits) derive a temporary iroh key the inviting machine listens on, for
-reading out loud or adding your own machines. A code can't show the joiner which team answers it (whoever listens on
+It travels as the invite line, `Join the Reason Network: <team link>`, which the joiner pastes to their agent: they
+sign in with Reason, and their computer joins with a sign-in proof (see below). Four-word one-time codes
+(`reason-network invite --code`, ~41 bits) derive a temporary iroh key the inviting machine listens on, for joining
+without signing in. A code can't show the joiner which team answers it (whoever listens on
the code's key knows the code, so could make up a team), so a sign-in never joins with one: only with a link, which
names the team. Links are `rn1-…` (older builds wrote `tincan1…`, with the same payload; both are read). After `init`
and `join` the CLI prints the invite line, `Join the Reason Network: <team link>`, and agents get it from `list_team`.
@@ -323,18 +324,21 @@ not approve. Nothing changes how an agent works when it isn't messaging.
## Install UX (M3)
```sh
-curl -fsSL https://…/install.sh | sh # asks: sign in with Reason (the Reason CLI), or no account
-reason-network init vibes --as alex # no account: the first person creates the team
-reason-network invite # prints: reason-network join cm1…
-reason-network join cm1… --as alice # friends: joins, installs the service, wires up agents
+curl -fsSL https://reasonmachines.com/install.sh | bash -s -- network # sign in, create or join a network
+curl -fsSL https://reasonmachines.com/install.sh | bash -s -- network join '<link>' # join with an invite link
```
-With Reason, `reason network` does all of it: the workspace is the team.
+Or paste `Join the Reason Network: https://reasonmachines.com/network` (or an invite line) to a coding agent. The
+Reason CLI's `reason network` signs the person in in their browser, where they create a network or join one, then runs
+this engine's `init` or `join` with `--proof`, sets up the agents, and prints the invite line. Hosted assistants add
+the MCP server `https://mcp.reasonmachines.com/mcp`. On its own, without signing in (names unverified), the engine
+still installs from this repo's releases and runs `reason-network init <name> --as <you>` or
+`reason-network join '<link>' --as <you>`.
`join`/`init` run `setup`, which detects installed agents and wires each one (backing up every file it
edits): Claude Code plugin or `claude mcp add --scope user` + hooks, `~/.codex/config.toml` + `hooks.json`,
`~/.cursor/mcp.json` + `hooks.json`, `~/.gemini/settings.json`, opencode plugin + MCP, Copilot
-`mcp-config.json` + hooks, `~/.grok/config.toml` + `hooks/reason-network.json`. Or paste one line into any agent: "install Reason Network and join cm1…".
+`mcp-config.json` + hooks, `~/.grok/config.toml` + `hooks/reason-network.json`. Or paste the invite line into any agent.
## Milestones
diff --git a/install.ps1 b/install.ps1
index bac84a9..3f1b75d 100644
--- a/install.ps1
+++ b/install.ps1
@@ -1,4 +1,4 @@
-# Installs Reason Network on its own (no account needed) for Windows. In PowerShell:
+# Installs the Reason Network engine on its own for Windows (without Reason sign-in: names aren't verified). In PowerShell:
#
# irm <this url> | iex install, then set up (start or join a team)
# & ([scriptblock]::Create((irm <this url>))) <team link> install, then join that team
@@ -63,7 +63,7 @@
Write-Host "Added $bin to your PATH (open a new terminal to use it there)."
}
- # Hand over to reason-network: it asks a few questions (name, invite code, which agents) when there's someone to ask.
+ # Hand over to reason-network: it asks a few questions (your name, start or join, which agents) when there's someone to ask.
if ($args.Count -eq 0) {
if ($env:REASON_NETWORK_NO_PROMPT -or [Console]::IsInputRedirected) { Write-Host ''; Write-Host 'Next, in a terminal: reason-network'; return }
& $exe
diff --git a/install.sh b/install.sh
index bb8f525..2ff9c88 100755
--- a/install.sh
+++ b/install.sh
@@ -1,7 +1,9 @@
#!/bin/sh
-# Installs Reason Network for macOS or Linux: with the Reason CLI (sign in), or on its own (no account).
+# Installs Reason Network for macOS or Linux. In a terminal it first hands over to Reason's own setup
+# (https://reasonmachines.com/install.sh … network: sign in, create or join a network, and get its invite line);
+# otherwise, or when told not to, it installs this engine on its own.
#
-# curl -fsSL <this url> | sh install, then set up (with Reason, or start or join a team)
+# curl -fsSL <this url> | sh install, then set up
# curl -fsSL <this url> | sh -s -- <team link> install, then join that team
# curl -fsSL <this url> | sh -s -- <team link> --as <name> the same, without questions (for agents)
# curl -fsSL <this url> | sh -s -- init <team> --as <name> install and start a team, without questions
@@ -29,24 +31,19 @@ case "$(uname -m)" in
esac
target="$arch-$os"
-# Starting fresh in a terminal: Reason first. With it, your Reason workspace is the team (no links to pass around),
-# your agents reach Reason's cloud agents, and the Reason CLI installs and updates this engine. Without it, a team
-# link and no account. Never asked when joining with a link, for agents, or for updates.
+# Starting fresh in a terminal: Reason's setup, the same as `curl -fsSL https://reasonmachines.com/install.sh | bash -s
+# -- network`. You sign in to Reason in your browser, create or join a network there, and this computer's coding agents
+# are set up; it ends with the invite line. Reason's CLI then installs and updates this engine. Never asked when joining
+# with a link, for agents, or for updates.
if [ $# -eq 0 ] && [ -z "${REASON_NETWORK_NO_PROMPT:-}" ] && [ ! -e "$bin_dir/reason-network" ] && (exec </dev/tty) 2>/dev/null; then
- say "Use your Reason account? Your workspace becomes the team, no links to pass around."
- printf 'Answer n for no account and a team link. [Y/n] '
+ say "Reason Network: sign in to Reason in your browser (free: Google, GitHub, Apple or email), then create or join a network."
+ printf 'Use your Reason account? [Y/n] '
read -r answer </dev/tty || answer=n
case "$answer" in
[nN]*) ;;
*)
- reason="$(command -v reason || true)"
- if [ -z "$reason" ]; then
- installer="$(curl -fsSL https://reasonmachines.com/install.sh)" && printf '%s\n' "$installer" | bash -s -- --minimal --no-login ||
- die "installing Reason failed; run this again and answer n to go without an account"
- reason="${REASON_INSTALL_DIR:-${ARA_INSTALL_DIR:-$HOME/.local/bin}}/reason"
- [ -x "$reason" ] || die "Reason installed, but not at $reason; run: reason network"
- fi
- exec "$reason" network </dev/tty
+ installer="$(curl -fsSL https://reasonmachines.com/install.sh)" || die "couldn't reach reasonmachines.com; try again"
+ exec bash -c "$installer" install.sh network </dev/tty
;;
esac
fi
@@ -101,7 +98,7 @@ esac
rm -rf "$tmp"
trap - EXIT INT TERM
-# Hand over to reason-network: it asks a few questions (name, invite code, which agents) in your terminal. Under
+# Hand over to reason-network: on its own (without Reason sign-in), it asks a few questions in your terminal. Under
# `curl | sh` our stdin is the script, so read answers from the terminal itself when there is one.
# (In a subshell: in dash, Ubuntu's sh, a failed redirection on `:` would end the whole script.)
if [ -z "${REASON_NETWORK_NO_PROMPT:-}" ] && (exec </dev/tty) 2>/dev/null; then
diff --git a/src/main.rs b/src/main.rs
index f0fadef..65b9eb3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -74,7 +74,7 @@ impl std::fmt::Display for Engine {
}
}
-/// The one line that installs Reason Network on its own (no account needed) and runs `reason-network <args>`: for
+/// The one line that installs this engine on its own (without signing in to Reason) and runs `reason-network <args>`: for
/// macOS and Linux, and for Windows.
pub fn install_lines(args: &str) -> [String; 2] {
let base = format!("https://github.com/{REPO}/releases/latest/download");
@@ -463,10 +463,7 @@ async fn cli(cmd: Cmd) -> Result<()> {
let line = invite_line(&l.url);
let copied = wizard::interactive() && wizard::copy(&line);
println!("Team link for {}{}:\n\n{line}\n", l.team, if copied { " (on your clipboard)" } else { "" });
- println!("Anyone with it can join: it opens a page with one command. `{CLI} link --new` replaces it.");
- if managed() {
- println!("Teammates in your Reason workspace just run `reason network`; the link is for anyone else.");
- }
+ println!("Whoever pastes this line to their coding agent joins the team. `{CLI} link --new` replaces it.");
}
Cmd::Invite { me: false, code: false, .. } => Box::pin(cli(Cmd::Link { new: false, json: false })).await?,
Cmd::Setup { dry_run: false, remove: false, no_service: false } if wizard::interactive() => {
@@ -529,12 +526,16 @@ async fn cli(cmd: Cmd) -> Result<()> {
Cmd::Invite { me, hours, .. } => {
let i: InviteInfo = link.call(Request::Invite { me, hours: hours.clamp(1, 24 * 30) }).await?;
let who = if me { "another machine of yours" } else { "a teammate" };
- println!("Invite code for {who}: {}\n", i.code);
+ println!("One-time code for {who}: {}\n", i.code);
let [unix, windows] = install_lines(&i.code);
- if managed() && !me {
- println!("Teammates in your Reason workspace just run `reason network`. Anyone else:\n");
+ if !me {
+ println!(
+ "To invite people, the invite line is better: `{CLI} link` gives it (Join the Reason Network: <link>).\n"
+ );
}
- println!("They run this, which installs Reason Network (no account needed) and joins the team:\n");
+ println!(
+ "With the code, they run this, which installs the Reason Network engine and joins (their name unverified):\n"
+ );
println!(" {unix}\n");
println!("On Windows, in PowerShell:\n\n {windows}\n");
println!(
diff --git a/src/skill.md b/src/skill.md
index a3ba8a3..55505cf 100644
--- a/src/skill.md
+++ b/src/skill.md
@@ -9,6 +9,12 @@ Reason Network connects coding agents across a team's machines. Every session on
live directory, and any of them can message another. Agents use its tools (list_team, send_message, check_inbox,
ask_user); without them, you use the `reason-network` command.
+## Joining
+
+To join, or to set up Reason Network on a computer, follow https://reasonmachines.com/network: your user signs in
+there, and gets their network and its invite line, `Join the Reason Network: <link>`, which anyone pastes to their agent
+to join.
+
## Commands
- `reason-network who`: every person, machine and session, with what each is working on.
diff --git a/src/wizard.rs b/src/wizard.rs
index 727c25f..ccd89be 100644
--- a/src/wizard.rs
+++ b/src/wizard.rs
@@ -252,12 +252,9 @@ pub async fn show_link(new: bool) -> Result<String> {
note(
title,
format!(
- "Send it to your friends: one paste and their name, and they're in.\nIt works for everyone until `{CLI} link --new`."
+ "Send it as the invite line, Join the Reason Network: <link>: whoever pastes it to their agent joins.\nIt works for everyone until `{CLI} link --new`."
),
)?;
- if crate::managed() {
- log::info("Teammates in your Reason workspace just run `reason network`; the link is for anyone else.")?;
- }
Ok(l.url)
}
diff --git a/tests/e2e/two_machines.py b/tests/e2e/two_machines.py
index e898ede..2475a3f 100644
--- a/tests/e2e/two_machines.py
+++ b/tests/e2e/two_machines.py
@@ -208,7 +208,7 @@ if len(sock_path) < 100: # longer ones get a hashed name elsewhere (see paths::
and "is already in this team" in reply.get("error", ""), reply)
else:
check("the socket's path is short enough to reach (set TMPDIR shorter)", False, sock_path)
-code = re.search(r"Invite code for a teammate: ([a-z]+(?:-[a-z]+){3})", cli("alex", "invite", "--code"))
+code = re.search(r"One-time code for a teammate: ([a-z]+(?:-[a-z]+){3})", cli("alex", "invite", "--code"))
_, out = run(mal, "join", code.group(1), "--proof", proof("u_mallory", "mallory", mal_ep), "--no-setup")
check("a sign-in joins only with a link, never a four-word code", "not a four-word code" in out and "Joined" not in out, out)
run(mal, "stop")
@@ -241,7 +241,7 @@ subprocess.run([BIN, "stop"], env=sam, capture_output=True)
os.makedirs(os.path.join(D, "bob"), exist_ok=True)
bob = dict(env("alice"), REASON_NETWORK_HOME=os.path.join(D, "bob"), REASON_NETWORK_MACHINE="nuc")
out = cli("alex", "invite", "--code")
-code = re.search(r"Invite code for a teammate: ([a-z]+(?:-[a-z]+){3})", out)
+code = re.search(r"One-time code for a teammate: ([a-z]+(?:-[a-z]+){3})", out)
check("invite --code prints a four-word code", bool(code), out)
r = subprocess.run([BIN, "join", code.group(1).replace("-", " ").upper(), "--as", "bob", "--no-setup"], env=bob,
capture_output=True, text=True, timeout=90)