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
title: Quickstart for remote Claude Code agents on Depot
3
-
ogTitle: Getting started with remote Claude Code agents on Depot
3
+
ogTitle: Get started with remote Claude Code agents on Depot
4
4
description: Step by step guide on how to get up and running with remote Claude Code agents on Depot.
5
5
---
6
6
7
7
import {CheckCircleIcon} from'~/components/icons'
8
8
import {DocsCTA} from'~/components/blog/CTA'
9
9
10
-
This guide will help you get started with Depot's remote agent sandboxes for running Claude Code agents. With Depot, you can run your coding agents in a secure, isolated environment in the cloud, allowing you to move your coding sessions off of your local machine and into fast remote environments where you can easily launch, resume, and share coding sessions.
10
+
Run Claude Code agents in Depot's remote agent sandboxes: a secure, isolated environment in the cloud, where you can launch, resume, and share coding sessions.
11
11
12
-
## 1. Install the `depot` CLI
12
+
## Install the Depot CLI
13
13
14
-
Before you can start running remote agents, you need to install the Depot CLI. The CLI is available for Mac and Linux.
14
+
You'll need the [Depot CLI](/docs/cli/reference) on your machine to configure and launch remote sandboxes.
15
15
16
-
**Note:** Remote agent sandboxes are only available on `depot` CLI version 2.96.2 or later.
16
+
### macOS
17
17
18
-
For Mac, you can install the CLI with Homebrew:
18
+
Install the Depot CLI with Homebrew:
19
19
20
20
```shell
21
21
brew install depot/tap/depot
22
22
```
23
23
24
-
For Linux, you can install the CLI with [our installation script](https://depot.dev/install-cli.sh):
24
+
### Linux
25
+
26
+
Install the Depot CLI with the installation script.
27
+
28
+
Install the latest version:
25
29
26
30
```shell
27
-
# Install the latest version
28
31
curl -L https://depot.dev/install-cli.sh | sh
29
-
30
-
# Install a specific version
31
-
curl -L https://depot.dev/install-cli.sh | sh -s 2.96.2
32
32
```
33
33
34
-
For all other platforms, you can download the binary directly from [the latest release](https://github.com/depot/cli/releases).
35
-
36
-
## 2. Creating a Depot organization
37
-
38
-
Claude Code agent sandboxes and sandbox secrets live under a Depot organization. So before you can launch your first agent sandbox, you need to create a Depot organization.
39
-
40
-

34
+
### All platforms
41
35
42
-
1. Login to your Depot account to get to your [list of organizations](/orgs)
43
-
2. Click on the `Create Organization` button
44
-
3. Enter an organization name
45
-
4. Click `Create organization`
36
+
Download the binary file for your platform from the [Depot CLI releases page](https://github.com/depot/cli/releases) in GitHub.
46
37
47
-
## 3. Get your Anthropic credentials
38
+
## Get and set your Anthropic credentials
48
39
49
-
Today Depot only supports bringing your own Anthropic subscription or API key. We do not provide our own Anthropic API key for use with Depot's remote agent sandboxes.
40
+
To run Claude Code in remote agent sandboxes, configure your Anthropic credentials. You have two options:
50
41
51
-
There are two options for configuring your Anthropic credentials to use with Depot's remote agent sandboxes.
42
+
- Claude Code token (Max plan)
43
+
- Anthropic API key
52
44
53
-
### Claude Code token for Max plan
45
+
### Use your Claude Code token with Anthropic Max plan (recommended)
54
46
55
-
**This is our recommended method for using Claude Code with Depot's remote agent sandboxes.**
47
+
1. Use the `claude` CLI to generate a new OAuth token:
56
48
57
-
If you're on the **Max plan** from Anthropic, you need to get your Claude Code OAuth token to use with Depot's remote agent sandboxes.
49
+
```shell
50
+
claude setup-token
51
+
```
58
52
59
-
First, using the `claude` CLI, you can generate a new OAuth token:
53
+
This will output a token that you can copy to use in the next step.
60
54
61
-
```shell
62
-
claude setup-token
63
-
```
64
-
65
-
This will output a token that you can copy and use in the next step.
2. Set the token as a secret in your Depot organization:
68
58
69
-
### Anthropic API key
59
+
```shell
60
+
depot claude secrets add CLAUDE_CODE_OAUTH_TOKEN --value <"claude-code-token">
61
+
```
70
62
71
-
Alternatively, you can generate an Anthropic API key by following their [Developer Platform](https://docs.anthropic.com/en/api/overview) documentation.
63
+
### Use your Anthropic API key
72
64
73
-
## 4. Set your Anthropic credentials
65
+
1. Generate an API key in the Anthropic web console. Learn how to get an API key in the [Claude Docs](https://docs.claude.com/en/api/overview).
74
66
75
-
For Depot to use your Anthropic credentials for remote Claude Code agents, you need to configure a secret in your Depot organization for your Anthropic API key or OAuth token.
67
+
2. Set the API key as a secret in your Depot organization:
76
68
77
-
### Max plan subscribers (OAuth token)
69
+
```shell
70
+
depot claude secrets add ANTHROPIC_API_KEY --value <"anthropic-api-key">
71
+
```
78
72
79
-
If you generated a Claude Code OAuth token, you can set it as a secret in your Depot organization:
80
-
81
-
```shell
82
-
depot claude secrets add CLAUDE_CODE_OAUTH_TOKEN --value <your-token-from-step-3>
83
-
```
73
+
## Access your Git repositories
84
74
85
-
### Anthropic API key
86
-
87
-
If you generated an Anthropic API key, you can set it as a secret in your Depot organization:
88
-
89
-
```shell
90
-
depot claude secrets add ANTHROPIC_API_KEY --value <your-anthropic-api-key-from-step-3>
91
-
```
92
-
93
-
## 5. Access your git repositories
94
-
95
-
You can work with public and private git repositories in your remote agent sandboxes. If you want to use private git repositories, you need to either install the `Depot Code` app into your GitHub organization, or set your Git credentials as secrets in your Depot organization.
75
+
You can work with public and private Git repositories in your remote agent sandboxes. To use private Git repositories, either install the Depot Code app into your GitHub organization or set your Git credentials as secrets in your Depot organization.
96
76
97
77
### Install the Depot Code app into your GitHub organization
98
78
99
-
To grant remote agent sandboxes access to your private GitHub repositories, you can install the `Depot Code` app into your GitHub organization. This will allow you to clone and push changes to your private repositories from within your remote agent sandboxes.
79
+
To grant remote agent sandboxes access to clone and push changes to your private GitHub repositories, install the Depot Code app into your GitHub organization:
80
+
81
+
1. Log in to your [Depot dashboard](/orgs).
82
+
2. Click **Settings**.
83
+
3. In the **GitHub Code Access** section, click **Connect to GitHub**.
84
+
4. Follow the prompts to add Depot Code to your GitHub organization.
1. Login to your Depot account and [select your organization](/orgs)
104
-
2. Click on the `Settings` tab in the sidebar
105
-
3. Scroll down to the `GitHub Code Access` section
106
-
4. Click `Connect to GitHub`
88
+
### Grant access outside of GitHub
107
89
108
-
### Granting access outside of GitHub
90
+
If you don't want to use the Depot Code app, you can set your Git credentials as secrets in your Depot organization allow changes to your private repositories. The value of `GIT_CREDENTIALS` must be one of the following:
109
91
110
-
If you prefer not to use the Depot Code app, you can set your Git credentials as secrets in your Depot organization. This allows you to clone and push changes to your private repositories using your Git credentials.
92
+
- A token, such as a personal access token. Depot uses `x-token` as the username and the token you specify as the password.
93
+
- A user name and password in the format: username@password.
111
94
112
-
To set your Git credentials as secrets, run the following commands:
95
+
To set your Git credentials as secrets, run the following command:
113
96
114
97
```shell
115
-
depot claude secrets add GIT_CREDENTIALS --value <your-key>
98
+
depot claude secrets add GIT_CREDENTIALS --value <"your-credentials">
116
99
```
117
100
118
-
## 6. Launch your first remote agent sandbox
101
+
## Launch your first remote agent sandbox
119
102
120
-
Once you've configured your Anthropic credentials and Git access, you can launch your first remote agent sandbox using the `depot claude` command.
103
+
To create a remote agent sandbox, run the `depot claude` command. For example:
This command immediately tells the Depot control plane to start a new agent sandbox for Claude Code. Returning a url to the session inside of Depot where you can follow the output.
117
+
This command tells the Depot control plane to start a new agent sandbox for Claude Code. The command returns a URL to the session inside of Depot where you can follow the output.
135
118
136
119

137
120
138
-
And that's it! You now have your Depot organization set up to make use of Depot agent sandboxes for Claude Code. You can pass different git repositories that your git credentials or Depot Code app have access to, you can specify different branches, you can resume a session using the `--resume` flag, and you can fork new sessions from an existing file systems using the `--session-id` flag and `--resume` flag at the same time.
121
+
And that's it! Your Depot organization is set up to use remote agent sandboxes for Claude Code.
122
+
123
+
## Next steps
124
+
125
+
Try the following with your remote agent sandbox:
126
+
127
+
- Work with different Git repositories that your Git credentials or Depot Code app have access to.
128
+
- Switch between branches using the `--branch` flag.
129
+
- Resume a session using the `--resume` flag.
130
+
- Fork a new session from an existing session using the `--resume` and `--fork-session` flags together.
131
+
132
+
Run `depot claude --help` or check the [CLI reference](/docs/cli/reference#depot-claude) to see all the available command options.
Copy file name to clipboardExpand all lines: content/container-builds/quickstart.mdx
+3-25Lines changed: 3 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,10 @@ description: Get started with Depot for up to 40x faster container image builds
6
6
7
7
Get faster container image builds by replacing `docker build` with `depot build`.
8
8
9
-
For faster GitHub Actions, see [GitHub Actions runners](/docs/github-actions/quickstart).
10
-
11
9
## Install the Depot CLI
12
10
11
+
You'll need the [Depot CLI](/docs/cli/reference) on your machine to run local builds.
12
+
13
13
### macOS
14
14
15
15
Install the Depot CLI with Homebrew:
@@ -28,30 +28,10 @@ Install the latest version:
28
28
curl -L https://depot.dev/install-cli.sh | sh
29
29
```
30
30
31
-
To install a specific version, replace `VERSION_NUMBER` with the version you want to install:
32
-
33
-
```shell
34
-
curl -L https://depot.dev/install-cli.sh | sh -s VERSION_NUMBER
35
-
```
36
-
37
31
### All platforms
38
32
39
33
Download the binary file for your platform from the [Depot CLI releases page](https://github.com/depot/cli/releases) in GitHub.
40
34
41
-
## Create a Depot organization
42
-
43
-
Organizations are the top level entity in your Depot account for usage and billing. You can use an organization to represent a company, a team, or a customer.
44
-
45
-
To continue with your current organization, skip to the next section.
46
-
47
-
To create a new organization, follow these steps:
48
-
49
-
1. Log in to your [Depot dashboard](/orgs).
50
-
2. Click on the current organization name, then select **Switch organization > Create a new organization**.
51
-
3. Enter an organization name.
52
-
4. Click **Create organization**.
53
-
5. Click **New project** and select your region, cache storage policy, and connection.
54
-
55
35
## Run a local build
56
36
57
37
The [`depot build` command](/docs/cli/reference#depot-build) accepts the same parameters as the `docker build` command.
@@ -82,9 +62,7 @@ Depot integrates with any CI provider. Use the following guides to help you get
82
62
83
63
## Add a build minute usage cap
84
64
85
-
Organizations have unlimited monthly build minutes by default.
86
-
87
-
To make costs predictable, configure a usage cap for your organization:
65
+
Organizations have unlimited monthly build minutes by default. To make costs predictable, configure a usage cap for your organization:
88
66
89
67
1. Log in to your [Depot dashboard](/orgs) and select your organization.
Copy file name to clipboardExpand all lines: content/github-actions/quickstart.mdx
+7-17Lines changed: 7 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,20 +6,6 @@ description: Get faster GitHub Actions with Depot's fully-managed GitHub Actions
6
6
7
7
Connect your Depot organization to GitHub and configure your GitHub Actions to use Depot managed runners.
8
8
9
-
## Create a Depot organization
10
-
11
-
Organizations are the top level entity in your Depot account for usage and billing. You can use an organization to represent a company, a team, or a customer.
12
-
13
-
To continue with your current organization, skip to the next section.
14
-
15
-
To create a new organization, follow these steps:
16
-
17
-
1. Log in to your [Depot dashboard](/orgs).
18
-
2. Click on the current organization name, then select **Switch organization > Create a new organization**.
19
-
3. Enter an organization name.
20
-
4. Click **Create organization**.
21
-
5. Click **New project** and select your region, cache storage policy, and connection.
22
-
23
9
## Connect to GitHub
24
10
25
11
To configure Depot GitHub Action Runners, connect to your GitHub organization and install the Depot GitHub App:
@@ -32,7 +18,11 @@ To configure Depot GitHub Action Runners, connect to your GitHub organization an
32
18
33
19
#### Private repository approval
34
20
35
-
Some GitHub organizations require an Organization Administrator to approve the new Depot GitHub app before jobs can run on Depot runners. You can confirm the app is active and approved in the **GitHub Actions** section of your Depot dashboard.
21
+
Some GitHub organizations require an Organization Administrator to approve the new Depot GitHub app before jobs can run on Depot runners. To confirm the app is active and approved:
22
+
23
+
1. Log in to your [Depot dashboard](/orgs).
24
+
2. Click **Settings**.
25
+
3. In the **GitHub Actions runners** section, view **GitHub Connections**.
36
26
37
27
#### Public repository permissions
38
28
@@ -58,13 +48,13 @@ jobs:
58
48
59
49
## View GitHub Actions jobs
60
50
61
-
To view jobs that have run on Depot runners, go to the **GitHub Actions** section of your Depot dashboard.
51
+
To view jobs that have run on Depot runners, go to the **GitHub Actions** section of your [Depot dashboard](/orgs).
0 commit comments