Skip to content

Commit 14e8548

Browse 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. Remove the 3.12 note. Rebuild the subcommand list from `src help` so it matches the binary: drop `extensions`, add `abc`, `codeowners`, `debug`, `lsp`, `search-jobs`, and `snapshot`. Bump example versions to 8.1.2687 / 8.1, default the macOS download to `src_darwin_arm64` with an Intel fallback, note the `src_linux_arm64` build, and use "macOS" consistently. Amp-Thread-ID: https://ampcode.com/threads/T-01a1a3a9-87bc-743d-b475-c96ace107ed5 Co-authored-by: Amp <amp@ampcode.com>
1 parent 2cf148e commit 14e8548

1 file changed

Lines changed: 38 additions & 31 deletions

File tree

‎README.md‎

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
- **Manage & administrate** repositories, users, and more
1212
- **Easily convert src-CLI commands to equivalent curl commands**, just add --get-curl!
1313

14-
**Note:** Using Sourcegraph 3.12 or earlier? [See the older README](https://github.com/sourcegraph/src-cli/tree/3.11.2).
15-
1614
## Installation
1715

1816
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.
1917

20-
### Installation: Mac OS
18+
### Installation: macOS
2119

2220
#### Latest version
2321

2422
```bash
25-
curl -L https://sourcegraph.com/.api/src-cli/src_darwin_amd64 -o /usr/local/bin/src
23+
curl -L https://sourcegraph.com/.api/src-cli/src_darwin_arm64 -o /usr/local/bin/src
2624
chmod +x /usr/local/bin/src
2725
```
2826

27+
On an Intel Mac, replace `src_darwin_arm64` with `src_darwin_amd64`.
28+
2929
or with Homebrew:
3030

3131
```bash
@@ -43,20 +43,20 @@ npm install -g @sourcegraph/src
4343
Replace `sourcegraph.example.com` with your Sourcegraph instance URL:
4444

4545
```bash
46-
curl -L https://sourcegraph.example.com/.api/src-cli/src_darwin_amd64 -o /usr/local/bin/src
46+
curl -L https://sourcegraph.example.com/.api/src-cli/src_darwin_arm64 -o /usr/local/bin/src
4747
chmod +x /usr/local/bin/src
4848
```
4949

50-
or, if you know the specific version to target, for example 3.43.2:
50+
or, if you know the specific version to target, for example 8.1.2687:
5151

5252
```bash
53-
brew install sourcegraph/src-cli/src-cli@3.43.2
53+
brew install sourcegraph/src-cli/src-cli@8.1.2687
5454
```
5555

5656
or with npm/npx:
5757

5858
```bash
59-
npx @sourcegraph/src@3.43.2 version
59+
npx @sourcegraph/src@8.1.2687 version
6060
```
6161

6262
> Note: Versioned formulas are available on Homebrew for Sourcegraph versions 3.43.2 and later.
@@ -70,6 +70,8 @@ curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o /usr/local/bin/s
7070
chmod +x /usr/local/bin/src
7171
```
7272

73+
On an ARM host, replace `src_linux_amd64` with `src_linux_arm64`.
74+
7375
or with npm:
7476

7577
```bash
@@ -85,10 +87,10 @@ curl -L https://sourcegraph.example.com/.api/src-cli/src_linux_amd64 -o /usr/loc
8587
chmod +x /usr/local/bin/src
8688
```
8789

88-
or, with npm/npx, if you know the specific version to target, for example 3.43.2:
90+
or, with npm/npx, if you know the specific version to target, for example 8.1.2687:
8991

9092
```bash
91-
npx @sourcegraph/src@3.43.2 version
93+
npx @sourcegraph/src@8.1.2687 version
9294
```
9395

9496
### Installation: Windows
@@ -97,7 +99,7 @@ See [Sourcegraph CLI for Windows](WINDOWS.md).
9799

98100
### Installation: Docker
99101

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).
102+
`sourcegraph/src-cli` is published to Docker Hub. You can use the `latest` tag or a specific version such as `8.1`. To see all versions view [sourcegraph/src-cli tags](https://hub.docker.com/r/sourcegraph/src-cli/tags).
101103

102104
```bash
103105
docker run --rm=true sourcegraph/src-cli:latest search 'hello world'
@@ -119,7 +121,7 @@ For PowerShell on Windows:
119121
$env:SRC_ENDPOINT = 'https://sourcegraph.example.com'
120122
```
121123

122-
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.
124+
For convenience, add this environment variable to your terminal profile or system environment variables. On macOS 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.
123125

124126
If `SRC_ENDPOINT` is not set, `src` defaults to `https://sourcegraph.com`.
125127

@@ -169,27 +171,32 @@ Is your Sourcegraph instance behind a custom auth proxy? See [auth proxy configu
169171

170172
`src` provides different subcommands to interact with different parts of Sourcegraph:
171173

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
181-
- `src extsvc` - manage external services (repository configuration)
182-
- `src extensions` - manage extensions
183-
- `src code-intel` - manages Code Intelligence data
184-
- `src serve-git` - serves your local git repositories over HTTP for Sourcegraph to pull
185-
- `src version` - check version and guaranteed-compatible version for your Sourcegraph instance
174+
- `src login` - authenticate to a Sourcegraph instance with your user credentials
175+
- `src auth` - print the active authentication token or authorization header
176+
- `src search` - perform searches and get results in your terminal or as JSON
177+
- `src search-jobs` - manage search jobs
178+
- `src api` - run Sourcegraph GraphQL API requests
179+
- `src batch` - execute and manage [batch changes](https://sourcegraph.com/docs/batch_changes)
180+
- `src abc` - manage agentic batch changes
181+
- `src repos` - manage repositories
182+
- `src users` - manage users
183+
- `src orgs` - manage organizations
184+
- `src config` - manage global, org, and user settings
185+
- `src extsvc` - manage external services (repository configuration)
186+
- `src codeowners` - manage ingested code ownership data
187+
- `src code-intel` - manage code intelligence data
188+
- `src lsp` - run a Language Server Protocol server that proxies requests to Sourcegraph code intelligence
189+
- `src serve-git` - serve your local git repositories over HTTP for Sourcegraph to pull
190+
- `src debug` - gather and bundle debug data from a Sourcegraph deployment for troubleshooting
191+
- `src snapshot` - manage snapshots of Sourcegraph instance databases (experimental)
192+
- `src version` - display and compare the `src` version against the recommended version for your Sourcegraph instance
186193

187194
Run `src -h` and `src <subcommand> -h` for more detailed usage information.
188195
You can also read the [usage docs for the latest version of `src-cli`](https://sourcegraph.com/docs/cli/references) online.
189196

190-
#### Optional: Renaming `src`
197+
### Optional: Renaming `src`
191198

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:
199+
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:
193200

194201
```sh
195202
mv /usr/local/bin/src /usr/local/bin/src-cli
@@ -203,10 +210,10 @@ You can then invoke it via `src-cli`.
203210

204211
## Telemetry
205212

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:
213+
`src` includes the operating system and architecture in the `User-Agent` header sent to Sourcegraph. For example, running `src` version 8.1.2687 on an x86-64 Linux host will result in this header:
207214

208-
```
209-
src-cli/3.21.10 linux amd64
215+
```text
216+
src-cli/8.1.2687 linux amd64
210217
```
211218

212219
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.

0 commit comments

Comments
 (0)