on 39bc0ab help sign in
urbit.org/using/messaging.md
315 lines 7.8 kB history raw
1+++
2title = "Messaging"
3weight = 2
4template = "doc.html"
5+++
7Chat (also called "chat-cli") is the built-in messaging app for Urbit.
9For the time being come join us in `~dopzod/urbit-help` by using the
10'quickstart' section below. `~dopzod` is the host ship, and `/urbit-help` is the
11channel on that ship.
13### Quickstart
15The most common uses of `:chat-cli` right now are communicating over a public chat channel on `~dopzod/urbit-help`, and sending direct messages. Everyone is more than welcome in `~dopzod/urbit-help`. It's the place to get help, ask questions and chat about Urbit in general.
17There are two ways of using `:chat-cli`: from the terminal running the Urbit process, or through the Landscape web UI available from your ship’s URL address, mentioned earlier in this guide.
19### Joining a chat
21In `:chat-cli`, any kind of medium for a message is called a _chat_. There are four types of chats: the _channel_ (public with blacklist), _village_ (private with whitelist), the _journal_ (publicly readable, privately writable), and the _mailbox_ (privately readable, publicly writable). But for now we'll be dealing with the _channel_, a publicly accessible chatroom for general use. We'll discuss the other three kinds in the [manual](#messaging-manual) section later on.
23Let's join the `~dopzod/urbit-help` channel. Use `ctrl-x` to switch from the Dojo prompt to the Chat prompt.
25Then:
27```
28~your-urbit:chat-cli> ;join ~dopzod/urbit-help
29```
31Scrolling down your terminal window, you'll probably see a playback of previous `~dopzod/urbit-help` messages that you missed. You c
33Post a line to `~dopzod/urbit-help:`
35```
36~your-urbit:chat-cli= Hello, world!
37```
39You'll see your message printed below messages from others that came before it. You can always type `;chats` in the `chat-cli` prompt to list all the chats you're in:
43Glyphs will be automatically assigned to channels, but have the option of binding a glyph (single non-alphanumeric character) to the channel you're joining; the syntax is in the form of `;join ~dopzod/books +`. The chosen glyph will be the symbol that ends your prompt, and it will be what you use as a shortcut to switch to this channel.
45```
46~your-urbit:chat-cli= ;+
47~your-urbit:chat-cli+
48```
50Use `;leave` to unsubscribe from a channel:
52```
53~your-urbit:chat-cli= ;leave ~dopzod/urbit-help
54```
56Now, let's create a channel we can invite some friends to:
58```
59~your-urbit:chat-cli= ;create channel /my-channel
60```
62Now you can tell your friends to `;join ~your-urbit/my-channel`.
64### Direct messaging
66To send a direct message to someone, first set your audience:
68```
69~your-urbit:chat-cli= ;~talsur-todres
70```
72You'll see your prompt change:
74```
75~your-urbit:chat-cli[~talsur-todres]
76```
78Now you and `~talsur-todres` can exchange messages directly.
80```
81~your-urbit:chat-cli[~talsur-todres] Hey buddy!
82```
84To set your audience back to `~dopzod/urbit-help`:
86```
87~your-urbit:chat-cli[~talsur-todres] ;~dopzod/urbit-help
88```
90You'll see your prompt change back:
92```
93~your-urbit:chat-cli=
94```
96#### Hoon
98You can use Chat to evaluate Hoon code and share the results with everyone in a chat. To do so, preface your Hoon with `#`.
100```
101~your-urbit:chat-cli= #(add 2 2)
102```
104will print as
106```
107~your-urbit# (add 2 2)
109```
111### Creating and managing chats
113As mentioned before, any urbit can host any number of chats. Existing chats can be deleted or modified with various commands. All commands in this section should be sent from the `chat-cli>` prompt.
115#### Create
117Syntax: `;create [type] /name +`, where `+` represents an optional glyph.
119Creates and joins a chat, where `[type]` is any of the following:
120- `channel`: public chat. Has a blacklist for write control.
121- `village`: invite-only chat.
122- `journal`: publicly readable, invite-only for writing.
123- `mailbox`: publicly writeable, can only be read by its host.
125Let's create an example mailbox:
127```
128sampel-palnet:chat-cli> ;create mailbox /coolbox ^
129```
131#### Delete
133Syntax: `;delete /name`
135Deletes a chat.
137### Status
139You'll see status notifications when people enter or leave chats you're subscribed to.
141#### Notifications off
143Syntax: `;set quiet`
145Turn off status (and config) notifications.
147#### Notifications on
149Syntax: `;unset quiet`
151Turn on status (and config) notifications.
153#### Chat glyphs
155Glyphs are found at the end of your prompt to as a quick indicator of where
156your messages will be sent.
158Glyphs are assigned by chat hash out of the following list:
160```
161> = + - } ) , . " ' ^ $ % & @
162```
164Alphanumeric characters and `|#;:*~_` are reserved; all others (the
165above list, and `\/!?({<`) can be manually assigned.
167For example, `-` the glyph at the end of the prompt below might indicates that
168messages sent from this prompt will go to some chat with that glyph:
170```
171~sampel-palnet:chat-cli-
172```
174To see what chat is bound to a glyph, use the `;what` command followed by the
175glyph in question, or use `;what` without specifying a glyph to see all of your
176subscriptions which are bound to glyphs. For example, to see `=`:
178```
179~sampel-palnet:chat-cli> ;what =
180~dopzod/urbit-help
181```
183To see all of your glyph-bound subscriptions:
185```
186~sampel-palnet:chat-cli> ;what
187> ~paldev/numismatic-forum
188. ~middev/ny-martians
189= ~dopzod/urbit-help
190```
192Not every audience has a glyph, however. When the audience doesn't have a glyph,
193such as in the case of direct-messaging a ship, we see their name at the end of
194the prompt instead. Here we're talking directly to `~dannum-mitryl`:
196```
197~sampel-palnet:chat-cli[~dannum-mitryl]
198```
200#### Bind
202Syntax: `;bind [glyph] /chat-name`
204Assigns the chosen glyph to a chat owned by your ship.
206For example:
208```
209~sampel-palnet:chat-cli> ;bind + /my-chat
210```
212#### Unbind
214Syntax: `;unbind [glyph] /chat-name`
216Unassigns the chosen glyph from a chat owned by your ship.
218For example:
220```
221~sampel-palnet:chat-cli> ;unbind + /my-chat
222```
224#### Prefixes
226Received posts are prefixed with a glyph to let you know what the
227audience is. You can activate an individual post to see the full
228audience.
230There are a few special-purpose glyphs:
232- `|` - Informational messages
233- `:` - Posts directly to you
234- `;` - Posts to you and others (a multiparty conversation)
235- `*` - Posts to a complex audience that doesn't directly include you.
238### Configuration
240#### Set audience
242`;~ship/chat`
244Set audience to `~ship/chat`.
246#### Set audience by glyph
248Syntax: `;[glyph]`
250Set audience to the chat previously bound to the chosen glyph.
252#### Set audience to ship
254syntax `;~ship`
256Set audience to another ship.
258#### Set audience to own chat
260Syntax: `;%chat`
262Set audience to a chat on your own ship.
264#### Set audience and send message
266Syntax: `;~dannum-mitryl this is a private message`
268Set the audience and send a post in the same line. This works for all of the
269above audience commands.
271Your audience is configured with regard to the following rules (in order):
273- if you manually set the audience, that audience.
274- if you activated a post, the post you activated.
275- audience of the last post sent.
277### Miscellaneous configuration
279#### Show timestamps
281Syntax: `;set showtime`
283Show the timestamp for each message. This is set by default.
285#### Hide timestamps
287Syntax: `;unset showtime`
289Stop showing the timestamp for each message.
291#### Change timezone
293Syntax: `;set timezone [+/-][hours]`
295Adjust the display of timestamps to a specific timezone. Relative to UTC.
297#### Sound notification on
299Syntax: `;set notify`
301Emit a terminal bell sound if your six-syllable ship name is mentioned in
302a message. This is set by default.
304#### Sound notification off
306Syntax `;unset notify`
308Do not notify when your ship name is mentioned.
310#### Set width
312Syntax: `;set width [number]`
314Set the rendering width of `:chat-cli` to a specific number of characters.
315(Minimum of 30.)