Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit a53ff5e

Browse files
author
Stephen Gutekanst
committed
README: add installation instructions for each OS
Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
1 parent 1e8cc46 commit a53ff5e

File tree

1 file changed

+62
-6
lines changed

1 file changed

+62
-6
lines changed

README.md

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,79 @@ Features (aspirational):
2828

2929
## Try it out (**EXTREMELY** early stages)
3030

31-
Probably not worth trying out unless you're *incredibly* excited about this idea.
31+
Probably not worth trying out yet unless you're *incredibly* excited about this idea.
3232

33-
Use Docker for now (working on single-binary builds still):
33+
### Installation
34+
35+
<details>
36+
<summary>macOS (Apple Silicon)</summary>
37+
38+
```sh
39+
curl -L https://github.com/sourcegraph/doctree/releases/latest/download/doctree-aarch64-macos -o /usr/local/bin/doctree
40+
chmod +x /usr/local/bin/doctree
41+
```
42+
43+
</details>
44+
45+
<details>
46+
<summary>macOS (Intel)</summary>
47+
48+
```sh
49+
curl -L https://github.com/sourcegraph/doctree/releases/latest/download/doctree-x86_64-macos -o /usr/local/bin/doctree
50+
chmod +x /usr/local/bin/doctree
51+
```
52+
53+
</details>
54+
55+
<details>
56+
<summary>Linux (x86_64)</summary>
57+
58+
```sh
59+
curl -L https://github.com/sourcegraph/doctree/releases/latest/download/doctree-x86_64-linux -o /usr/local/bin/doctree
60+
chmod +x /usr/local/bin/doctree
61+
```
62+
63+
</details>
64+
65+
<details>
66+
<summary>Windows (x86_64)</summary>
67+
In an administrator PowerShell, run:
68+
69+
```powershell
70+
New-Item -ItemType Directory 'C:\Program Files\Sourcegraph'
71+
72+
Invoke-WebRequest https://github.com/sourcegraph/doctree/releases/latest/download/doctree-x86_64-windows.exe -OutFile 'C:\Program Files\Sourcegraph\doctree.exe'
73+
74+
[Environment]::SetEnvironmentVariable('Path', [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine) + ';C:\Program Files\Sourcegraph', [EnvironmentVariableTarget]::Machine)
75+
$env:Path += ';C:\Program Files\Sourcegraph'
76+
```
77+
78+
Or download [the exe file](https://github.com/sourcegraph/doctree/releases/latest/download/doctree-x86_64-windows.exe) and install it wherever you like.
79+
80+
</details>
81+
82+
<details>
83+
<summary>Via Docker</summary>
84+
85+
Coming soon: https://github.com/sourcegraph/doctree/issues/20
86+
87+
</details>
88+
89+
### Usage
3490

3591
Run the server:
3692

3793
```sh
38-
docker run -it --publish 3333:3333 --rm --name doctree --volume ~/.doctree:/home/nonroot/.doctree slimsag/doctree:dev
94+
doctree serve
3995
```
4096

41-
In a folder with Go code you'd like to see docs for, index it (for a large project like `golang/go` expect it to take ~52s for now. It's not multi-threaded.):
97+
Index a Go project (takes ~52s for a large project like golang/go itself, will be improved soon):
4298

4399
```sh
44-
docker run -it --volume $(pwd):/index --volume ~/.doctree:/home/nonroot/.doctree --entrypoint=sh slimsag/doctree:dev -c "cd /index && doctree index ."
100+
doctree index .
45101
```
46102

47-
Navigate to https://localhost:3333
103+
Navigate to http://localhost:3333
48104

49105
## Screenshots
50106

0 commit comments

Comments
 (0)