Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Project516/p2p-chat/llms.txt

Use this file to discover all available pages before exploring further.

Once you are connected to a peer, p2p-chat gives you a small set of slash commands to control your session. Any text that does not begin with a / is treated as a regular message and sent to the other participant. Your display name defaults to friend when a session starts.

/nick — change your display name

Syntax
/nick <nickname>
What it doesUpdates your local display name and broadcasts an alert to your peer so they see the change in their terminal. All subsequent messages you send use the new name.Example
/nick alice
Output seen by both sides:
! friend changed their nickname to alice
Error cases
SituationOutput
No name provided (/nick alone, or fewer than 7 characters total)Usage: /nick <nickname>
Name consists entirely of whitespaceNickname cannot be empty.
The minimum input length check is len(text) < 7, which means /nick (with a trailing space but no name) also triggers the usage error.
Syntax
/quit
What it doesSends a leave notification to your peer, prints Disconnecting... locally, then exits the process.Example
/quit
Your terminal:
Disconnecting...
Your peer’s terminal:
!alice left the chat
Always use /quit to end a session gracefully. Closing the terminal window abruptly will leave your peer waiting without a leave notification.
Syntax
/help
What it doesPrints the command reference locally. Nothing is sent to your peer.Output
! help menu:
! run /nick to change nickname
! run /quit to leave chat
! run /version to display program version
! run /help to display this menu

>
Syntax
/version
What it doesReads the version string from the embedded version file and prints it locally. Nothing is sent to your peer.Output
p2p version: 1.0.0
The exact version string depends on the build.
Syntax
<any text not starting with />
What it doesSends the text to your peer, prefixed with your current display name and a > separator. The default name before any /nick command is friend.ExampleIf your nick is alice and you type hello there, your peer sees:
alice> hello there
Default nicknameUntil you run /nick, your name is friend:
friend> hello there

Command summary

CommandSent to peerExits process
/nick <name>Yes — broadcasts name-change alertNo
/quitYes — broadcasts leave messageYes
/helpNoNo
/versionNoNo
Regular messageYesNo

Build docs developers (and LLMs) love