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
Copy file name to clipboardExpand all lines: docs/cody/clients/install-cli.mdx
+7-12Lines changed: 7 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,15 @@
2
2
3
3
<pclassName="subtitle">Learn how to install the <code>cody</code> command-line tool and using the <code>cody chat</code> subcommand.</p>
4
4
5
-
<Callouttype="note"title="Experimental">
6
-
Cody CLI support is in the experimental stage.
5
+
<Callouttype="note">
6
+
Cody CLI support is in the Experimental stage for Enterprise accounts.
7
7
</Callout>
8
8
9
9
Cody CLI is the same technology that powers the Cody IDE plugins but available from the command-line.
10
10
Use Cody CLI for ad-hoc exploration in your terminal or as part of scripts to automate your workflows.
11
11
12
-
Cody CLI is available to Free, Pro, and Enterprise customers.
13
-
14
12
<LinkCards>
15
-
<LinkCardhref="https://www.npmjs.com/package/@sourcegraph/cody"imgSrc="https://storage.googleapis.com/sourcegraph-assets/docs/images/cody/command-line-blue.svg"imgAlt="Cody CLI"title="Cody CLI"description="Install Cody's free command-line interface from npm" />
13
+
<LinkCardhref="https://www.npmjs.com/package/@sourcegraph/cody"imgSrc="https://storage.googleapis.com/sourcegraph-assets/docs/images/cody/command-line-blue.svg"imgAlt="Cody CLI"title="Cody CLI"description="Install Cody's command-line interface from npm" />
16
14
</LinkCards>
17
15
18
16
## Prerequisites
@@ -91,8 +89,9 @@ This will open a browser window where you can authenticate with your Sourcegraph
91
89
Close the browser tab after authentication is complete.
92
90
</Tab>
93
91
<Tabtitle="Command Line">
94
-
- For Cody Pro/Free accounts, create an access token at https://sourcegraph.com/user/settings/tokens.
95
-
- For Cody Enterprise accounts, sign into your Sourcegraph Enterprise account and create an access token under `Account > Settings > Access Tokens`.
92
+
93
+
- Cody Enterprise accounts can sign into their Sourcegraph Enterprise account and create an access token under `Account > Settings > Access Tokens`.
94
+
-
96
95
```shell
97
96
export SRC_ENDPOINT=ENDPOINT
98
97
export SRC_ACCESS_TOKEN=ACCESS_TOKEN
@@ -114,7 +113,6 @@ cody auth whoami
114
113
115
114
**Skip this step if you have already authenticated with the `cody auth login` command.**
116
115
117
-
118
116
If you prefer not to let Cody CLI store your access token, you can also pass the endpoint URL and access token through the environment variables `SRC_ENDPOINT` and `SRC_ACCESS_TOKEN`.
It's recommended to store these access tokens in a secure location.
133
+
It's recommended to store these access tokens in a secure location.
136
134
For example, you can store them with a password manager like [1Password](https://1password.com/) or [Bitwarden](https://bitwarden.com/).
137
135
138
136
It is not recommended to export these variables in your shell startup script because it will expose your access token to all commands you run from the terminal. Instead, consider sourcing these environment variables on-demand when you need to authenticate with the Cody CLI.
@@ -209,6 +207,3 @@ Use the `-` trailing argument as an alternative to `--stdin` to read the diff fr
209
207
```shell
210
208
git diff | cody chat -m 'Write a commit message for this diff' -
0 commit comments