WEBVTT

00:00:00.080 --> 00:00:02.760
Now, when working with Claude Code,
you can run it in a loop.

00:00:02.800 --> 00:00:06.780
You can work on it manually as we did
throughout this course,

00:00:06.800 --> 00:00:10.770
but you can also offload tasks from your
local machine

00:00:10.770 --> 00:00:14.610
to the cloud. For example, let's say
that instead of this blue in all

00:00:14.660 --> 00:00:17.750
these places in my app,
I want to use a purple color.

00:00:17.780 --> 00:00:21.140
Because it's an app built with AI,
of course, it must be

00:00:21.150 --> 00:00:25.000
purple. But for some reason,
I don't want to implement this change

00:00:25.140 --> 00:00:28.700
locally because I need to leave my
computer or anything like that.

00:00:28.820 --> 00:00:32.800
If that code lives in a GitHub repository,
which it does, I pushed

00:00:32.840 --> 00:00:36.460
it there, I can also hand that task off to

00:00:36.520 --> 00:00:40.500
Claude Code in the cloud. Now, to do that,
at the point of

00:00:40.540 --> 00:00:44.530
time where I'm recording this,
you'll need a Pro, Max, Teams,

00:00:44.560 --> 00:00:47.840
or Enterprise subscription,
and then you can head to

00:00:47.900 --> 00:00:51.760
claude.ai/code,
and you'll end up on a screen

00:00:51.800 --> 00:00:54.620
that probably looks something like this,
and you'll need to connect

00:00:55.480 --> 00:00:58.949
Claude, your Claude account to GitHub

00:00:59.580 --> 00:01:02.620
so that it can access your GitHub
repositories. And I'll do that here.

00:01:02.640 --> 00:01:06.600
Now, of course,
it won't have access to all your

00:01:06.640 --> 00:01:10.500
instead,
you need to connect the repositories

00:01:10.580 --> 00:01:14.300
on. So in my case,
I'll select this Claude Code

00:01:14.400 --> 00:01:18.290
course repository
and authorize access to that.

00:01:18.340 --> 00:01:21.900
Once you did that,
you need to create a cloud

00:01:21.940 --> 00:01:25.400
environment,
and I'll keep the name default here,

00:01:27.060 --> 00:01:29.940
choose the Trusted setup here regarding
network

00:01:30.060 --> 00:01:33.980
access.
If you give it full internet access, you,

00:01:34.060 --> 00:01:37.440
maximum flexibility,
and you might need that if your app, for

00:01:37.500 --> 00:01:41.460
example, needs to send API requests
and you want

00:01:41.540 --> 00:01:45.230
all tests to run on
that cloud environment, but, of course,

00:01:45.260 --> 00:01:48.790
with full internet access,
you also have all the full

00:01:48.820 --> 00:01:52.050
internet threat, so to say.
So I'll use the Trusted one here.

00:01:52.060 --> 00:01:56.000
And now with that set up,
you can either use Claude

00:01:56.040 --> 00:01:59.740
Code in the cloud from this web interface
or also from your local

00:01:59.780 --> 00:02:02.090
client. I'll get back to that in a second.

00:02:02.180 --> 00:02:04.190
Here, I'll first choose my repository.

00:02:04.220 --> 00:02:07.830
I got one branch there,
which I pushed to it yet at this point in

00:02:07.860 --> 00:02:11.720
time. Choose the environment,
only got one, and then you could describe

00:02:11.760 --> 00:02:15.560
your task here.
You can also choose the model that should

00:02:15.600 --> 00:02:19.590
handle this task,
you can add an image just as you can use

00:02:19.700 --> 00:02:23.640
kick off a task here. So, for example,
I could say change the main color

00:02:23.700 --> 00:02:27.620
from blue to an elegant purple,
but we can also do

00:02:27.660 --> 00:02:30.840
this from our local client instead.

00:02:30.860 --> 00:02:34.520
You can run /remoteenv to choose the
remote

00:02:34.580 --> 00:02:38.540
environment you want to use,
and once you did that, you

00:02:38.600 --> 00:02:42.080
can write a prompt as you always did,
like this, for

00:02:42.140 --> 00:02:45.640
example,
change the main color from blue to an

00:02:45.680 --> 00:02:49.120
components across all pages. Now,
this would run

00:02:49.180 --> 00:02:53.040
locally,
but you can change this by adding an

00:02:53.060 --> 00:02:56.940
front of it,
and you'll see it switches to this

00:02:56.980 --> 00:03:00.660
means in the cloud.
And you can also run multiple tasks in the

00:03:00.920 --> 00:03:04.560
by describing another task here. Now,
these

00:03:04.620 --> 00:03:08.460
tasks will run in parallel in the cloud,
so not one task, but

00:03:08.660 --> 00:03:11.320
multiple tasks running in parallel.

00:03:11.360 --> 00:03:14.260
Of course,
you could also just kick them off one

00:03:14.320 --> 00:03:17.140
You can also alternatively run

00:03:17.220 --> 00:03:21.000
claude--remote and pass your prompt

00:03:21.020 --> 00:03:24.580
here. With this flag added, it would not

00:03:24.660 --> 00:03:28.120
execute this task locally,
but instead send it to the cloud right

00:03:28.160 --> 00:03:32.020
away. So as you see here,
it now created a remote session

00:03:32.380 --> 00:03:35.920
to change this color from blue to purple,
and I can click this

00:03:36.000 --> 00:03:39.620
link to see that session, also get

00:03:39.680 --> 00:03:43.580
notifications if I want to.
And now it's working just

00:03:43.620 --> 00:03:47.400
as it did locally, but now in the cloud,
and what it does behind the scenes is that

00:03:47.460 --> 00:03:51.360
it checks out that repository,
that branch, works

00:03:51.400 --> 00:03:55.350
on the code.
It can also run tests there in the cloud

00:03:55.360 --> 00:03:59.130
and once it's done,
it will create a new Git commit

00:03:59.160 --> 00:04:03.000
So it will not just push to your main
branch, you probably wouldn't want

00:04:03.120 --> 00:04:06.960
that, instead, it creates a new branch
and opens a pull request

00:04:07.160 --> 00:04:09.980
so that you can then review
and merge those changes.

00:04:10.240 --> 00:04:13.800
Now whilst it's working,
it's also worth noting that you can also

00:04:13.840 --> 00:04:16.959
combine various features from different
modes.

00:04:17.000 --> 00:04:20.600
For example,
let's say we want to add a confirmation

00:04:20.700 --> 00:04:24.380
public sharing in the app.
Maybe we want to start in plan

00:04:24.420 --> 00:04:28.380
mode. Plan mode, of course,
is something we have to do locally because

00:04:28.440 --> 00:04:32.280
need to answer some questions.
So we can start

00:04:32.290 --> 00:04:36.160
this task locally in plan mode
or in any other mode

00:04:36.180 --> 00:04:40.100
for that matter, but plan mode
is something you typically want to do

00:04:40.120 --> 00:04:44.040
have to do locally,
and we can then hand that task off to

00:04:44.060 --> 00:04:47.400
the cloud once we're done planning,
for example.

00:04:47.440 --> 00:04:50.920
So, for example,
here where it's now done planning,

00:04:51.000 --> 00:04:54.480
plan, I can continue, but then I'll hit

00:04:54.580 --> 00:04:58.100
Escape to interrupt Claude Code,
and then I can use the

00:04:58.140 --> 00:05:02.110
ampersand symbol again
and say implement the plan, but

00:05:02.240 --> 00:05:05.390
now it will do so in the background,
so in the cloud.

00:05:05.440 --> 00:05:09.230
Now I'm getting an error here that this
is not a Git repository, which is

00:05:09.280 --> 00:05:12.620
wrong. It is.
Might not occur for you anymore.

00:05:12.660 --> 00:05:14.900
What I can, of course, do is I can use

00:05:14.940 --> 00:05:18.660
claude--remote-c to continue that last

00:05:18.720 --> 00:05:21.580
conversation, that is what -c does,
and say

00:05:21.660 --> 00:05:25.610
implement_the_plan, and this

00:05:25.640 --> 00:05:29.460
will now start a remote task because this
is working for me

00:05:29.560 --> 00:05:33.180
here. For you,
using this ampersand symbol might work

00:05:33.220 --> 00:05:36.640
should. Now I will say
that this Claude Code in the cloud

00:05:36.720 --> 00:05:40.500
feature is not just a bit hard to
pronounce, but has also been a bit

00:05:40.510 --> 00:05:44.500
buggy for me, at least
when trying to work with it from my local

00:05:44.540 --> 00:05:48.450
Claude Code installation.
When starting sessions from in here,

00:05:48.480 --> 00:05:51.540
web-based interface, it worked fine,
but it's absolutely

00:05:51.640 --> 00:05:55.180
possible that it might not work the way it
should right now

00:05:55.280 --> 00:05:59.240
because it's still in beta
or in research preview at the point of

00:05:59.340 --> 00:06:03.060
time where I'm recording this, but,
of course,

00:06:03.100 --> 00:06:07.020
for you. It is, of course,
a powerful feature because being able to

00:06:07.060 --> 00:06:10.920
tasks to the cloud
and offload them to the cloud can be

00:06:11.020 --> 00:06:14.920
useful. Here, for example,
it did now finish changing the main color

00:06:14.980 --> 00:06:18.840
from blue to purple,
and I could evaluate the changes

00:06:18.880 --> 00:06:22.680
here or create a pull request.
It might also do that in the future

00:06:22.840 --> 00:06:26.060
automatically. Here, I'll do it manually,

00:06:27.860 --> 00:06:31.500
and, of course,
doing so allows me to then review those

00:06:31.580 --> 00:06:35.080
changes and merge the pull request
if I'm happy with it.

00:06:36.600 --> 00:06:40.060
So we can take a look at the commit
and see that it essentially

00:06:40.540 --> 00:06:44.240
changed some Tailwind colors, which,
of course, makes sense.

00:06:44.280 --> 00:06:48.260
Now I'll not merge this here, but that
is how you could use Claude

00:06:48.300 --> 00:06:50.280
Code in the web.
