Skip to content

Commit d484d27

Browse files
committed
Add details around EXTENSIONS_GALLERY
Also tweak the wording on the air-gapped paragraph, swap an `as` for an `in`, remove an accidental newline in a command, and avoid parenthesis.
1 parent 60dbbc5 commit d484d27

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

README.md

+25-11
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
The Code Extension Marketplace is an open-source alternative to the VS Code
44
Marketplace for use in editors like
5-
[code-server](https://github.com/coder/code-server) or [VSCodium](https://github.com/VSCodium/vscodium).
5+
[code-server](https://github.com/coder/code-server) or [VSCodium](https://github.com/VSCodium/vscodium).
66

7-
It is maintained by [Coder](https://www.coder.com) and is used by our
8-
enterprise customers in regulated and security-conscious industries like
9-
banking, asset management, military, and intelligence where they deploy
10-
Coder in an air-gapped network. Accessing an Internet-hosted marketplace
11-
is not allowed.
7+
It is maintained by [Coder](https://www.coder.com) and is used by our enterprise
8+
customers in regulated and security-conscious industries like banking, asset
9+
management, military, and intelligence where they deploy Coder in an air-gapped
10+
network and accessing an internet-hosted marketplace is not allowed.
1211

1312
This marketplace reads extensions from file storage and provides an API for
1413
editors to consume. It does not have a frontend or any mechanisms for extension
@@ -64,7 +63,7 @@ export ARTIFACTORY_TOKEN="my-token"
6463
./code-marketplace [command] --artifactory http://artifactory.server/artifactory --repo extensions
6564
```
6665

67-
The token will be used as the `Authorization` header with the value `Bearer
66+
The token will be used in the `Authorization` header with the value `Bearer
6867
<TOKEN>`.
6968

7069
### Exposing the marketplace
@@ -122,14 +121,13 @@ For example to add the Python extension from Open VSX:
122121
Or the Vim extension from GitHub:
123122

124123
```console
125-
./code-marketplace add
126-
https://github.com/VSCodeVim/Vim/releases/download/v1.24.1/vim-1.24.1.vsix [flags]
124+
./code-marketplace add https://github.com/VSCodeVim/Vim/releases/download/v1.24.1/vim-1.24.1.vsix [flags]
127125
```
128126

129127
## Removing extensions
130128

131-
Extensions can be removed from the marketplace by ID and version (or use `--all`
132-
to remove all versions).
129+
Extensions can be removed from the marketplace by ID and version or `--all` to
130+
remove all versions.
133131

134132
```console
135133
./code-marketplace remove ms-python.python-2022.14.0 [flags]
@@ -138,6 +136,22 @@ to remove all versions).
138136

139137
## Usage in code-server
140138

139+
You can point code-server to your marketplace by setting the
140+
`EXTENSIONS_GALLERY` environment variable.
141+
142+
The value of this variable is a JSON blob that specifies the service URL, item
143+
URL, and resource URL template.
144+
145+
- `serviceURL`: specifies the location of the API (`https://<domain>/api`).
146+
- `itemURL`: the frontend for extensions which is currently just a mostly blank
147+
page that says "not supported" (`https://<domain>/item`)
148+
- `resourceURLTemplate`: used to download web extensions like Vim; code-server
149+
itself will replace the `{publisher}`, `{name}`, `{version}`, and `{path}`
150+
template variables so use them verbatim
151+
(`https://<domain>/files/{publisher}/{name}/{version}/{path}`).
152+
153+
For example (replace `<domain>` with your marketplace's domain):
154+
141155
```console
142156
export EXTENSIONS_GALLERY='{"serviceUrl":"https://<domain>/api", "itemUrl":"https://<domain>/item", "resourceUrlTemplate": "https://<domain>/files/{publisher}/{name}/{version}/{path}"}'
143157
code-server

0 commit comments

Comments
 (0)