> For the complete documentation index, see [llms.txt](https://niltree.gitbook.io/niltree/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://niltree.gitbook.io/niltree/guide.md).

# Five Minute Guide

## Getting Started

Niltree can run any kind of WebGL website, twice as fast as Chrome. You can get this up and running in under five minutes.

This guide will show you how to install Niltree and open a WebGL site.

### Installing Niltree

* Ensure you have [Node >= 9.9](https://nodejs.org/en/download/):

```
$ node --version
v9.9.0
```

{% hint style="info" %}
If you don't have [Node >= 9.9](https://nodejs.org/en/download/), you can use [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows) to install it.
{% endhint %}

* If you're on **Windows**, install [windows-build-tools](https://www.npmjs.com/package/windows-build-tools) from a Powershell Admin prompt:

```
npm install --global --production windows-build-tools
```

{% hint style="info" %}
Right-click on PowerShell and run "as Administrator", then paste the above command.
{% endhint %}

* Install niltree:

```
npm i -g niltree
```

### Viewing websites

Let's open a ThreeJS website in Niltree.

Go to the ThreeJS [examples](https://threejs.org/examples/) page using your web browser of choice (Chrome, Firefox, etc):

![https://threejs.org/examples](https://3443594978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LB8lvwMk0wT1g0VKw_h%2F-LB8m6tQHLEn9mkCXdfp%2F-LB8o-cm0U-ZZTHpnkwo%2Fimage.png?alt=media\&token=0bce58ef-aa79-4412-aa2c-72f9e36a51cc)

Most of these ThreeJS examples should run fine in Niltree. Let's try the first one, [animation/cloth](https://threejs.org/examples/#webgl_animation_cloth).  Observe that this is a WebGL site, and that it renders fine in Chrome:

![A simple ThreeJS webpage: https://threejs.org/examples/#webgl\_animation\_cloth](https://3443594978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LB8lvwMk0wT1g0VKw_h%2F-LB8p4MOMZKxhJMDvnM6%2F-LB8pSffTl_OW_asIZnM%2Fimage.png?alt=media\&token=2b0a6876-aa2a-43dd-bf50-f710482df04c)

Now we're going to open this same site using Niltree.

* Open your terminal (we like [hyper](https://hyper.is/)):

![](https://3443594978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LB8lvwMk0wT1g0VKw_h%2F-LB93Z1jMSJI39sy4mt_%2F-LB93ljqq1Ycee0CnfkW%2Fimage.png?alt=media\&token=190ae170-f251-41bc-bbc9-8852b450683c)

* If you're on Windows, type `niltree-win` and press enter.
* Other platforms, type `niltree`.

![Niltree's default prompt](https://3443594978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LB8lvwMk0wT1g0VKw_h%2F-LB93Z1jMSJI39sy4mt_%2F-LB93zsX5urSqZAInIT4%2Fimage.png?alt=media\&token=4d1ab586-4c02-4034-8a87-74c3d6109a6c)

{% hint style="info" %}
If you get an error about node module version, ensure `node --version` is >= 9.9:

`nvm install 9.9`&#x20;

`nvm use 9.9`&#x20;

and then try again. If you still get an error, re-run

&#x20;`npm i -g niltree`
{% endhint %}

* Paste the ThreeJS URL (<https://threejs.org/examples/#webgl_animation_cloth>) and press enter.

Niltree will open and run the site:

![](https://3443594978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LB8lvwMk0wT1g0VKw_h%2F-LB93Z1jMSJI39sy4mt_%2F-LB94aygcg3n3oxFh61p%2Fimage.png?alt=media\&token=4973d04d-e887-4af7-81f8-1d9a53dcbd42)

![ThreeJS cloth simulation in Niltree (https://threejs.org/examples/#webgl\_animation\_cloth)](https://3443594978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LB8lvwMk0wT1g0VKw_h%2F-LB93Z1jMSJI39sy4mt_%2F-LB94ctUIDfTf8ai_WXY%2Fimage.png?alt=media\&token=e10c120d-fa7c-4238-99b0-7e377379b6a6)

Let's navigate to a different site.

* Pick out a different ThreeJS [example ](https://threejs.org/examples/)that you like:

![The ThreeJS geometry/minecraft demo](https://3443594978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LB8lvwMk0wT1g0VKw_h%2F-LB93Z1jMSJI39sy4mt_%2F-LB95SQk2lKRi4_VNzdf%2Fimage.png?alt=media\&token=8d3dbcbe-1b6c-4c14-8494-fbb66f7b9e53)

* Switch back to Niltree's command prompt and paste the URL (e.g. <https://threejs.org/examples/#webgl_geometry_minecraft>):

![](https://3443594978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LB8lvwMk0wT1g0VKw_h%2F-LB93Z1jMSJI39sy4mt_%2F-LB95kwXslnzNzPRNG2A%2Fimage.png?alt=media\&token=f7f45316-6c37-44dd-87bb-b14d9cfdbfcb)

![](https://3443594978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LB8lvwMk0wT1g0VKw_h%2F-LB93Z1jMSJI39sy4mt_%2F-LB95vzDAz8HZbJHV8b7%2Fimage.png?alt=media\&token=e260c963-099a-4b88-bfe4-bfc725febb2b)

### Niltree's command prompt

The niltree command prompt is a NodeJS REPL. If you're a node developer, the interface should be quite familiar. Open niltree and run `.help`:

![Niltree's .help command](https://3443594978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LB8lvwMk0wT1g0VKw_h%2F-LB93Z1jMSJI39sy4mt_%2F-LB96IWqfeLl1Fhm5wxD%2Fimage.png?alt=media\&token=8de415ea-21f3-4d57-8d78-5b882c69aa58)

{% hint style="info" %}
&#x20;Pressing up and down will scroll through your REPL history.
{% endhint %}

{% hint style="info" %}
Under the hood, pasting a URL is shorthand for typing `.go <url>`.
{% endhint %}

Similar to Chrome's devtools, you can evaluate any expression you want in the context of the current website. Navigate somewhere and type `window.location`:

![window.location](https://3443594978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LB8lvwMk0wT1g0VKw_h%2F-LB93Z1jMSJI39sy4mt_%2F-LB97ydO_5mN4MCU7acF%2Fimage.png?alt=media\&token=c7e3b4c6-e25b-4d02-8ae0-c017ea15ceb8)

This covers the basics of using Niltree.
