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 aDocumentation 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.
/ 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
/nick — change your display name
SyntaxWhat 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.ExampleOutput seen by both sides:Error cases
| Situation | Output |
|---|---|
No name provided (/nick alone, or fewer than 7 characters total) | Usage: /nick <nickname> |
| Name consists entirely of whitespace | Nickname 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./quit — leave the chat
/quit — leave the chat
SyntaxWhat it doesSends a leave notification to your peer, prints Your terminal:Your peer’s terminal:
Disconnecting... locally, then exits the process.Example/help — display the help menu
/help — display the help menu
/version — display program version
/version — display program version
SyntaxWhat it doesReads the version string from the embedded version file and prints it locally. Nothing is sent to your peer.OutputThe exact version string depends on the build.
Regular messages
Regular messages
SyntaxWhat it doesSends the text to your peer, prefixed with your current display name and a Default nicknameUntil you run
> separator. The default name before any /nick command is friend.ExampleIf your nick is alice and you type hello there, your peer sees:/nick, your name is friend:Command summary
| Command | Sent to peer | Exits process |
|---|---|---|
/nick <name> | Yes — broadcasts name-change alert | No |
/quit | Yes — broadcasts leave message | Yes |
/help | No | No |
/version | No | No |
| Regular message | Yes | No |