on 514b5fc help sign in
urbit.org/content/using/os/messaging.md
254 lines 6.6 kB history raw
1+++
2title = "Messaging"
3template = "doc.html"
4weight = 2
5+++
7Let’s get started using the `:chat-cli` application, also known more simply as
8_Chat_. It's the simplest way to talk to people using the command line
9interface.
11### Quickstart
13The most common use for `:chat-cli` right now is, of course, communicating in group chats.
15### Joining a chat
17In `:chat-cli`, any kind of medium for a message is called a _chat_. There are four "types" of chats, 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 [chat management](#chat-management) section later on.
19Join the Urbit Community from Dojo using `:group-view &group-view-action [%join [~bitbet-bolbel %urbit-community] ~bitbet-bolbel]`. Once you've joined, join the General chat from chat-cli. Use `ctrl-x` to switch from the Dojo prompt to the Chat prompt.
21Then:
23```
24~sampel-palnet:chat-cli/ ;join ~darrux-landes/general
25```
27Now that you're in, try post a line to `~darrux-landes/general`:
29```
30~sampel-palnet:chat-cli= Hello, world!
31```
33You'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:
35```
36~sampel-palnet:chat-cli= ;chats
37~darrux-landes/general
38```
40Glyphs 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.
42```
43~sampel-palnet:chat-cli= ;+
44~sampel-palnet:chat-cli+
45```
47Use `;leave` to unsubscribe from a channel:
49```
50~sampel-palnet:chat-cli= ;leave ~darrux-landes/general
51```
53Now, let's create a channel we can invite some friends to:
55```
56~sampel-palnet:chat-cli= ;create channel /my-channel
57```
59Now you can tell your friends to `;join ~your-urbit/my-channel`.
61In order to see messages in `:chat-cli` you may need to do the following in Dojo:
63```
64:chat-cli %connect
65```
66 ### Creating and managing chats {#chat-management}
68As 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.
70#### Create
72Syntax: `;create [type] /name +`, where `+` represents an optional glyph.
74Creates and joins a chat, where `[type]` is any of the following:
75- `channel`: public chat. Has a blacklist for write control.
76- `village`: invite-only chat.
77- `journal`: publicly readable, invite-only for writing.
78- `mailbox`: publicly writeable, invite-only for reading.
80Let's create an example mailbox:
82```
83~sampel-palnet:chat-cli> ;create mailbox /coolbox ^
84```
86#### Delete
88Syntax: `;delete /name`
90Deletes a chat.
92#### Permission management
94You can permit and ban people from reading and/or writing to the chats you host, using `;invite` and `;banish` command respectively.
96Syntax: `;invite [rw] /name ~ships`
98Where `rw` is either `r`, `w`, or `rw`, representing "read" and "write" permissions.
99And where `~ships` is a comma-seperated list of ships to invite.
101For example, to grant two people full access to a `village` we created:
103```
104~sampel-palnet:chat-cli> ;invite rw /hidden-village ~ravmel-ropdyl, ~rapfyr-diglyt
105```
107Similarly, if we later want to revoke the writing permissions for one of them, but still allow them to read new messages, we can run:
109```
110~sampel-palnet:chat-cli> ;banish w /hidden-village ~rapfyr-diglyt
111```
113#### Chat glyphs
115Glyphs are found at the end of your prompt, as a quick indicator of where
116your messages will be sent.
118Glyphs are assigned by chat hash out of the following list:
120```
121! @ # $ % ^ & ( ) - = _ + [ ] { } ; ' \ : " , . < > ?
122```
124Alphanumeric characters and `|#/*~` are reserved; all others can be manually assigned.
126For example, `-` the glyph at the end of the prompt below might indicates that
127messages sent from this prompt will go to some chat with that glyph:
129```
130~sampel-palnet:chat-cli-
131```
133To see what chat is bound to a glyph, use the `;what` command followed by the
134glyph in question, or use `;what` without specifying a glyph to see all of your
135subscriptions which are bound to glyphs. For example, to see `=`:
137```
138~sampel-palnet:chat-cli> ;what =
139~dopzod/urbit-help
140```
142To see all of your glyph bindings:
144```
145~sampel-palnet:chat-cli> ;what
146> ~paldev/numismatic-forum
147. ~middev/ny-martians
148= ~dopzod/urbit-help
149```
151When the messaging target doesn't have a glyph, we see their name at the end of
152the prompt instead. Here we're talking into `~dannum-mitryl/homework`:
154```
155~sampel-palnet:chat-cli[~dannum-mitryl/homework]
156```
158#### Bind
160Syntax: `;bind [glyph] ~host/chat-name`
162Assigns the chosen glyph to a chat.
164For example:
166```
167~sampel-palnet:chat-cli> ;bind + ~dopzod/urbit-help
168```
170#### Unbind
172Syntax: `;unbind [glyph] ~host/chat-name`
174Unassigns the chosen glyph from a chat owned by your ship.
176For example:
178```
179~sampel-palnet:chat-cli> ;unbind + ~dopzod/urbit-help
180```
182If you don't specify a chat, all bindings for that glyph are removed.
184#### Prefixes
186Received posts are prefixed with a glyph to let you know what the
187audience is. You can activate an individual post to see the full
188audience.
190There are a few special-purpose "glyphs":
192- `|` - Informational messages
193- `*` - Posts to a target you don't have a glyph binding for
196### Configuration
198#### Set audience
200`;~ship/chat`
202Set audience to `~ship/chat`.
204#### Set audience by glyph
206Syntax: `;[glyph]`
208Set audience to the chat previously bound to the chosen glyph.
210#### Set audience to own chat
212Syntax: `;/chat`
214Set audience to a chat on your own ship.
216### Miscellaneous configuration
218#### Change timezone
220Syntax: `;set timezone [+/-][hours]`
222Adjust the display of timestamps to a specific timezone. Relative to UTC.
224#### Set width
226Syntax: `;set width [number]`
228Set the rendering width of `:chat-cli` to a specific number of characters.
229(Minimum of 30.)
231#### Show timestamps
233Syntax: `;set showtime`
235Show the timestamp for each message. This is set by default.
237#### Hide timestamps
239Syntax: `;unset showtime`
241Stop showing the timestamp for each message.
243#### Sound notification on
245Syntax: `;set notify`
247Emit a terminal bell sound if your six-syllable ship name is mentioned in
248a message. This is set by default.
250#### Sound notification off
252Syntax `;unset notify`
254Do not notify when your ship name is mentioned.