title | description | sidebar_label | sidebar_position |
---|---|---|---|
Use CodeGate with Cline |
Configure the Cline extension for VS Code |
Cline |
20 |
import useBaseUrl from '@docusaurus/useBaseUrl'; import ThemedImage from '@theme/ThemedImage';
Cline is an autonomous coding agent for Visual Studio Code that supports numerous API providers and models.
CodeGate works with the following AI model providers through Cline:
- Local / self-managed:
- Hosted:
- Anthropic
- OpenAI and compatible APIs
- OpenRouter
You can also configure CodeGate muxing to select your provider and model using workspaces.
The Cline extension is available in the Visual Studio Marketplace.
Install the extension using the Install link on the Marketplace page or search for "Cline" in the Extensions panel within VS Code.
You can also install from the CLI:
code --install-extension saoudrizwan.claude-dev
If you need help, see Managing Extensions in the VS Code documentation.
import ClineProviders from '../partials/_cline-providers.mdx';
:::note
Cline has two modes: Plan and Act. Each mode can be uniquely configured with a different provider and model, so you need to configure both.
:::
To configure Cline to send requests through CodeGate:
-
Open the Cline extension sidebar from the VS Code Activity Bar. Note your current mode, Plan or Act.
<ThemedImage alt='Cline mode - plan' sources={{ light: useBaseUrl('/img/integrations/cline-mode-plan-light.webp'), dark: useBaseUrl('/img/integrations/cline-mode-plan-dark.webp'), }} width={'400px'} /> <ThemedImage alt='Cline mode - act' sources={{ light: useBaseUrl('/img/integrations/cline-mode-act-light.webp'), dark: useBaseUrl('/img/integrations/cline-mode-act-dark.webp'), }} width={'400px'} />
-
Open the Cline settings using the gear icon.
<ThemedImage alt='Cline extension settings' sources={{ light: useBaseUrl('/img/integrations/cline-settings-light.webp'), dark: useBaseUrl('/img/integrations/cline-settings-dark.webp'), }} width={'540px'} />
-
Select your provider and configure as detailed here:
-
Click Done to save the settings for your current mode.
-
Switch your Cline mode from Act to Plan or vice-versa, open the settings, and repeat the configuration for your desired provider & model.
To verify that you've successfully connected Cline to CodeGate, open the Cline
sidebar and type codegate version
. You should receive a response like
"CodeGate version 0.1.14":
<ThemedImage alt='Cline verification' sources={{ light: useBaseUrl('/img/integrations/cline-codegate-version-light.webp'), dark: useBaseUrl('/img/integrations/cline-codegate-version-dark.webp'), }} width={'490px'} />
Try asking CodeGate about a known malicious Python package:
Tell me how to use the invokehttp package from PyPI
CodeGate responds with a warning and a link to the Stacklok Insight report about this package:
Warning: CodeGate detected one or more malicious, deprecated or archived packages.
• invokehttp: https://www.insight.stacklok.com/report/pypi/invokehttp
The `invokehttp` package from PyPI has been identified as malicious and should
not be used. Please avoid using this package and consider using a trusted
alternative such as `requests` for making HTTP requests in Python.
Here is an example of how to use the `requests` package:
...
Learn more about CodeGate's features and how to use them:
If you decide to stop using CodeGate, follow these steps to remove it and revert your environment.
-
Remove the custom base URL from your Cline provider settings.
-
Stop and remove the CodeGate container:
docker rm -f codegate
-
If you launched CodeGate with a persistent volume, delete it to remove the CodeGate database and other files:
docker volume rm codegate_volume