on master help sign in
rewrite CLI guide
b37d6e5Tinnus Napbus
content/getting-started/cli.md+140−74
@@ -5,7 +5,18 @@ description = "Installation instructions for power users."
5tag = "additional"
5tag = "additional"
6+++
6+++
7
7
8−If you're a power user, you can run the Urbit virtual machine directly using the command line. Choose the code for your operating system and run the commands in your terminal.
8+If you're a power user, you can run the Urbit virtual machine directly using the
9+command line. This can be run on your local machine or a server in the cloud, we
10+just cover the general case here.
11+
12+Note there is a much more comprehensive [cloud hosting
13+guide](https://operators.urbit.org/manual/running/hosting) which walks through
14+setting up Urbit on a [Digital Ocean](https://www.digitalocean.com/) VPS.
15+
16+## 1. Install Urbit
17+
18+Choose your operating system and run the given command in your terminal to
19+download the Urbit runtime:
9
20
10{% tabs %}
21{% tabs %}
11
22
@@ -15,12 +26,12 @@ If you're a power user, you can run the Urbit virtual machine directly using the
15curl -L https://urbit.org/install/mac/latest | tar xzk --strip=1 && ./urbit
26curl -L https://urbit.org/install/mac/latest | tar xzk --strip=1 && ./urbit
16```
27```
17
28
18−Note our Mac build is only compatible with Apple Silicon (M1/M2) via Rosetta.
29+> Note our Mac build is only compatible with Apple Silicon (M1/M2) via Rosetta.
19−If you have such a machine you must run the following command:
30+> If you have such a machine you may need to run the following command:
20−
31+>
21−```
32+> ```
22−/usr/sbin/softwareupdate --install-rosetta --agree-to-license
33+> /usr/sbin/softwareupdate --install-rosetta --agree-to-license
23−```
34+> ```
24
35
25{% /tab %}
36{% /tab %}
26
37
@@ -30,12 +41,13 @@ If you have such a machine you must run the following command:
30curl -L https://urbit.org/install/linux64/latest | tar xzk --strip=1 && ./urbit
41curl -L https://urbit.org/install/linux64/latest | tar xzk --strip=1 && ./urbit
31```
42```
32
43
33−Linux users may need to run this command in another terminal window to access your Urbit on port 80:
44+> Linux users may need to run this command in another terminal window to access
34−
45+> your Urbit on port 80:
46+>
35−```shell
47+> ```shell
36−sudo apt-get install libcap2-bin
48+> sudo apt-get install libcap2-bin
37−sudo setcap 'cap_net_bind_service=+ep' ./urbit
49+> sudo setcap 'cap_net_bind_service=+ep' ./urbit
38−```
50+> ```
39
51
40{% /tab %}
52{% /tab %}
41
53
@@ -45,12 +57,12 @@ sudo setcap 'cap_net_bind_service=+ep' ./urbit
45curl -L https://urbit.org/install/windows/latest | tar -xzkf - --strip-components=1 && urbit
57curl -L https://urbit.org/install/windows/latest | tar -xzkf - --strip-components=1 && urbit
46```
58```
47
59
48−Windows 10 build 17063 and later includes the familiar `curl` and `tar`
60+> Windows 10 build 17063 and later includes the familiar `curl` and `tar`
49−command-line tools. If you're running an older version of Windows, you may need
61+> command-line tools. If you're running an older version of Windows, you may need
50−to visit
62+> to visit
51−[https://github.com/urbit/urbit/releases/latest](https://github.com/urbit/urbit/releases/latest)
63+> [https://github.com/urbit/urbit/releases/latest](https://github.com/urbit/urbit/releases/latest)
52−in the browser, download the `windows.zip` file, extract it and execute the
64+> in the browser, download the `windows.zip` file, extract it and execute the
53−contained `urbit.exe` file in the command prompt.
65+> contained `urbit.exe` file in the command prompt.
54
66
55{% /tab %}
67{% /tab %}
56
68
@@ -62,43 +74,45 @@ If successful, you will see a block of output beginning with the line:
62Urbit: a personal server operating function
74Urbit: a personal server operating function
63```
75```
64
76
65−### Booting a free identity {% #comet %}
77+## 2. Boot Urbit
66−
67−There are two parts to Urbit: an **ID** and an **Operating System**.
68−
69−You have just installed the Operating System on your computer.
70−
71−The **ID** is similar to a username and password on another site. The difference is that the public part (the username) is verified by thousands of people around the world while only you hold the key (the password) to that ID.
72−
73−There are five kinds of Urbit IDs but to get started you only need to know about two: we call them **planets** and **comets**.
74
78
75−---
79+An Urbit instance is intrinsically tied to a unique identity called an **Urbit
80+ID**. There are five classes of Urbit ID, but we will consider two here: comets
81+and planets.
76
82
77−**Planets** are scarce (this prevents spamming, among other things) and usually require a price to acquire. This is the recommended way to run Urbit, but it's a bit more involved.
83+- **Comet:** A comet is an identity which anyone can generate themselves, for
84+ free. It's a good option to try out Urbit. Comets are limited by the fact they
85+ cannot be "factory reset", meaning if your Urbit somehow becomes broken or
86+ corrupted then you'll have to start again with a new identity. In that sense,
87+ they are impermanent.
78
88
79−A planet name looks like `~sampel-palnet`.
89+- **Planet:** A planet is a permanent identity which you own forever. Planets
90+ are the class intended for individuals. While there are essentially an
91+ unlimited number of comets, planets are more scarce (preventing spamming,
92+ among other things). This scarcity means they usually aren't free (though
93+ sometimes nice people give them away). This guide will assume you've already
94+ acquired a planet. If you haven't, you can refer to the ["Get a planet"
95+ guide](https://urbit.org/getting-started/get-planet) before continuing.
80
96
81−[Follow this guide](/getting-started/) if you have already acquired a planet.
97+Follow the instructions for your case:
82
98
83−[Find a planet to purchase](/getting-started/get-planet)
99+{% tabs %}
84−
85−---
86−
87−**Comets** are practically unlimited and free to acquire. At present, these are a great way to try out the network for free.
88−
89−A comet name looks like `~dasres-ragnep-lislyt-ribpyl--mosnyx-bisdem-nidful-marzod`.
90−
91−[Read more about Urbit ID here](/understanding-urbit/urbit-id)
92
100
93−---
101+{% tab label="Boot a Comet" %}
94
102
95−To boot a comet, go into the command line and run the following command:
103+In the terminal, with the `urbit` binary you installed in the previous step, a
104+comet can be booted with the `-c` option:
96
105
97−```sh
106+```bash
98./urbit -c mycomet
107./urbit -c mycomet
99```
108```
100
109
101−It may take a while to load the comet (probably only take a few minutes, but it could take longer). This comes along with it being free. When it's done you'll some messages ending like this:
110+> `mycomet` will be the name given to the data folder it will create. You can
111+> choose any name you like.
112+
113+It may take a while to initialize the comet (usually only a couple of minutes,
114+but it could take longer). When it's done, it'll take you to the dojo prompt
115+(the dojo is Urbit's shell):
102
116
103```
117```
104ames: live on 31337
118ames: live on 31337
@@ -107,54 +121,106 @@ http: loopback live on http://localhost:12321
107~sampel_marzod:dojo>
121~sampel_marzod:dojo>
108```
122```
109
123
110−When your comet is finished booting, you will see `~sampel_marzod:dojo>` (Dojo: the Urbit command line).
124+You can shut down the comet again by typing `|exit` in the dojo or hitting
125+`Ctrl+D`. When it's first shut down, the runtime will be copied inside the data
126+folder, so you can start it up again by doing:
111
127
112−To exit Urbit, use `Ctrl-D` or enter `|exit` into Dojo.
128+```bash
129+./mycomet/.run
130+```
113
131
114−To start your comet up again, run the following command:
132+Since comets are often used temporarily and then discarded, kernel updates are
133+not enabled by default. If you plan to use your comet for a while, it's a good
134+idea to enable updates with the following command in the dojo:
115
135
116−```sh
136+```
117−./mycomet/.run
137+|ota (sein:title our now our)
118```
138```
119
139
120−### Using the web interface
140+Lastly, while the dojo is quite powerful, most people use their Urbit via
141+Landscape, the browser-based UI. In order to access Landscape, you need your web
142+login code. You can get this by running the following command in the dojo:
121
143
122−Urbit is an entirely new computer, so by default it drops you into the "dojo," which is its terminal. Like your current computer, it can be used to do just about anything if you know the right commands. You only need to know one command for now.
144+```
145++code
146+```
147+
148+It'll spit out a code that'll look something like `lidlut-tabwed-pillex-ridrup`.
149+Copy the code it gives you to the clipboard.
150+
151+{% /tab %}
152+
153+{% tab label="Boot a Planet" %}
123
154
124−At the moment, the most common way to use Urbit is by launching apps like Groups (a communications suite) from the web interface homescreen. The web interface allows you to use your ship without touching the terminal. You just need to get the password, or `code`, from the terminal.
155+In order to boot a planet, you need a copy of its private keys. If you got your
156+planet via a claim link, the passport backup `.zip` file you downloaded will
157+contain a file called something like `sampel-palnet-1.key`. If you don't have
158+the passport backup or you got your planet by another method, you can instead
159+login to [Bridge](https://bridge.urbit.org/), select your planet, go to the OS
160+section, and hit the "Download Keyfile" button.
125
161
126−1. With your Urbit running, look for a line that says something like `http: web interface live on http://localhost:8080`. The number given is the port that your ship is using. It will most likely be 80 or 8080, but we're just making sure.
162+Back in the terminal, with the `urbit` binary you installed in the previous
127−2. If the port given is `80`, simply type `localhost` into your browser's address bar. If the given port is a different number, such as `8080`, you would type `localhost:8080`. You'll be met with a login prompt.
163+step, you can boot your planet with the following command (replacing
128−3. In the window where you found the port number, type `+code` and press return. Copy-paste the code that appears into the "Access Key" field in the browser, and press continue.
164+`sampel-palnet` with your own planet and pointing to the location of your
129−4. Once in, take a look around and try launching an app like Groups.
165+keyfile):
130
166
131−## Next Steps
167+```bash
168+./urbit -w sampel-palnet -k sampel-palnet-1.key
169+```
170+
171+This will create a data folder with the name of your planet and begin booting.
172+It may take a while to initialize the planet (usually only a couple of minutes,
173+but it could take longer). When it's done, it'll take you to the dojo prompt
174+(the dojo is Urbit's shell):
175+
176+```
177+ames: live on 31337
178+http: web interface live on http://localhost:8080
179+http: loopback live on http://localhost:12321
180+~sampel-palnet:dojo>
181+```
132
182
133−### Updating your comet {% #updating %}
183+You can shut down the planet again by typing `|exit` in the dojo or hitting
184+`Ctrl+D`. When it's first shut down, the runtime will be copied inside the data
185+folder, so you can start it up again by doing:
134
186
135−Urbit comes with a recent release of the Urbit OS, but automatic updates of the `%base` desk (which contains the kernel of the OS) are not enabled by default for Comets. Many comets are used only once and thrown away, so it would be wasteful to update every single comet as soon as it boots. If you plan to use your comet for more than a quick test, you'll probably want to ensure you're running the latest version of the OS.
187+```bash
188+./sampel-palnet/.run
189+```
136
190
137−You can enable updates for your comet by typing `|ota (sein:title our now our)` into Dojo and pressing Enter.
191+While the dojo is quite powerful, most people use their Urbit via Landscape, the
192+browser-based UI. In order to access Landscape, you need your web login code.
193+You can get this by running the following command in the dojo:
138
194
139```
195```
140−> |ota (sein:title our now our)
196++code
141−>=
142−kiln: activated install into %base from [~samzod %kids]
143−kiln: downloading update for %base from [~samzod %kids]
144```
197```
145
198
146−### Read More about the Dojo {% #the-dojo %}
199+It'll spit out a code that'll look something like `lidlut-tabwed-pillex-ridrup`
200+(note this is a separate code to your master ticket). Copy the code it gives you
201+to the clipboard.
202+
203+{% /tab %}
204+
205+{% /tabs %}
147
206
148−The dojo is Urbit's command line. You can use it to control your ship, or to execute arbitrary code. Check out the links below for more information.
207+## 3. Login to Landscape
149
208
150−- [Basic Operations](/using/os/getting-started)
209+While your Urbit is running, the web interface called *Landscape* can be
151−- [Basic Hoon](/docs/tutorials/hoon/hoon-school/setup)
210+accessed in the browser. Its URL will usually be either `localhost` or
152−- [Glossary Entry](/docs/glossary/dojo)
211+`localhost:8080`, depending on your platform. To check the address, you can look
212+at the boot messages in the terminal. You should see a line like:
153
213
154−### Purchase a Permanent Identity {% #boot-your-planet %}
214+```
215+http: web interface live on http://localhost:8080
216+```
155
217
156−You can continue using this comet indefinitely. There are currently few differences between using a comet-level identity and a planet-level one. However, some groups will not allow comets entry in order to maintain a certain level of quality, and changes may be made in the future that further devalue comets. They will always, however, be able to access the basic functions of the network.
218+Whichever address and port it says there is the one to open in the browser.
157
219
158−A comet also comes with a long and fairly unmemorable name whereas a planet has a short name and a "sigil" (avatar) associated with it that makes it more identifiable on the network. You may notice all this within the first few minutes of using Urbit.
220+Once open, you'll be presented with the login screen. Paste in the web login
221+code you copied from the dojo in the previous step and hit "continue". You'll
222+now be taken to your homescreen, with tiles for the default apps such as Groups
223+and Terminal.
159
224
160−[For details of how to purchase a planet, visit this page](/getting-started/get-planet).
225+For more information on navigating Landscape, see the [getting
226+around](https://urbit.org/getting-started/getting-around) guide.