Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Commit a99a704

Browse files
author
Nathan Potter
committed
Update command docs and specify golang dependency when installing latest
1 parent 1eda0a1 commit a99a704

File tree

11 files changed

+131
-107
lines changed

11 files changed

+131
-107
lines changed

editcmd.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ func (c *editcmd) Spec() cli.CommandSpec {
3232
Name: "edit",
3333
Usage: "[flags] <repo>",
3434
Desc: `This command allows you to edit your project's environment while it's running.
35-
Depending on what flags are set, the Dockerfile you want to change will be opened in your default
36-
editor which can be set using the "EDITOR" environment variable. Once your changes are complete
37-
and the editor is closed, the environment will be rebuilt and rerun with minimal downtime.
35+
Depending on what flags are set, the Dockerfile you want to change will be opened in your default
36+
editor which can be set using the "EDITOR" environment variable. Once your changes are complete
37+
and the editor is closed, the environment will be rebuilt and rerun with minimal downtime.
3838
39-
If no flags are set, this will open your project's Dockerfile. If the -hat flag is set, this
40-
will open the hat Dockerfile associated with your running project in the editor. If the -new-hat
41-
flag is set, the project will be adjusted to use the new hat.
39+
If no flags are set, this will open your project's Dockerfile. If the -hat flag is set, this
40+
will open the hat Dockerfile associated with your running project in the editor. If the -new-hat
41+
flag is set, the project will be adjusted to use the new hat.
4242
43-
VS Code users can edit their environment by editing their .sail/Dockerfile within the editor. VS Code
44-
will rebuild the container on save.`,
43+
VS Code users can edit their environment by editing their .sail/Dockerfile within the editor. VS Code
44+
will rebuild the container on save.`,
4545
}
4646
}
4747

rmcmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (c *rmcmd) Spec() cli.CommandSpec {
2424
Usage: "[flags] <repo>",
2525
Desc: `Remove a sail container from the system.
2626
This command allows for removing a single container
27-
or all of the containers on a system with the -all flag.`,
27+
or all of the containers on a system with the -all flag.`,
2828
}
2929
}
3030

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
+++
2+
type="docs"
3+
title="Browser Extension"
4+
browser_title="Sail - Docs - Browser Extension"
5+
section_order=2
6+
+++
7+
8+
The Sail browser extension allows you to open GitHub or GitLab projects with a single click.
9+
10+
11+
<video autoplay="autoplay" loop="loop" width="90%" controls src="/github-open.mp4"></video>
12+
13+
---
14+
15+
## Install
16+
17+
1. [Install Sail if you haven't already](/docs/installation)
18+
1. Run `sail install-for-chrome-ext` to install the chrome extension manifest.json
19+
1. [Install the extension from the Chrome Marketplace](https://chrome.google.com/webstore/detail/sail/deeepphleikpinikcbjplcgojfhkcmna)
20+
1. Get Sailing!
21+
22+
23+
24+

site/content/docs/commands/edit.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,23 @@ section_order=1
66
+++
77

88
```
9-
NAME:
10-
sail edit - edit your environment in real-time.
9+
Usage: sail edit [flags] <repo>
1110
12-
USAGE:
13-
sail edit [flags] <repo>
11+
This command allows you to edit your project's environment while it's running.
12+
Depending on what flags are set, the Dockerfile you want to change will be opened in your default
13+
editor which can be set using the "EDITOR" environment variable. Once your changes are complete
14+
and the editor is closed, the environment will be rebuilt and rerun with minimal downtime.
1415
15-
DESCRIPTION:
16-
This command allows you to edit your project's environment while it's running.
17-
Depending on what flags are set, the Dockerfile you want to change will be opened in your default
18-
editor which can be set using the "EDITOR" environment variable. Once your changes are complete
19-
and the editor is closed, the environment will be rebuilt and rerun with minimal downtime.
16+
If no flags are set, this will open your project's Dockerfile. If the -hat flag is set, this
17+
will open the hat Dockerfile associated with your running project in the editor. If the -new-hat
18+
flag is set, the project will be adjusted to use the new hat.
2019
21-
If no flags are set, this will open your project's Dockerfile. If the -hat flag is set, this
22-
will open the hat Dockerfile associated with your running project in the editor. If the -new-hat
23-
flag is set, the project will be adjusted to use the new hat.
20+
VS Code users can edit their environment by editing their .sail/Dockerfile within the editor. VS Code
21+
will rebuild the container on save.
2422
25-
Flags:
26-
-hat Edit the hat associated with this project. (false)
27-
-new-hat Path to new hat.
23+
sail edit flags:
24+
--hat Edit the hat associated with this project. (false)
25+
--new-hat Path to new hat.
2826
```
2927

3028
The `edit` command lets you edit your environment.

site/content/docs/commands/ls.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@ section_order=2
66
+++
77

88
```
9-
NAME:
10-
sail ls - Lists all sail containers.
9+
Usage: sail ls
1110
12-
USAGE:
13-
sail ls
11+
Lists all containers with the com.coder.sail label.
1412
15-
DESCRIPTION:
16-
Queries docker for all containers with the com.coder.sail label.
17-
18-
Flags:
19-
-all Show stopped container. (false)
13+
sail ls flags:
14+
--all Show stopped container. (false)
2015
```
2116

2217
The `ls` command lists all containers with Sail Docker labels.
@@ -25,9 +20,9 @@ Example output:
2520

2621
```
2722
name hat url status
28-
cdr/sail http://127.0.0.1:8828
29-
cdr/sshcode http://127.0.0.1:8130
30-
cdr/m http://127.0.0.1:8754
31-
cdr/code-server http://127.0.0.1:8828
32-
cdr/sail-tmp-kEG58 http://127.0.0.1:8130
23+
cdr/sail http://127.0.0.1:8828 Up About an hour
24+
cdr/sshcode http://127.0.0.1:8130 Up About an hour
25+
cdr/m http://127.0.0.1:8754 Up About an hour
26+
cdr/code-server http://127.0.0.1:8828 Up About an hour
27+
cdr/sail-tmp-kEG58 http://127.0.0.1:8130 Up About an hour
3328
```

site/content/docs/commands/rm.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,14 @@ section_order=3
66
+++
77

88
```
9-
NAME:
10-
sail rm - Remove a sail container from the system.
9+
Usage: sail rm [flags] <repo>
1110
12-
USAGE:
13-
sail rm [flags] <repo>
11+
Remove a sail container from the system.
12+
This command allows for removing a single container
13+
or all of the containers on a system with the -all flag.
1414
15-
DESCRIPTION:
16-
This command allows for removing a single container
17-
or all of the containers on a system with the -all flag.
18-
19-
Flags:
20-
-all Remove all sail containers. (false)
15+
sail rm flags:
16+
--all Remove all sail containers. (false)
2117
```
2218

2319
The `rm` command lets you remove sail environments from your system.

site/content/docs/commands/run.md

Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,59 @@ section_order=0
66
+++
77

88
```
9-
NAME:
10-
sail run - Runs a project container.
11-
12-
USAGE:
13-
sail run [flags] <project>
14-
15-
DESCRIPTION:
16-
This command is used for opening and running a project.
17-
If a project is not yet created or running with the name,
18-
one will be created and a new editor will be opened.
19-
If a project is already up and running, this won't
20-
start a new container, but instead will reuse the
21-
already running container and open a new editor.
22-
23-
Flags:
24-
-hat Custom hat to use.
25-
-image Custom docker image to use.
26-
-keep Keep container when it fails to build. (false)
27-
-test-cmd A command to use in-place of starting code-server for testing purposes.
9+
Usage: sail run [flags] <repo>
10+
11+
Runs a project container.
12+
If a project is not yet created or running with the name,
13+
one will be created and a new editor will be opened.
14+
If a project is already up and running, this won't
15+
start a new container, but instead will reuse the
16+
already running container and open a new editor.
17+
18+
If a schema and host are not provided, sail will use github over SSH.
19+
There are multiple ways to modify this behavior.
20+
21+
1. Specify a host. See examples section
22+
2. Specify a schema and host. See examples section
23+
3. Edit the config to provide your preferred defaults.
24+
25+
Examples:
26+
Use default host and schema (github.com over SSH, editable in config)
27+
- sail run cdr/code-server
28+
29+
Force SSH on a Github repo (user git is assumed by default)
30+
- sail run ssh://github.com/cdr/sshcode
31+
- sail run --ssh github.com/cdr/sshcode
32+
33+
Specify a custom SSH user
34+
- sail run ssh://[email protected]/super/secret-repo
35+
- sail run --ssh [email protected]/super/secret-repo
36+
37+
Force HTTPS on a Gitlab repo
38+
- sail run https://gitlab.com/inkscape/inkscape
39+
- sail run --https gitlab.com/inkscape/inkscape
40+
41+
Note:
42+
If you use ssh://, http://, or https://, you must specify a host.
43+
44+
This won't work:
45+
- sail run ssh://cdr/code-server
46+
47+
Instead, use flags to avoid providing a host.
48+
49+
This will work:
50+
- sail run --ssh cdr/code-server
51+
52+
sail run flags:
53+
--hat Custom hat to use.
54+
--http Clone repo over HTTP (false)
55+
--https Clone repo over HTTPS (false)
56+
--image Custom docker image to use.
57+
--keep Keep container when it fails to build. (false)
58+
--no-open Don't open an editor session (false)
59+
--rm Delete existing container (false)
60+
--ssh Clone repo over SSH (false)
61+
--test-cmd A command to use in-place of starting code-server for testing purposes.
2862
```
2963

3064
The `run` command starts up a container, and opens a browser window pointing to

site/content/docs/commands/shell.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,9 @@ section_order=4
66
+++
77

88
```
9-
NAME:
10-
sail shell - shell drops you into the default shell of a repo container.
9+
Usage: sail shell <repo>
1110
12-
USAGE:
13-
sail shell <repo>
14-
15-
DESCRIPTION:
16-
shell drops you into the default shell of a repo container.
11+
shell drops you into the default shell of a repo container.
1712
```
1813

1914
The `shell` command drops you into the container's shell on the host.

site/content/docs/concepts/browser-extension.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

site/content/docs/concepts/environment-editing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ cached.
2222
## Demo
2323
_Modifying dev environment in real-time_
2424

25-
<video width="900px" controls src="/environment-editing.mp4"></video>
25+
<video autoplay="autoplay" loop="loop" width="90%" controls src="/environment-editing.mp4"></video>

site/content/docs/installation.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,24 @@ Before using Sail, there are several dependencies that must be installed on the
2222

2323
### Stable Releases
2424

25+
It's recommended that user's install the sail binary from the stable releases.
26+
2527
Binary releases can be downloaded from our [GitHub.](https://github.com/cdr/sail/releases)
2628

2729
### From Source
2830

29-
To install the latest version of `sail`, run:
31+
To install the latest version of `sail`, you'll need [go](https://golang.org/) installed and configured on your system.
3032

31-
```bash
32-
go install go.coder.com/sail
33-
```
33+
Sail uses go modules to build the project, so the easiest way to install it to your system is to clone it in a directory
34+
outside of your `GOPATH`.
3435

35-
> `go install` will install to `$GOPATH/bin`
36+
```
37+
mkdir $HOME/src
38+
cd $HOME/src
39+
git clone https://github.com/cdr/sail.git
40+
cd sail
41+
go install
42+
```
3643

3744

3845
### Verifying the Installation
@@ -44,9 +51,9 @@ properly, you should see Sail's help text.
4451
sail --help
4552
```
4653

47-
### Browser Extension
54+
## Browser Extension
4855

49-
We recommend [installing our extension](/docs/concepts/browser-extension/) for the best experience.
56+
In order to have an optimal experience while using Sail, we recommend [installing the browser extension](/docs/browser-extension/).
5057

5158

5259
## Updating

0 commit comments

Comments
 (0)