Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `install.sh` no longer reports an unwritable `TMPDIR` as a failed verification or falls back to npm when it cannot create a temp file.
- `install.sh` now also installs the short `relay` command next to `agent-relay` (same CLI), so `relay init` works right after a curl install. An existing `relay` from another tool is left alone with a warning, and `agent-relay uninstall` removes `relay` only when the installer wrote it.
- `relay init` no longer switches the machine-wide active workspace away from one already in use: it saves the new workspace for the current project, keeps the existing active one, and prints `relay workspace switch <name>` to make it the default.
- `relay init` asks nothing by default, in a terminal too: this machine (or `--hosted`, or `--url`/`--key`), every installed agent tool, global scope, then a summary of what it chose and the flag that changes each. `relay init --interactive` (`-i`) asks each step as before; `--yes` is still accepted and changes nothing.
- `relay init --key <key>` joins the hosted workspace that key belongs to, under the name the server gives it (`--url` still selects your own server; a key bound to another server is refused). `relay init --hosted` names a new workspace after you and the folder unless you pass `--name`, and prints `npx -y agent-relay@next init --key '<key>'` for teammates (`agent-relay@<version>` from a stable release), which joins and sets up message injection in one step (the `relay workspace join` it printed only saved the workspace). Joining reports the hosted workspace instead of "your server", and `relay workspace join` now points at `relay init`.
- `relay init` no longer writes npx's temporary cache path into agent tool configs. Project configs (`.mcp.json` and the like) run `agent-relay mcp` by name, or `npx -y agent-relay@<version> mcp` when Relay is not installed, so they work on teammates' machines. Re-running `relay init` updates entries it wrote earlier.
- `relay init --scope project` now tells the truth about Codex: Codex loads `.codex/config.toml` only when that exact project is trusted in `~/.codex/config.toml` (a trusted parent folder does not count, and `codex exec` never asks). In a terminal, `relay init` offers to record that trust; with `--yes` it prints the lines to add.
- The project workspace key file (`.agentworkforce/relay/workspace-key.json`) is no longer picked up by `git add -A`: any command that saves it adds `.agentworkforce/relay/` to `.git/info/exclude` (worktrees included), never to `.gitignore`.
Expand Down
49 changes: 34 additions & 15 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,22 @@ cd my-project
relay init
```

In a terminal it asks four questions, the same way `npx skills add` does:
It asks nothing. It starts a private server on this machine, connects every
agent tool installed here, at global scope, and ends with what it chose and
the flag that changes each choice:

```
Chosen without asking:
Server: this machine (--hosted for agents on other machines, or --url and --key for your own server)
Tools: claude, codex (the ones installed here; --tools to choose)
Scope: global (--scope project for this project only)
To choose each step yourself, run: relay init --interactive
```

### Choosing each step (`--interactive`)

`relay init --interactive` (or `-i`) asks four questions in a terminal, the
same way `npx skills add` does:

```
┌ relay init
Expand Down Expand Up @@ -92,9 +107,9 @@ Claude Code asks you to approve a project `.mcp.json` server the first time it
opens the folder. Pi reads `.pi/mcp.json` only once you trust the project, which
it asks about on first run. Codex reads `.codex/config.toml` only when that
exact project (its git root) is trusted in `~/.codex/config.toml`; a trusted
parent folder does not count, and `codex exec` never asks. In a terminal
`relay init` offers to record that trust for you; with `--yes` it prints the
lines to add instead.
parent folder does not count, and `codex exec` never asks. With
`--interactive`, `relay init` offers to record that trust for you; otherwise
it prints the lines to add.

In a git repository, `relay init` keeps `.agentworkforce/relay/` (which holds
the project's workspace key) out of `git status` through `.git/info/exclude`;
Expand All @@ -109,15 +124,14 @@ active on this machine (for example one a fleet node uses), `relay init` leaves
it active and says so; run `relay workspace switch <name>` to make the new one
the default everywhere.

### Without prompts
### Flags

`relay init` asks nothing when stdin is not a terminal, or with `--yes`. It then
uses this machine, the agent tools it detects, and project scope, unless flags
say otherwise:
Flags change the defaults; `relay init` still asks nothing (and behaves the
same in CI or a pipe). `--yes` is accepted and changes nothing:

```bash
relay init --tools claude,codex --scope project --yes
relay init --hosted --tools all --scope global --yes
relay init --tools claude,codex --scope project
relay init --hosted --tools all
relay init --url https://relay.example.com:8443 --key <workspace-key> --tools none
```

Expand Down Expand Up @@ -152,15 +166,20 @@ agent can still choose its own name with the `register_agent` tool, and

## Across machines (hosted)

On the first machine, choose _Hosted_ in `relay init` (or run
`relay init --hosted`). It creates a hosted workspace and prints one command.
Run that command on each other machine, then `relay init` there to connect its
agent tools:
On the first machine, run `relay init --hosted`. It creates a hosted
workspace, named after you and the folder unless you pass `--name`, and prints
one command. Run that command in the project folder on each other machine; it
needs only Node.js. It joins the workspace under the name it has there and
connects that machine's agent tools, the same way `relay init` did on the
first one:

```bash
relay workspace join <name> <key>
npx -y agent-relay@next init --key '<key>'
```

With Relay installed, `relay init --key '<key>'` does the same. In Windows
Command Prompt, leave out the quotes around the key.

Treat the key like a password: anyone with it can join the workspace. The
hosted service has a free tier, enough to try agents across machines.

Expand Down
Loading
Loading