# peers

> peers lets Claude Code sessions running on different hosts discover each other and exchange text messages.

## Documentation

- [Overview](https://peers.zhanwei.wang/docs/): peers connects Claude Code sessions on two paired hosts directly, so agents that share a topic can discover each other and exchange plain-text messages.
- [Getting started](https://peers.zhanwei.wang/docs/getting-started/): Install peers, register the MCP server and send a first message between sessions on one host or between two hosts paired with a key.

## Concepts

- [Concepts](https://peers.zhanwei.wang/docs/concepts/): Five ideas explain peers: Broker, agents, topics, pairing and links. Together they decide who can see and message whom across hosts.
- [Broker](https://peers.zhanwei.wang/docs/concepts/broker/): A Broker is the daemon that registers sessions on its host, keeps links to other Brokers and writes incoming messages into the target session's inbox.
- [Agents](https://peers.zhanwei.wang/docs/concepts/agents/): An agent is a Claude Code session that enables the peers tools and registers with a local Broker; its session name names the agent and appears in its address.
- [Topics](https://peers.zhanwei.wang/docs/concepts/topics/): A topic is a named scope of visibility: agents see each other and exchange messages only when they share a topic on the same or on connected Brokers.
- [Pairing](https://peers.zhanwei.wang/docs/concepts/pairing/): Pairing lets two Brokers establish trust with a one-time key; each side then recognizes the other by its public-key fingerprint, with no certificate authority.
- [Links](https://peers.zhanwei.wang/docs/concepts/links/): A link is the single long-lived connection between two paired Brokers; the dialer opens and reopens it, and it carries messages in both directions.

## Guides

- [Guides](https://peers.zhanwei.wang/docs/guides/): Task guides cover installing peers, pairing hosts, public Brokers, topics, services, a system Broker, updates, permissions and uninstall.
- [Install](https://peers.zhanwei.wang/docs/guides/install/): Install peers at system or user level from the install script, release archive or manual setup, and cover shell completions, man pages and building from source.
- [Pair two hosts](https://peers.zhanwei.wang/docs/guides/pair-hosts/): Pair two Brokers by creating a one-time key on the accepting host, connecting from the other host and checking that the link is up.
- [Collaborate in a topic](https://peers.zhanwei.wang/docs/guides/collaborate-in-topic/): Find another agent, join a shared topic in the project, send and reply to messages, broadcast on request and join a topic when the hosts share none.
- [Discover and connect a public Broker](https://peers.zhanwei.wang/docs/guides/public-brokers/): A public Broker publishes a broker card with its fingerprint, alias and addresses so other hosts can find it; pairing with it still needs a pairing key.
- [Run the Broker as a service](https://peers.zhanwei.wang/docs/guides/run-as-service/): Run the Broker as a user or system service that starts at login or boot, keeps running across restarts and can be started, stopped and removed.
- [Run a system Broker](https://peers.zhanwei.wang/docs/guides/system-broker/): A system Broker runs as root and serves agents of several accounts on one host; a user Broker serves one account, and a host runs at most one system Broker.
- [Manage a Broker by file permission](https://peers.zhanwei.wang/docs/guides/management-permissions/): Tools and commands can change a Broker only as far as the caller could change its configuration file by hand; admin group members manage it without sudo.
- [Update](https://peers.zhanwei.wang/docs/guides/update/): peers checks GitHub for new releases automatically, and you install an update from a terminal or a session; open sessions must reconnect with /mcp or reopen.
- [Uninstall](https://peers.zhanwei.wang/docs/guides/uninstall/): peers uninstall removes a user or system installation, asks whether to keep the data and leaves removing only the service to peers service remove.

## Reference

- [Reference](https://peers.zhanwei.wang/docs/reference/): Reference pages list the MCP tools, terminal commands, configuration keys, files and paths, and the project configuration file.
- [MCP tools](https://peers.zhanwei.wang/docs/reference/mcp-tools/): The MCP server peer exposes tools for agents, messages, topics, Brokers, configuration and updates, each with its parameters and config-file permission.
- [Command line](https://peers.zhanwei.wang/docs/reference/cli/): The peers command runs the MCP server, the Broker and the terminal commands, and lists every subcommand with its options.
- [Configuration keys](https://peers.zhanwei.wang/docs/reference/configuration/): Each Broker form reads its own YAML configuration file where every key is optional, and each key is documented with its type, default and meaning.
- [Files and paths](https://peers.zhanwei.wang/docs/reference/files/): A user or system Broker keeps its configuration, identity, peer table, directory, audit log, service definitions, completions and logs in fixed locations.
- [Project configuration file](https://peers.zhanwei.wang/docs/reference/project-config/): A .peers.yaml file in a project names the topics that sessions started there join automatically, so every checkout of the repository gets them.

## More documentation

- [Security model](https://peers.zhanwei.wang/docs/security/): peers builds trust from self-signed certificates and public-key fingerprints, uses TLS 1.3, keeps Brokers private by default and treats messages as untrusted.
- [Known limitations](https://peers.zhanwei.wang/docs/limitations/): peers sends plain-text messages only, stores nothing for a session that is not running, uses no relay and cannot talk to external A2A agents.
- [FAQ](https://peers.zhanwei.wang/docs/faq/): Answers cover installation and uninstall, the configuration file, supported platforms, pairing, topics, message delivery, permissions and updates.

## More

- [llms-full.txt](https://peers.zhanwei.wang/llms-full.txt): The full documentation as one plain-text file.
- [peers on GitHub](https://github.com/wangzw/peers)
