@@ -1,1439 +0,0 @@
1−+++
2−title = "Using Your Ship"
3−description = "How to operate your ship, including using your ship's filesystem and messaging applications, starting a moon, or requesting a DNS proxy."
4−template = "page_indiced.html"
5−weight = 2
6−aliases = ["docs/using/arvo-network-dns/", "docs/using/messaging/", "docs/using/shell/", "docs/using/admin/"]
7−[extra]
8−hidetitle = "true"
9−+++
10−
11−## Using your ship
12−
13−Your urbit (also called your _ship_) is a persistent Unix process that you mainly control from the console.
14−
15−### Shutdown
16−
17−You can turn your urbit off with `Ctrl-d` from the Chat or Dojo prompts.
18−
19−You can force-quit your urbit with `Ctrl-z` from anywhere.
20−
21−### Restart
22−
23−To restart your urbit simply pass the name of your pier:
24−
25−```sh
26−$ ./urbit some-planet
27−```
28−
29−or
30−
31−```sh
32−$ ./urbit comet
33−```
34−
35−### Logging
36−
37−To log an urbit's command line output to a file, use `script`:
38−
39−```sh
40−$ script urbit.log ./urbit your-urbit
41−```
42−
43−### Moving your pier
44−
45−Piers are designed to be portable, but it _must_ be done while the urbit
46−is not running. Urbit networking is stateful, so you can't run two copies
47−of the same urbit in two places.
48−
49−To move a pier, simply move the contents of the directory it lives in.
50−To keep these files as small as possible we usually use the `--sparse`
51−option in `tar`. With a pier `your-urbit/`, something like this should work:
52−
53−```sh
54−tar -Scvzf ~/your-urbit.tar.gz ~/your-urbit/
55−scp your-old-server:~/your-urbit.tar.gz your-new-server:~
56−```
57−
58−Then to unzip it, on your other Unix server, run:
59−
60−```sh
61−tar xfvz your-urbit.tar.gz
62−```
63−
64−Delete the tar file, and, after installing Urbit on your new server, start your urbit back up with:
65−
66−```sh
67−./urbit your-urbit
68−```
69−
70−### Console
71−
72−Your Urbit terminal is separated into two parts: the prompt (the bottom line) and the record (everything above that). The record is shared; all the output from all the apps in your command set appears in it. The prompt is multiplexed.
73−
74−In the CLI, Urbit apps can process your input before you hit return. To see this in action try entering `)` as the first character at the Dojo prompt. Since there is no Dojo command or Hoon expression that starts with ')', the Dojo rejects it.
75−
76−`Ctrl-x` - Switches the prompt between running console apps
77−
78−`Ctrl-c` - Crash current event. Processed at the Unix layer and prints a stack
79−trace.
80−
81−`Ctrl-d` - From Chat or Dojo, stops your Urbit process.
82−
83−`Ctrl-z` - Stops the Urbit process from _anywhere_.
84−
85−`↑` / `↓` - History navigation
86−
87−The following emacs-style key bindings are available:
88−
89−```
90−Ctrl-a Cursor to beginning of the line (Home)
91−Ctrl-b Cursor one character backward (left-arrow)
92−Ctrl-e Cursor to the end of the line (End)
93−Ctrl-f Cursor one character forward (right-arrow)
94−Ctrl-g Beep; cancel reverse-search
95−Ctrl-k Kill to end of line
96−Ctrl-l Clear the screen
97−Ctrl-n Next line in history (down-arrow)
98−Ctrl-p Previous line in history (up-arrow)
99−Ctrl-r Reverse-search
100−Ctrl-t Transpose characters
101−Ctrl-u Kill to beginning of line
102−Ctrl-y Yank from kill buffer
103−```
104−
105−### Updates
106−
107−By default, you will automatically receive updates ([OTAs](@/docs/glossary/ota-updates.md)) from your sponsor. To check your OTA source, run `|ota` in the [dojo](@/docs/glossary/dojo.md).
108−
109−If for some reason (for example, if your sponsor is out of date), you can switch OTA sources by running `|ota ~otasrc %kids` in the dojo, where `~otasrc` is the ship from which you want to receive updates. It is a good idea to contact the source ship and ask permission to sync from them.
110−
111−If OTAs are not succeeding, or if you are on an version of Urbit before the `|ota` command was introduced, you can run `|merge %home (sein:title our now our) %kids, =gem %take-that`. **Note:** This will wipe out any custom changes to the base distribution.
112−
113−### Landscape
114−
115−On startup Urbit tries to bind to `localhost:80`. If you're already running something on port `80` -- such as any other HTTP server, or another urbit -- you'll find the urbit that you just started on `8080`, `8081`, and so on. For planets only, we also proxy web domains through Urbit's own servers. Any planet `~your-urbit` is also at `your-urbit.arvo.network`, but only after you [set up DNS](#dns-proxying).
116−
117−Once running, you can sign into Landscape, your ship’s web interface, from `http://localhost` or `https://your-urbit.arvo.network`. Since our HTTPS isn't audited / battle tested, we just call it "secure" HTTPS. You can find that on `8443`. Or `8444` (and so on) if you're already running something on `8443`.
118−
119−### Moons {#moons}
120−
121−Planets can spawn moons, which are meant for connected devices: phones, smart TVs, digital thermostats. The basic idea is that your planet runs permanently in a data center somewhere, while moons run on all your devices. Each planet can issue ~4 billion (`2^32`) moons.
122−
123−To generate a random moon from your planet, run:
124−
125−```
126−~sampel-palnet:dojo> |moon
127−moon: ~faswep-navred-sampel-palnet
128−\/0w5cT5t.wCO6i.~e1xg.Oz0qb.QNO6I.3Kt2T.h9M9F.U3vU~.X3Qu0.gtb19.IYTkY.80kWZ.SI\/
129− EUE.DXa8i.TiDof.o3-1C.RHLKS.k81M0.ecz5o.ic0Bg.600g1
130−\/ \/
131−```
132−
133−You must manually edit the output of `|moon` to get the correct format for the `<key>`:
134−
135−- strip out the `\/`
136−
137−- combine into one line, omitting spaces
138−
139−`<key>` would be `0w5cT5t.wCO6i.~e1xg.Oz0qb.QNO6I.3Kt2T.h9M9F.U3vU~.X3Qu0.gtb19.IYTkY.80kWZ.SIEUE.DXa8i.TiDof.o3-1C.RHLKS.k81M0.ecz5o.ic0Bg.600g1`
140−in this example.
141−
142−Put `<key>` in a file and that file becomes `<keyfile>`.
143−
144−You can use the resulting output in the same installation flow from the [Installing Urbit](@/using/install.md) guide, following the same scheme as for booting a planet. That scheme is:
145−
146−```sh
147−$ ./urbit -w <moonname> -G <key> -c <piername>
148−```
149−
150−or
151−
152−```sh
153−$ ./urbit -w <moonname> -k <keyfile> -c <piername>
154−```
155−
156−The `-c <piername>` argument is not required, but it is recommended; otherwise,
157−the resulting directory is a rather unwieldy moon name.
158−
159−Here's how an example moon might be booted:
160−
161−```sh
162−$ ./urbit -w faswep-navred-sampel-palnet -G <key> -c mymoon
163−```
164−
165−or
166−
167−```sh
168−$ ./urbit -w faswep-navred-sampel-palnet -k <keyfile> -c mymoon
169−```
170−
171−Moons are automatically synced to their parent `%kids` desk, and can control applications on their parent planet using `|link`.
172−
173−To breach a moon -- that is, to reset its presence on the network so that it's treated as a freshly spawned ship by others -- run from the parent ship:
174−
175−```
176−|moon-breach ~faswep-navred-sampel-palnet
177−```
178−
179−To cycle the keys of a moon without breaching, run:
180−
181−```
182−|moon-cycle-keys ~sampel-sipnym-wicdev-wisryt
183−```
184−
185−
186−### Escaping A Sponsor {#escape}
187−
188−To use the network as a planet or star, you must be sponsored by an active star
189−or galaxy, respectively. If your sponsor isn't suiting your needs, you can
190−escape to a different one. This can be done with
191−[Bridge](https://bridge.urbit.org/) following the instructions
192−[here](@/using/operations/using-bridge.md#escaping-your-sponsor).
193−
194−### Continuity breaches
195−
196−While the Urbit network is in this alpha state, we sometimes have to reboot the whole network. This happens either when major changes need to be shipped or we hit a bug that can't be fixed over the air.
197−
198−Because Urbit networking is stateful we call this a _continuity breach_. Everything has to be restarted from scratch. Your pier will continue to function after we have breached, but it won’t connect to the rest of the Urbit network.
199−
200−When this happens, back up any files you'd like to save, shut down your urbit, and recreate it (as if you were starting for the first time).
201−
202−### Life and rift number
203−
204−You can check your ship's _life_ and _rift_ number by running `+keys our` in
205−dojo. You can inspect another ship's life and rift number by running `+keys
206−~sampel-palnet`. For information on what life and rift are, see [Guide to Breaches](@/docs/tutorials/guide-to-breaches.md).
207−
208−## DNS proxying {#dns-proxying}
209−
210−We have a system that lets you request a domain name for your ship in the form of `ship.arvo.network`, where `ship` is your ship's name minus the `~`. This allows users to access their ships remotely using Landscape, our graphical web interface.
211−
212−Stars and planets follow the same process DNS proxying process, and galaxies have their own requirements. Moons and comets are not supported.
213−
214−### Planets and Stars
215−
216−For a planet or star's DNS proxying request to be made and fulfilled, they must be hosting their ship someplace with a public IP address, and its HTTP server must be listening on port 80.
217−
218−To get `ship.arvo.network` on a planet or star, you must set up DNS routing with its parent ship by starting the `:dns` app.
219−
220−To do so, simply run this command in your ship's Dojo, passing the IP address as an argument, using the .0.0.0.0 (`@if`) syntax. For example:
221−
222−```
223−> -dns-address &dns-address [%if .1.2.3.4]
224−```
225−
226−`:dns`, running locally, will make an HTTP request to that IP address on port 80 to confirm that it is itself available at that IP and port. If that fails, you'll receive a `%bail-early` message in `:chat-cli`; this request will retry a few times. If the self-check is successful, the request is relayed to `~zod`, and you'll receive a message saying, `request for DNS sent to ~zod`. Once `~zod` has acknowledged receipt of the request, your local `:dns` app will send a `:chat-cli` message saying `awaiting response from ~zod`.
227−
228−The request will be picked up shortly, and the `ship.arvo.network` DNS record will be set to the given IP address. Once that's set up, `~zod` will be notified and `~zod` will, in turn, notify your ship. That ship will now try to verify that it can reach itself on `ship.arvo.network` over port 80. If it can't, it'll send a message saying, `unable to access via ship.arvo.network`. If it can, it will configure itself with that domain and say `confirmed access via ship.arvo.network`.
229−
230−Great! You're set up now. Try accessing your `ship.arvo.network` in your browser to use Landscape; we recommend Chrome or Brave.
231−
232−### Galaxies
233−
234−Galaxies are already required to have separate DNS entry at galaxy.urbit.org. There's no automated process for getting that binding, so if you're a galaxy-holder, get in touch with us at support@urbit.org.
235−
236−There is a command for galaxies that will try to re-use their already-necessary Ames DNS entry for HTTPS:
237−
238−```
239−> -dns-auto
240−```
241−
242−This will make HTTP-requests to self-check availability over `galaxy.$AMES-DOMAIN` (currently galaxy.urbit.org), where `galaxy` is the galaxy's name minus the `~`.
243−
244−Otherwise, `-dns-auto` works the same as `:dns|ip` does with stars and planets: if it's available or unavailable, Chat messages, and so on.
245−
246−### More information
247−
248−Configuring a ship's domain causes the `:acme` app to request an HTTPS certificate for that domain from LetsEncrypt. Note that LetsEncrypt also requires that the HTTP server be listening on port 80. If the certificate request fails, `:acme` will send a `:chat-cli` message with an explanation. Once the certificate is successfully retrieved, `:acme` will install it, causing the HTTP servers to restart. A secure server will be started on port 443 (the HTTPS default) if it's available. Otherwise, it will try 8443, and then increment to the next port until it can successfully bind one.
249−
250−The built-in logic for listening on port 80 is similar. Urbit tries to bind port 80; if it cannot, it tries 8080, then increments until it can bind a port. Port 80 is available to unprivileged process on recent version of macOS. Otherwise, the process needs to either be run as root, or be given special permission (CAP\_NET_BIND on Linux).
251−
252−## Messaging {#messaging}
253−
254−Let’s get started using the `:chat-cli` application, also known more simply as _Chat_. It's the simplest way to talk to people using the command line interface.
255−
256−### Quickstart
257−
258−The most common use for `:chat-cli` right now is, of course, communicating in group chats.
259−
260−### Joining a chat
261−
262−In `: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.
263−
264−Join the Urbit Community from Dojo using `:group-store|join ~bitbet-bolbel/urbit-community`. Once you've joined, join the General chat from chat-cli. Use `ctrl-x` to switch from the Dojo prompt to the Chat prompt.
265−
266−Then:
267−
268−```
269−~sampel-palnet:chat-cli/ ;join ~darrux-landes/general
270−```
271−
272−Now that you're in, try post a line to `~darrux-landes/general`:
273−
274−```
275−~sampel-palnet:chat-cli= Hello, world!
276−```
277−
278−You'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:
279−
280−```
281−~sampel-palnet:chat-cli= ;chats
282−~darrux-landes/general
283−```
284−
285−Glyphs 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.
286−
287−```
288−~sampel-palnet:chat-cli= ;+
289−~sampel-palnet:chat-cli+
290−```
291−
292−Use `;leave` to unsubscribe from a channel:
293−
294−```
295−~sampel-palnet:chat-cli= ;leave ~darrux-landes/general
296−```
297−
298−Now, let's create a channel we can invite some friends to:
299−
300−```
301−~sampel-palnet:chat-cli= ;create channel /my-channel
302−```
303−
304−Now you can tell your friends to `;join ~your-urbit/my-channel`.
305−
306−In order to see messages in `:chat-cli` you may need to do the following in Dojo:
307−
308−```
309−:chat-cli %connect
310−```
311−
312−### Hoon
313−
314−You can use Chat to evaluate Hoon code and share the results with everyone in a chat. To do so, preface your Hoon with `#`.
315−
316−```
317−~sampel-palnet:chat-cli= #(add 2 2)
318−```
319−
320−This will print as:
321−
322−```
323−~sampel-palnet# (add 2 2)
324− 4
325−```
326−
327−### URLs
328−
329−To share a URL, send it as its own message, with no content before or after it.
330−
331−```
332−~sampel-palnet:chat-cli= https://urbit.org/
333−```
334−
335−This will print as:
336−
337−```
338−~sampel-palnet/ https://urbit.org/
339−```
340−
341−### Expanding messages
342−
343−In the case of URLs, they may be too long to display on a single message line. For Hoon code, the code or result could be big. In `:chat-cli`, these get shortened when initially printed out. To view the entire contents, you can select the message in various ways.
344−
345−```
346−~sampel-palnet+ some message
347−----------[240]
348−~sampel-palnet+ let's try selecting this message!
349−~sampel-palnet+ another message
350−~sampel-palnet:chat-cli=
351−```
352−
353−In the above example, we can select the middle message by issuing any of the following command:
354−
355−```
356−;240
357−;40
358−;;
359−```
360−
361−`;n` looks for the last message whose sequence number ends in `n`. `;;` simply picks the second-to-last message.
362−
363−Detailed message output will look something like this:
364−
365−```
366−? 240
367− 0v5.g7r7l.n0d7m.mp4bn.gp6vr.sm5lj at ~2019.10.17..22.08.27..8a03
368− ~sampel-palnet
369− to ~dopzod/urbit-help
370−let's try selecting this message!
371−```
372−
373−### Creating and managing chats {#chat-management}
374−
375−As 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.
376−
377−#### Create
378−
379−Syntax: `;create [type] /name +`, where `+` represents an optional glyph.
380−
381−Creates and joins a chat, where `[type]` is any of the following:
382−- `channel`: public chat. Has a blacklist for write control.
383−- `village`: invite-only chat.
384−- `journal`: publicly readable, invite-only for writing.
385−- `mailbox`: publicly writeable, invite-only for reading.
386−
387−Let's create an example mailbox:
388−
389−```
390−~sampel-palnet:chat-cli> ;create mailbox /coolbox ^
391−```
392−
393−#### Delete
394−
395−Syntax: `;delete /name`
396−
397−Deletes a chat.
398−
399−#### Permission management
400−
401−You can permit and ban people from reading and/or writing to the chats you host, using `;invite` and `;banish` command respectively.
402−
403−Syntax: `;invite [rw] /name ~ships`
404−
405−Where `rw` is either `r`, `w`, or `rw`, representing "read" and "write" permissions.
406−And where `~ships` is a comma-seperated list of ships to invite.
407−
408−For example, to grant two people full access to a `village` we created:
409−
410−```
411−~sampel-palnet:chat-cli> ;invite rw /hidden-village ~ravmel-ropdyl, ~rapfyr-diglyt
412−```
413−
414−Similarly, if we later want to revoke the writing permissions for one of them, but still allow them to read new messages, we can run:
415−
416−```
417−~sampel-palnet:chat-cli> ;banish w /hidden-village ~rapfyr-diglyt
418−```
419−
420−#### Chat glyphs
421−
422−Glyphs are found at the end of your prompt, as a quick indicator of where
423−your messages will be sent.
424−
425−Glyphs are assigned by chat hash out of the following list:
426−
427−```
428−! @ # $ % ^ & ( ) - = _ + [ ] { } ; ' \ : " , . < > ?
429−```
430−
431−Alphanumeric characters and `|#/*~` are reserved; all others can be manually assigned.
432−
433−For example, `-` the glyph at the end of the prompt below might indicates that
434−messages sent from this prompt will go to some chat with that glyph:
435−
436−```
437−~sampel-palnet:chat-cli-
438−```
439−
440−To see what chat is bound to a glyph, use the `;what` command followed by the
441−glyph in question, or use `;what` without specifying a glyph to see all of your
442−subscriptions which are bound to glyphs. For example, to see `=`:
443−
444−```
445−~sampel-palnet:chat-cli> ;what =
446−~dopzod/urbit-help
447−```
448−
449−To see all of your glyph bindings:
450−
451−```
452−~sampel-palnet:chat-cli> ;what
453−> ~paldev/numismatic-forum
454−. ~middev/ny-martians
455−= ~dopzod/urbit-help
456−```
457−
458−When the messaging target doesn't have a glyph, we see their name at the end of
459−the prompt instead. Here we're talking into `~dannum-mitryl/homework`:
460−
461−```
462−~sampel-palnet:chat-cli[~dannum-mitryl/homework]
463−```
464−
465−#### Bind
466−
467−Syntax: `;bind [glyph] ~host/chat-name`
468−
469−Assigns the chosen glyph to a chat.
470−
471−For example:
472−
473−```
474−~sampel-palnet:chat-cli> ;bind + ~dopzod/urbit-help
475−```
476−
477−#### Unbind
478−
479−Syntax: `;unbind [glyph] ~host/chat-name`
480−
481−Unassigns the chosen glyph from a chat owned by your ship.
482−
483−For example:
484−
485−```
486−~sampel-palnet:chat-cli> ;unbind + ~dopzod/urbit-help
487−```
488−
489−If you don't specify a chat, all bindings for that glyph are removed.
490−
491−#### Prefixes
492−
493−Received posts are prefixed with a glyph to let you know what the
494−audience is. You can activate an individual post to see the full
495−audience.
496−
497−There are a few special-purpose "glyphs":
498−
499−- `|` - Informational messages
500−- `*` - Posts to a target you don't have a glyph binding for
501−
502−
503−### Configuration
504−
505−#### Set audience
506−
507−`;~ship/chat`
508−
509−Set audience to `~ship/chat`.
510−
511−#### Set audience by glyph
512−
513−Syntax: `;[glyph]`
514−
515−Set audience to the chat previously bound to the chosen glyph.
516−
517−#### Set audience to own chat
518−
519−Syntax: `;/chat`
520−
521−Set audience to a chat on your own ship.
522−
523−### Miscellaneous configuration
524−
525−#### Change timezone
526−
527−Syntax: `;set timezone [+/-][hours]`
528−
529−Adjust the display of timestamps to a specific timezone. Relative to UTC.
530−
531−#### Set width
532−
533−Syntax: `;set width [number]`
534−
535−Set the rendering width of `:chat-cli` to a specific number of characters.
536−(Minimum of 30.)
537−
538−#### Show timestamps
539−
540−Syntax: `;set showtime`
541−
542−Show the timestamp for each message. This is set by default.
543−
544−#### Hide timestamps
545−
546−Syntax: `;unset showtime`
547−
548−Stop showing the timestamp for each message.
549−
550−#### Sound notification on
551−
552−Syntax: `;set notify`
553−
554−Emit a terminal bell sound if your six-syllable ship name is mentioned in
555−a message. This is set by default.
556−
557−#### Sound notification off
558−
559−Syntax `;unset notify`
560−
561−Do not notify when your ship name is mentioned.
562−
563−
564−## S3 {#s3}
565−
566−Amazon S3, which stands for Amazon Simple Storage Service, is a technology that was introduced by Amazon Web Services for cloud storage that has since been extended more broadly into a [standard programming interface](https://en.wikipedia.org/wiki/Amazon_S3#S3_API_and_competing_services).
567−
568−Our S3 support lets you store credentials for your S3 object storage buckets on your Urbit ship; once you have done so, you will get additional functionality for uploading your own media within Chat and Groups (for avatars).
569−
570−To enable S3 support on your ship you'll need to first set up a bucket, and then add its credentials to Landscape using *either* Landscape or the Dojo.
571−
572−### Bucket Setup
573−
574−If you’re using AWS, it will have to support signature v2, not v4. We've found DigitalOcean's Spaces to work well also. The bucket has to be publicly readable, allow CORS from `*` origins, allow GET and PUT methods, and allow `*` headers. Your provider should have details on setting access permissions and CORS.
575−
576−### Add your credentials: Landscape
577−
578−Navigate to your `https://<your-ship-url>/~profile/settings`, or click your sigil in the upper-right corner of the window. Fill out the **S3 Credentials** and **S3 Buckets** sections and you're all set!
579−
580−### Add your credentials: Dojo
581−
582−Once you have gotten your bucket setup, poke the `s3-store` on your ship with your details. You can do this in Dojo or in web Dojo.
583−
584−```
585−:s3-store|set-endpoint 'endpoint.mys3provider.com'
586−:: AWS endpoint example: s3-us-west-2.amazonaws.com
587−:: Digital Ocean endpoint example: sfo2.digitaloceanspaces.com
588−:s3-store|set-access-key-id 'MYACCESSKEYID'
589−:s3-store|set-secret-access-key 'MYSECRETACCESSKEY'
590−:s3-store|set-current-bucket 'yourbucketname'
591−```
592−
593−Done! If you need to peek at s3-store’s state, you can always run :s3-store +dbug (inside Dojo, not web Dojo, unfortunately). You’ll see the additional functionality appear in Groups and Chat.
594−
595−## Shell {#using-the-shell}
596−
597−The Dojo is our shell; it processes system commands and returns output. It's a
598−good place to quickly experiment with Urbit. On the surface the Dojo is just a
599−Hoon REPL. On the inside, the Dojo is a system for operating on and transforming
600−data in Urbit.
601−
602−### Quickstart
603−
604−You can use the Dojo to run arbitrary Hoon code, as well as non-Hoon system
605−commands.
606−
607−#### Math
608−
609−Evaluate a Hoon expression (whitespace matters):
610−
611−```
612−~your-urbit:dojo> (add 2 2)
613−~your-urbit:dojo> %+ add 2 2
614−```
615−
616−Tall-form Hoon may require multiple lines:
617−
618−```
619−~your-urbit:dojo> %+ add
620−~your-urbit:dojo< 2
621−~your-urbit:dojo< 2
622−```
623−
624−Hoon uses something called [the subject](@/docs/tutorials/hoon/hoon-school/the-subject-and-its-legs.md).
625−The Dojo has its own subject and that's where Hoon's equivalent of variables,
626−called faces, are stored.
627−
628−Use `=var` to save faces to the Dojo subject.
629−
630−```
631−~your-urbit:dojo> =foo (add 2 2)
632−```
633−
634−Note, however, that `=var` is Dojo syntax, not Hoon syntax. You cannot bind a
635−face in a `.hoon` file in this way.
636−
637−#### System commands
638−
639−Use `=dir` to set the current working directory:
640−
641−```
642−~your-urbit:dojo> =dir %/gen
643−```
644−
645−(`%` represents your current directory. For a complete explanation on urbit
646−paths, see the [filesystem section](#filesystem).)
647−
648−Generators (files in `/gen`) are run with `+`:
649−
650−```
651−~your-urbit:dojo> +hello 'world'
652−```
653−
654−Save output to a file in `%clay` with `*`:
655−
656−```
657−~your-urbit:dojo> *some/file/path/hoon 'hello world'
658−```
659−
660−Run system commands from `:hood`, like `reload`, using `|`:
661−
662−```
663−~your-urbit:dojo> |reload %eyre
664−```
665−
666−### Generators
667−
668−Generators are short Hoon scripts, saved as `.hoon` files in the `/gen`
669−directory. Many Dojo commands exist in the form of generators. The syntax for
670−running a generator is `+genname` for a generator saved as `genname.hoon`.
671−
672−#### `+cat`
673−
674−Accepts a path and displays the file. Similar to Unix `cat`.
675−
676−```
677−~your-urbit:dojo> +cat %/gen/curl/hoon
678−```
679−
680−#### `+code`
681−
682−Generates a code that is used to remotely log into your ship. No
683−arguments.
684−
685−```
686−~your-urbit:dojo> +code
687−```
688−
689−You can change your code to a new randomly generated one by entering `|code
690−%reset`. Please note that this will prevent [Bridge](@/docs/glossary/bridge.md)
691−from being able to derive your code in the future.
692−
693−#### `+curl`
694−
695−Retrieves data from a URL. Accepts a `tape`. Similar to Unix `curl`.
696−
697−```
698−~your-urbit:dojo> +curl "http://nyt.com"
699−```
700−
701−#### `+hello`
702−
703−Just prints the argument. Accepts a `@ta`.
704−
705−```
706−~your-urbit:dojo> +hello 'mars'
707−```
708−
709−#### `+ls`
710−
711−Similar to Unix `ls`. Accepts a path.
712−
713−```
714−~your-urbit:dojo> +ls %/gen
715−~your-urbit:dojo> +ls /~talsur-todres/home/2/gen/program
716−```
717−
718−#### `+solid`
719−
720−Compile the current state of the kernel and output a
721−noun. Usually downloaded to a file in unix. No arguments.
722−
723−```
724−~your-urbit:dojo> .urbit/pill +solid
725−```
726−
727−#### `+test`
728−
729−Testrunner. Can test multiple generators at once, conventionally ones
730−in the `/test` folder. Takes a path.
731−
732−```
733−~your-urbit:dojo> +test /lib
734−```
735−
736−#### `+ticket`
737−
738−Generate a ticket for an urbit ship. Takes an urbit name (`@p`).
739−
740−
741−```
742−~your-urbit:dojo> +ticket ~talsur-todres-your-urbit
743−```
744−
745−#### `+tree`
746−
747−Generate a recursive directory listing. Takes a path.
748−
749−```
750−~your-urbit:dojo> +tree %/sys
751−```
752−
753−### Hood
754−
755−The hood is the system daemon. See `gen/hood` and `app/hood`.
756−
757−`|hi` - Sends a direct message. Sort of like Unix `write`. Accepts
758−an urbit name (`@p`) and a string (`tape`, which is text wrapped with double-quotes).
759−
760−```
761−~your-urbit:dojo> |hi ~binzod "you there?"
762−```
763−
764−`|link` / `|unlink` - Link / unlink a remote app. Accepts an
765−Urbit name and an app name.
766−
767−```
768−~your-urbit:dojo> |link ~talsur-todres %octo
769−```
770−
771−`|mass` - Prints the current memory usage of all the kernel modules.
772−No arguments.
773−
774−```
775−~your-urbit:dojo> |mass
776−```
777−
778−`|reload` - Reloads a kernel module (vane) from source. Accepts any
779−number of vane names.
780−
781−```
782−~your-urbit:dojo> |reload %clay %eyre
783−```
784−
785−`|reset` - Reloads `hoon.hoon` and all modules. No arguments.
786−
787−```
788−~your-urbit:dojo> |reset
789−```
790−
791−`|start` - Starts an app. Accepts an app name.
792−
793−```
794−~your-urbit:dojo> |start %curl
795−```
796−
797−---
798−
799−### Dojo manual
800−
801−#### Sources and sinks
802−
803−A Dojo command is either a **source** or a **sink**. A source is just something
804−that can be printed to your console or the result of some computation. A
805−sink is an **effect**: a change to the filesystem, a network message, a
806−change to your environment, or a typed message to an app.
807−
808−Sources can be chained together, but we can only produce one effect per
809−command.
810−
811−#### Sinks
812−
813−#### `=` - Set variable
814−
815−Set any environment variable:
816−
817−```
818−~your-urbit:dojo> =foo 42
819−~your-urbit:dojo> (add 2 foo)
820−
821−44
822−```
823−
824−Make sure to note that `=var` is Dojo syntax, not Hoon syntax. You cannot bind a
825−variable in a `.hoon` file in this way.
826−
827−#### Special variables
828−
829−There are a few special variables that the Dojo maintains.
830−
831−#### `:` - Send to app
832−
833−`:app` goes to a local `app`, `:~ship/app` goes to the `app` on `~ship`.
834−
835−Send a `helm-hi` message to `hood`:
836−
837−```
838−~your-urbit:dojo> :hood &helm-hi 'hi'
839−```
840−
841−Apps usually expect marked data, so `&` is often used here.
842−
843−#### `*` - Save in `%clay`
844−
845−Save a new `.hoon` file in `gen`:
846−
847−```
848−~your-urbit:dojo> *%/gen/foo/hoon '# hello'
849−```
850−
851−The last component of the path is expected to be the mark (or mime
852−type).
853−
854−#### `.` - Export to Unix
855−
856−Export a noun to Unix with `.`:
857−
858−```
859−~your-urbit:dojo> .foo/bar/baz (add 2 2)
860−```
861−
862−Which creates a file at `pier/.urb/put/foo/bar.baz`.
863−
864−This is very often used with `+solid`:
865−
866−```
867−~your-urbit:dojo> .urbit/pill +solid
868−```
869−
870−Which outputs a new `urbit.pill` to `pier/.urb/put/urbit.pill`
871−
872−### Sources
873−
874−#### `_` - Run a function
875−
876−Use `_` to run a gate (or function):
877−
878−Write an arbitrary function and pass data to it:
879−
880−```
881−~your-urbit:dojo> _|=([a=@] (mul a 3)) 3
882−9
883−```
884−
885−Use a function to get the status code from an http request:
886−
887−```
888−~your-urbit:dojo> _|=([p=@ud q=* r=*] p) +http://google.com
889−301
890−```
891−
892−#### `+` `-` - HTTP requests
893−
894−`+http[s]://example.com` - sends a GET request
895−
896−`+http[s]://example.com &json [%s 'hi']` - sends a POST request with the
897−JSON `"hi"` in the body.
898−
899−`-http[s]://example.com &json [%s 'hi']` - sends a PUT request with the
900−JSON `"hi"` in the body.
901−
902−Note that the first of these is a source while the last two are sinks.
903−
904−#### `+` - Generators
905−
906−Generators are simple Hoon scripts loaded from the filesystem. They live
907−in `gen/`.
908−
909−An example of a generator that is built into your urbit is `+code`. It produces
910−the code needed to log into your ship remotely.
911−
912−```
913−~your-urbit:dojo> +code
914−fintyr-haldet-fassev-solhex
915−```
916−
917−### Variables
918−
919−You can use `=` to set an environment variable in Dojo, but there are
920−a few reserved names that have special uses.
921−
922−#### `dir`
923−
924−Current working `%clay` desk and revision. Read / write.
925−
926−**Examples:**
927−
928−```
929−~your-urbit:dojo> =dir %/gen
930−~your-urbit:dojo> +ls %
931−404/hoon docs/ dojo/hoon lib/ listen/hoon md static/udon talk/ testing/udon tree/main/ unmark/ womb/
932−```
933−
934−#### `lib`
935−
936−Current set of libraries (`/lib`) in your environment. Can be set
937−with `/+`. Read / write.
938−
939−**Examples:**
940−
941−```
942−~your-urbit:dojo> /+ number-to-words
943−```
944−Now we can use arms from lib/number-to-words.hoon
945−```
946−~your-urbit:dojo> (to-words:eng-us:number-to-words 123.456)
947−```
948−
949−#### `sur`
950−
951−Current set of structures (`/sur`) in your environment. Can be set
952−with `/-`. Read / write.
953−
954−**Examples:**
955−
956−```
957−~your-urbit:dojo> /- sole
958−```
959−Now we can use arms in sur/sole.hoon.
960−```
961−~your-urbit:dojo> `sole-effect:sole`[%bel ~]
962−```
963−
964−#### `now`
965−
966−The current (128-bit `@da`) time. Read-only.
967−
968−**Example:**
969−
970−```
971−~your-urbit:dojo> now
972−~2016.3.21..21.10.57..429a
973−```
974−
975−#### `our`
976−
977−The current urbit ship. Read-only.
978−
979−**Example:**
980−
981−```
982−~your-urbit:dojo> our
983−~your-urbit
984−```
985−
986−#### `eny`
987−
988−512 bits of entropy. Read-only.
989−
990−**Example:**
991−
992−```
993−~your-urbit:dojo> eny
994−\/0vnt.d474o.gpahj.jcf3o.448fh.2lamb.82ljm.8ol8u.b02vi.mrvvp.b7et2.knb7m.l8he\/
995− 8.8qb9s.drm36.77n9b.a0qst.30g03.l5lb5.nvsbc.v39tn
996−\/
997−```
998−
999−### Troubleshooting
1000−
1001−If you encounter `%dy-edit-busy` while entering commands, it is
1002−because your Dojo is blocked on a timer or an HTTP request. Type backspace
1003−and your Dojo will end the blocked command.
1004−
1005−
1006−## Filesystem {#filesystem}
1007−
1008−Urbit has its own revision-controlled filesystem, Clay. Clay is a typed, global,
1009−referentially transparent namespace. An easy way to think about it is like typed
1010−`git`.
1011−
1012−The most common way to use Clay is to mount a Clay node in a Unix directory. The mounted directory is always at the root of your pier directory.
1013−
1014−### Quickstart
1015−
1016−This quick-start guide will walk you through some common commands. Follow along
1017−using your Dojo. When you get a `>=` message after entering a command, this means
1018−that the command was successful.
1019−
1020−It's important to note that whenever you want to sync changes from your Unix
1021−directory to your ship, you must use the `|commit %desk` command, where `%desk`
1022−is the desk that you'd like to sync to.
1023−
1024−When developing it's a good idea to use a separate desk. Create a `%sandbox`
1025−desk based on the `%home` desk:
1026−
1027−```
1028−~your-urbit:dojo> |merge %sandbox ~your-urbit %home
1029−```
1030−
1031−Running `our` produces your ship-name, meaning that you can run the following
1032−command instead of typing out the entire thing. Useful for comets due to their
1033−very long names.
1034−
1035−```
1036−~your-urbit:dojo> |merge %sandbox our %home
1037−```
1038−
1039−Most of the time we want to use Clay from Unix. Mount the entire contents of
1040−your `sandbox` desk to Unix:
1041−
1042−```
1043−~your-urbit:dojo> |mount /=sandbox=
1044−```
1045−
1046−To explore the filesystem from inside Urbit `+ls` and `+cat` are useful. `+ls`
1047−displays files in the current directory, and `+cat` displays the contents of
1048−a file.
1049−
1050−We can use `%` to mean "current directory." The result of the command below
1051−is just like using `ls` in a Unix terminal.
1052−
1053−```
1054−~your-urbit:dojo> +ls %
1055−```
1056−
1057−Notice how `+cat %` does the same thing. That's because everything in Clay,
1058−including directories, is a file.
1059−
1060−Sync from your friend `~some-ship`'s `%experiment` desk to your
1061−`%sandbox` desk:
1062−
1063−```
1064−~your-urbit:dojo> |sync %sandbox ~some-ship %experiment
1065−```
1066−
1067−If and when your sync is successful, you will receive a message:
1068−
1069−```
1070−activated sync from %experiment on ~some-ship to %sandbox
1071−```
1072−
1073−The ship that you sync from will get their own message indicating that you're
1074−both connected as peers:
1075−
1076−```
1077−; ~your-urbit is your neighbor.
1078−```
1079−
1080−---
1081−
1082−### Clay manual
1083−
1084−#### Paths
1085−
1086−A path in Clay is a list of URL-safe text, restricted to the characters
1087−`[a z]`,`[0 9]`, `.`, `-`, `_`, and `~`. Formally this is a `(list knot)`,
1088−meaning that each segment, delineated by `/`, is of the `knot` ASCII-text type.
1089−In other words, paths are expressed as `/foo/bar/baz`. File extensions are
1090−separated from file names with `/`, not `.`. Extensions are syntactically
1091−identical to subdirectories, except that they must terminate the path.
1092−
1093−Paths begin with a piece of data called a `beak`. A beak is formally a
1094−`(p=ship q=desk r=case)`; it has three components, and might look like
1095−`/~dozbud-namsep/home/11`.
1096−
1097−The first `beak` component is `ship`, which is, as you might guess, the name of
1098−an Urbit ship. The second component is `desk`, which is a workspace meant to
1099−contain other directories; the default desk is `%home`. The third component is
1100−`case`, which represents version information in various ways: date and time;
1101−a version sequence, which is a value incremented by one whenever a file on the
1102−given `desk` is modified; or an arbitrary plaintext label.
1103−
1104−You can find what your `beak` is at any given moment by
1105−typing `%` in the Dojo and looking at the first three results.
1106−
1107−We use `beak`s because, unlike the current internet, the Urbit network uses a
1108−global namespace. That means that a file named `example.hoon` in the `/gen`
1109−directory on the `%home` desk of your ship `~lodleb-ritrul` would have a
1110−universal address to anyone else on the network:
1111−`/~lodleb-ritrul/home/186/gen/example/hoon`. That, of
1112−course, doesn't mean that everyone on the network has privileges to access that
1113−path.
1114−
1115−The structure that combines a `beak` with further path information is called a
1116−`beam`.
1117−
1118−#### Relative paths
1119−
1120−The `%` command, which we gestured at in the above section, represents the
1121−**relative path**, which is the path where you are currently working. If your
1122−working directory is just your home desk, indicated by the
1123−prompt `~your-planet:dojo>`, then running the command below will print your
1124−working directory's `beam` information: your `beak`, and a `~` that represents
1125−the empty list since no path is present.
1126−
1127−```
1128−~your-urbit:dojo> %
1129−```
1130−
1131−`%`s can be stacked to indicate one level further up in the hierarchy for each
1132−additional `%`. Try the following command:
1133−
1134−```
1135−~your-planet:dojo> %%%
1136−```
1137−
1138−You'll probably notice that it only has your ship name and the empty list. The
1139−two additional `%`s abandoned the `case` and the `desk` information by moving
1140−up twice the hierarchy.
1141−
1142−There are no local relative paths. `/foo/bar` must be written as
1143−`%/foo/bar`.
1144−
1145−#### Substitution
1146−
1147−You don't need to write out the explicit path every time you want to reference
1148−somewhere outside of your working directory. You can substitute `=` for the
1149−segments of a path.
1150−
1151−Recall that a full address in the the Urbit namespace is a `beam`: the
1152−`/ship/desk/case/path`. If you've switched to another desk before, you're
1153−already familiar with substitution syntax:
1154−
1155−```
1156−~your-urbit:dojo> =dir /=sandbox=
1157−```
1158−
1159−The above command uses substitution to use your current `ship` and
1160−`case`; only the `desk` argument, which is located between the other two, is
1161−given something new. Without substitution, you would need to write:
1162−
1163−```
1164−~your-urbit:dojo> =dir /~your-urbit/sandbox/85
1165−```
1166−
1167−Substitutions work the same way in `beak`s (the `ship/desk/case` part) and
1168−paths. For example, if you are in the `/gen` directory, you can reference a file
1169−in the `/app` directory like below. (`+cat` displays the contents of a file).
1170−
1171−```
1172−~your-urbit:dojo> =dir %/gen
1173−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen> +cat /===/app/curl/hoon
1174−```
1175−
1176−Note what was substituted out, and note that we don't need to separate `=` with
1177−`/`.
1178−
1179−If we changed our working directory to something called `/gen/gmail`, we could
1180−access a file called
1181−
1182−```
1183−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen> =dir %/gmail
1184−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/gmail> +cat /===/app/=/split/hoon
1185−```
1186−
1187−Because both paths share a directory named `/gmail` at the same position in the
1188−address hierarchy – which, if you recall, is just a `list` – the above command
1189−works!
1190−
1191−We can do the same thing between desks. If `%sandbox` has been merged with
1192−`%home`, the following command will produce the same results as the above
1193−command.
1194−
1195−```
1196−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/gmail> +cat /=sandbox=/app/=/split/hoon
1197−```
1198−
1199−Most commonly this is used to avoid having to know the current revision
1200−number in the `dojo`: `/~lodleb-ritrul/home/~2018.10.2..00.35.44..d7e8/gen/example/hoon`
1201−
1202−#### Changing directories
1203−
1204−Change the working directory with `=dir`. It's our equivalent of the Unix `cd`.
1205−
1206−For example, the syntax to navigate to `/home/gen/ask` is:
1207−
1208−```
1209−~your-urbit:dojo> =dir /=home=/gen/ask
1210−```
1211−
1212−This command will turn your prompt into something like this:
1213−
1214−```
1215−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/ask>
1216−```
1217−
1218−Using `=dir` without anything else uses the null path, which returns you to
1219−your home desk.
1220−
1221−```
1222−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/ask> =dir
1223−```
1224−
1225−Your dojo prompt will turn back into `~your-urbit:dojo>`.
1226−
1227−To go up levels in the path hierarchy, recall the relative path expression
1228−`%`. Stacking them represents another level higher in the hierarchy than
1229−the current working directory for each `%` beyond the initial. The command below
1230−brings you one level up:
1231−
1232−```
1233−~your-urbit:dojo> =dir %/gen
1234−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen> =dir %%
1235−```
1236−
1237−### Revision-control
1238−
1239−#### Mount
1240−
1241−Syntax: `|mount /clay/path [Unix-name]`
1242−
1243−Mount the `clay-path` at the Unix mount point `Unix-name`.
1244−
1245−**Examples:**
1246−
1247−```
1248−|mount %/gen generators
1249−```
1250−
1251−Mounts `%/gen` to `/generators` inside your pier directory.
1252−
1253−#### Unmount
1254−
1255−```
1256−|unmount [clay-path || Unix-name]
1257−```
1258−
1259−Unmount the path or name from Unix.
1260−
1261−**Examples:**
1262−
1263−```
1264−|unmount %/gen
1265−```
1266−
1267−Unmounts the Clay path `%/gen` from whatever name it was mounted as.
1268−
1269−```
1270−|unmount %generators
1271−```
1272−
1273−Unmounts the Unix path `/generators`.
1274−
1275−#### Merge
1276−
1277−```
1278−|merge desk beak[, =gem strategy]
1279−```
1280−
1281−Merges a `beak` into a `desk` using an optional merge `strategy`.
1282−
1283−A `beak` is a ship-desk-case triple, encoded as a
1284−path(`/~dozbud/home/2`)
1285−
1286−**Examples:**
1287−
1288−```
1289−|merge %home-work /=home=, =gem %fine
1290−```
1291−
1292−Merge `/=home=` into `%home-work` using merge strategy `%fine`.
1293−
1294−```
1295−|merge %examples ~wacbex-ribmex %examples
1296−```
1297−
1298−Merge the `%examples` desk from `~waxbex-ribmex`
1299−
1300−#### Sync
1301−
1302−```
1303−|sync desk plot [plot-desk]
1304−```
1305−
1306−Subscribe to continuous updates from remote `plot` on local `desk`.
1307−`plot-desk` can specify the remote `desk` name. When omitted it defaults
1308−to being the same as `desk`. Non-comet urbits have
1309−`|sync %home ~parent %kids` automatically set up (where `~parent` is the
1310−planet that issued a moon, the star that issued a planet, or the galaxy
1311−that issued a star).
1312−
1313−**Examples:**
1314−
1315−```
1316−|sync %home-local ~dozbud %home
1317−
1318−|sync %home ~doznec
1319−```
1320−
1321−#### Unsync
1322−
1323−```
1324−|unsync desk plot [plot-desk]
1325−```
1326−
1327−Unsubscribe from updates from remote `plot` on local `desk` with
1328−optional `plot-desk`. Arguments must match original `|sync` command.
1329−
1330−Example:
1331−
1332−```
1333−|unsync %home-local ~dozbud %home
1334−```
1335−
1336−#### Label
1337−
1338−```
1339−|label desk name
1340−```
1341−
1342−Label the current version of `desk` `name`.
1343−
1344−Example:
1345−
1346−```
1347−|label %home release
1348−```
1349−
1350−### Merge strategies
1351−
1352−`%init` - used if it's the first commit to a desk. Also can be used to
1353−"reinitialize" a desk – revision numbers keep going up, but the new
1354−revision isn't necessarily a descendent of the previously numbered
1355−version, allowing merges to be rerun.
1356−
1357−`%this` - keep what's in Bob's desk, but join the ancestry.
1358−
1359−`%that` - take what's in Alice's desk, but join the ancestry. This is
1360−the reverse of `%this`. This is different from `%init` because the new
1361−commit has both sides in its ancestry.
1362−
1363−`%fine` - "fast-forward" merge. This succeeds if and only if one head is in the
1364−ancestry of the other.
1365−
1366−`%meet`, `%mate`, and `%meld` - find the most recent common ancestor to
1367−use as our merge base.
1368−
1369−A `%meet` merge only succeeds if the changes from the merge base to
1370−Alice's head (hereafter, "Alice's changes") are in different files than
1371−Bob's changes. In this case, the parents are both Alice's and Bob's
1372−heads, and the data is the merge base plus Alice's changed files plus
1373−Bob's changed files.
1374−
1375−A `%mate` merge attempts to merge changes to the same file when both
1376−Alice and Bob change it. If the merge is clean, we use it; otherwise, we
1377−fail. A merge between different types of changes – for example,
1378−deleting a file vs changing it – is always a conflict. If we succeed,
1379−the parents are both Alice's and Bob's heads, and the data is the merge
1380−base plus Alice's changed files plus Bob's changed files plus the merged
1381−files.
1382−
1383−A `%meld` merge will succeed even if there are conflicts. If there are
1384−conflicts in a file, then we use the merge base's version of that file,
1385−and we produce a set of files with conflicts. The parents are both
1386−Alice's and Bob's heads, and the data is the merge base plus Alice's
1387−changed files plus Bob's changed files plus the successfully merged
1388−files plus the merge base's version of the conflicting files.
1389−
1390−`%auto` - meta-strategy. Check to see if Bob's desk exists, and if it
1391−doesn't we use an `%init` merge. Otherwise, we progressively try
1392−`%fine`, `%meet`, and `%mate` until one succeeds. If none succeed, we
1393−merge Bob's desk into a scratch desk. Then, we merge Alice's desk into
1394−the scratch desk with the `%meld` option to force the merge. Finally, we
1395−annotate any conflicts, if we know how.
1396−
1397−### Manipulation
1398−
1399−#### `+cat`
1400−
1401−Syntax: `+cat path [path ...]`
1402−
1403−Similar to Unix `cat`. `+cat` takes one or more `path`s, and prints their
1404−contents. If that `path` is a file, the contents of the file is printed. If the
1405−`path` terminates in a directory, the list of names at that path is produced.
1406−
1407−#### `+ls`
1408−
1409−Syntax: `+ls path`
1410−
1411−Similar to Unix `ls`. `+ls` takes a single `path`.
1412−
1413−Produces a list of names at the `path`.
1414−
1415−```
1416−~your-urbit:dojo> +cat %/our/home/gen/curl/hoon
1417−```
1418−
1419−#### `|rm`
1420−
1421−Syntax: `|rm path`
1422−
1423−Remove the data at `path`. `Path` must be a path to the actual node, not a
1424−'directory'.
1425−
1426−#### `|cp`
1427−
1428−Syntax: `|cp to from`
1429−
1430−Copy the file at `from` into the path `to`.
1431−
1432−#### `|mv`
1433−
1434−Syntax: `|mv to from`
1435−
1436−Move the file at `from` into the path `to`.
1437−
1438−In Clay, `|mv` is just a shorthand for `|cp` then `|rm`. The `|rm`
1439−doesn't happen unless the `|cp` succeeds.