You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e3c8b1e
Browse filesBrowse the repository at this point in the historyBrowse files
docs/readme: drop the Sourcegraph 3.12 note and refresh stale content
The README still pointed readers of Sourcegraph 3.12 or earlier at a
3.11.2-era README, listed a `src extensions` command that no longer
exists, and left out commands that have shipped since. Install examples
used 3.x versions and only offered amd64 downloads, and the Go Report
Card badge now renders "retired" because that service has been sunset.
Remove the 3.12 note and the Go Report Card badge. Rebuild the
subcommand list from `src help`, sorted alphabetically: drop
`extensions`, add `abc`, `codeowners`, `debug`, `lsp`, `search-jobs`,
and `snapshot`. Use 8.1.2687 in the versioned install examples and drop
the repeated version mentions in the surrounding prose. Default the
macOS download to `src_darwin_arm64`, note the `src_linux_arm64` build,
fix the `docs/batch_changes` redirect, drop the dead-to-bots
computerhope link and the stale Homebrew 3.43.2 note, and tighten the
Installation and Docker wording.
Point the `src config` error message at the README's
"Connect to your Sourcegraph instance" heading; its `#authentication`
anchor no longer exists. Add `.markdownlint-cli2.jsonc` so the README
lints clean: prose here is not hard-wrapped, the screenshot and the
anchor other repos link to need inline HTML, and the per-OS install
headings repeat on purpose.
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a1a3a9-87bc-743d-b475-c96ace107ed5
<imgsrc="https://user-images.githubusercontent.com/3173176/43567326-3db5f31c-95e6-11e8-9e74-4c04079c01b0.png"alt="src search results in a terminal"width=500align=right>
4
4
5
5
`src` is a command line interface to Sourcegraph:
6
6
7
7
-**Search & get results in your terminal**
8
8
-**Search & get JSON** for programmatic consumption
9
9
- Make **GraphQL API requests** with auth easily & get JSON back fast
-**Manage & administrate** repositories, users, and more
12
12
-**Easily convert src-CLI commands to equivalent curl commands**, just add --get-curl!
13
13
14
-
**Note:** Using Sourcegraph 3.12 or earlier? [See the older README](https://github.com/sourcegraph/src-cli/tree/3.11.2).
15
-
16
14
## Installation
17
15
18
-
Binary downloads are available on the [releases tab](https://github.com/sourcegraph/src-cli/releases), and through Sourcegraph.com. _If the latest version does not work for you,_ consider using the version compatible with your Sourcegraph instance instead.
16
+
Download the latest version from the [releases page](https://github.com/sourcegraph/src-cli/releases), or from Sourcegraph.com using the commands below. If the latest version does not work with your Sourcegraph instance, download the version compatible with your Sourcegraph instance, as shown below.
or, with npm/npx, if you know the specific version to target, for example 3.43.2:
86
+
or, with npm/npx, if you know the specific version to target:
89
87
90
88
```bash
91
-
npx @sourcegraph/src@3.43.2 version
89
+
npx @sourcegraph/src@8.1.2687 version
92
90
```
93
91
94
92
### Installation: Windows
@@ -97,7 +95,7 @@ See [Sourcegraph CLI for Windows](WINDOWS.md).
97
95
98
96
### Installation: Docker
99
97
100
-
`sourcegraph/src-cli` is published to Docker Hub. You can use the `latest` tag or a specific version such as `3.43`. To see all versions view [sourcegraph/src-cli tags](https://hub.docker.com/r/sourcegraph/src-cli/tags).
98
+
The [`sourcegraph/src-cli`](https://hub.docker.com/r/sourcegraph/src-cli/tags) image on Docker Hub is tagged with `latest` and with each release version.
101
99
102
100
```bash
103
101
docker run --rm=true sourcegraph/src-cli:latest search 'hello world'
For convenience, add this environment variable to your terminal profile or system environment variables. On Mac OS and Linux, the terminal profile is typically `~/.bash_profile` for Bash or `~/.zprofile` for Zsh. On Windows, you can add it through the *System Properties* window. See [these instructions](https://www.computerhope.com/issues/ch000549.htm) for details.
120
+
For convenience, add this environment variable to your terminal profile or system environment variables. On macOS and Linux, the terminal profile is typically `~/.zprofile` for Zsh or `~/.bash_profile` for Bash. On Windows, you can add it through the *System Properties* window.
123
121
124
122
If `SRC_ENDPOINT` is not set, `src` defaults to `https://sourcegraph.com`.
125
123
@@ -169,27 +167,32 @@ Is your Sourcegraph instance behind a custom auth proxy? See [auth proxy configu
169
167
170
168
`src` provides different subcommands to interact with different parts of Sourcegraph:
171
169
172
-
-`src login` - authenticate to a Sourcegraph instance with your user credentials
173
-
-`src auth` - print the active authentication token or authorization header
174
-
-`src search` - perform searches and get results in your terminal or as JSON
175
-
-`src api` - run Sourcegraph GraphQL API requests
176
-
-`src batch` - execute and manage [batch changes](https://sourcegraph.com/docs/batch_changes)
177
-
-`src repos` - manage repositories
178
-
-`src users` - manage users
179
-
-`src orgs` - manages organization
180
-
-`src config` - manage global, org, and user settings
-`src login` - authenticate to a Sourcegraph instance with your user credentials
180
+
-`src lsp` - run a Language Server Protocol server that proxies requests to Sourcegraph code intelligence
181
+
-`src orgs` - manage organizations
182
+
-`src repos` - manage repositories
183
+
-`src search` - perform searches and get results in your terminal or as JSON
184
+
-`src search-jobs` - manage search jobs
185
+
-`src serve-git` - serve your local git repositories over HTTP for Sourcegraph to pull
186
+
-`src snapshot` - manage snapshots of Sourcegraph instance databases (experimental)
187
+
-`src users` - manage users
188
+
-`src version` - display and compare the `src` version against the recommended version for your Sourcegraph instance
186
189
187
190
Run `src -h` and `src <subcommand> -h` for more detailed usage information.
188
191
You can also read the [usage docs for the latest version of `src-cli`](https://sourcegraph.com/docs/cli/references) online.
189
192
190
-
####Optional: Renaming `src`
193
+
### Optional: Renaming `src`
191
194
192
-
If you have a naming conflict with the `src` command, such as a Bash alias, you can rename the static binary. For example, on Linux / Mac OS:
195
+
If you have a naming conflict with the `src` command, such as a Bash alias, you can rename the static binary. For example, on Linux / macOS:
193
196
194
197
```sh
195
198
mv /usr/local/bin/src /usr/local/bin/src-cli
@@ -203,13 +206,13 @@ You can then invoke it via `src-cli`.
203
206
204
207
## Telemetry
205
208
206
-
`src` includes the operating system and architecture in the `User-Agent` header sent to Sourcegraph. For example, running `src`version 3.21.10 on an x86-64 Linux host will result in this header:
209
+
`src` includes the operating system and architecture in the `User-Agent` header sent to Sourcegraph. For example, running `src` on an x86-64 Linux host will result in this header:
207
210
208
-
```
209
-
src-cli/3.21.10 linux amd64
211
+
```text
212
+
src-cli/8.1.2687 linux amd64
210
213
```
211
214
212
-
To disable this and _only_ send the version, you can set `-user-agent-telemetry=false` for a single command, or set the `SRC_DISABLE_USER_AGENT_TELEMETRY` environment variable to any non-blank string.
215
+
To disable this and *only* send the version, you can set `-user-agent-telemetry=false` for a single command, or set the `SRC_DISABLE_USER_AGENT_TELEMETRY` environment variable to any non-blank string.
213
216
214
217
As with other Sourcegraph telemetry, any collected data is only sent to Sourcegraph.com in aggregate form.
0 commit comments