Cloud Code powered by the new Cloud four models produces the best AI code I've seen yet.
But it does run-in the terminal, which means it can be a bit intimidating at first. There's also a few quirks. So in this video, I'll show you the top 10 essential tips you need to know to get the most of Cloud Code. Let's go.
So I'm logged in to Cloud Code. And if you ever done software development before, you're gonna know that a little bit of planning goes a long way. And Cloud is a secret way to do this. So if you go shift tab,
you see in the bottom there, it's gonna switch to auto edits, edit on.
Do it one more time, and that's gonna go to planning mode on.
And what this mode does is it's not gonna update your code at all. It's just gonna do planning.
So let's put in your plan to build a Shopify application that enhances merchants product descriptions with AI. And in the planning mode, it's gonna start doing some web searches usually,
which is great because then your latest information on whatever you're trying to plan to build. Know it does it much more in the planning mode than it does in normal mode,
so that's a really good reason to use it. Then at the end, it gives you a report once in planning mode. So it's gonna tell you the project structure and technology stack to use, what it recommends,
core features of this application, implementation steps, all that kind of good stuff. And then at the end of this game, we'd like to proceed. You can actually start building it,
or you can say no, keep planning,
and you get it right from there, staying in planning mode.
This is also great for adding a new feature to an application. And then when you're ready to leave, just shift tab again, and you go back to back to normal mode.
You can actually add images directly in the Clog code. It's a really powerful feature, but there's a bit of a trick to it. So let's take this application I have built here, and say we wanna get Clog code to analyze it and maybe add a feature. So I could just go take a screenshot of it, and now I have a copy to my clipboard. And then in Clog code, you'd think on a Mac would just be your normal command v.
Click on that, nothing happens.
The trick is you actually have to do a control v,
which is counterintuitive.
When I do that, now image one comes up. So it doesn't give you a preview or anything, but when you see, like, image number one, that's the image you just copied from your clipboard. I haven't tried it on Windows yet. It might be the same kind of trick. Maybe it's the Windows key or something, but watch out for that. But once you do get it in here, it's very powerful. It's just, like, do an analysis of this application's UI, and then what enhancements would you recommend?
And I find this very useful for just looking at bugs in a UI or just adding a feature, adding a button somewhere.
It actually is very good at reading the image. And there we go. It gives us some functionality enhancements.
These are a couple of things I actually thinking about into the application, so it's good that it picked this up, like directions integration and store hours, stuff like that. Definitely check out how Cloud Code can read images. It does a really good job.
One really powerful command that I think is a bit misunderstood and overlooked is the init command.
So if you're in your project and you go to init, what it's gonna do is look through all the files in that project
and write a claud dot m d file or markdown file. And it'll give you a comprehensive
look at your whole project. It'll give you coding standards,
technologies used, etcetera. And then we see it create the claw dot m d file in this directory. And then, like I said, it gives you the core components, data flow, all that kind of good stuff. And I've been doing software development for a long time. This is some of the best kinda lightweight documentation you can get, especially for a smaller code base.
But the really interesting thing is it takes this Claude dot MD file,
and every time you do a new chat or start a new session with Claude code, it puts this into the context. So if you put this project in the side for, say, six months, came back to Cloud Code later,
it would actually bring in all this and remember all this as context,
which is a nice head start. But, also, you can add on to this yourself. So if there's things you want Cloud Code to know when it launches up for this project,
this is the place to do it. This is kinda like cursor rules, basically.
If you're used to doing your coding in a code editor,
one thing that will really help is if you integrate a code editor with Cloud Code, so you're not always in the terminal.
It's really easy to do once you install Cloud Code and it detects you have an IDE, it actually automatically installs it. There's also an IDE command you can run,
and that'll tell you what IDs you have and connect to it from there. Once you have it connected, it's gonna tell you what file you're in. And then it has two way communication. So if I highlight some code,
it's gonna say 12 lines selected. So it's just targeting that code to make changes on. It also lets you visually see the differences between
a code change you're making.
So once you have Cloud Code hooked up with your IDE, in this case, have Cursor, the next tip is to actually keep Cloud Code
and Cursor or Versus Code, whatever you're using for your IDE, in a separate window. It's gonna make it such a nice experience to code in. As to do that, all you have to do is just when you have Cloud Code up, you can just right click on that terminal and say move into new window. Now you just move that to your second monitor and really do some vibe coding.
As well as using the built in commands in Cloud Code, you can actually create your own and they can do whatever you want and they're very useful. So to do that, we'll create a new directory. So you do do a make directory
under dot Cloud and then you call it commands. And then you create the commands by just simply creating markdown files. That's what I'm gonna call doc dot m d.
And then inside of it, you can put your arguments. So I'm gonna say create clear thorough documentation for the arguments. That's gonna be the files we pass in.
Then include a description, usage examples,
and important notes for developers. And once that's created, you can just do slash project
colon and then the name of the command, so in this case doc. And then passing your arguments, so we'll pass in store locator dot html. So now it's reading that input parameters. You can make many arguments for whatever you think you can make up in terms of a command that's useful to you.
So it's gonna read through that.
And then it just gives you what you asked for basically in the prompt. So this case is a really nice piece of documentation
describing this particular file. I mean, the sky's the limit what we can do with these custom commands, so they're gonna save you a lot of time.
Cloud Code actually has some keywords that tell it how much to think,
and they all have the word of think in them. So if you say think, it's actually gonna reason more,
spend more time, chew more tokens,
all the way up to ultra think, which if it sees that word, it's really gonna grind away and try to give you the very best answer. Let's try out let's just say UltraThink, the best way to package this Shopify application,
then merchants can deploy it. And then it came back with the answer. But you'll notice in this case, the gray text is all the thinking tokens it used along the way. Definitely very useful to know in certain situations. If you're into AI software development like me, make sure you subscribe to my newsletter, the AI unleash news. It's the first link in the description, and I hope to see you there.
I think most people know that if cloud's going in the wrong direction,
like, it's not really following the prompt or you can just see right away it's kinda doing the wrong thing.
If you just hit the escape key in the middle, then anytime you're gonna interrupt it.
But what you can also do, which is very useful, is if you hit the escape key twice,
it's gonna give you all the previous messages you had.
And then you can go back to the one they interrupted, say.
And it's gonna clear the history and go back to that prompt, which is a nice clearing way basically to fork the conversation, get it back on track to what you actually want it to be. One thing to keep in mind though is if you do do auto edits and it and they were accepted already, and then you just press escape key and then you go back, it's not gonna
revoke those and go back to this breakpoint,
but it will take the conversation to this point.
Cloud Code can look at websites and do web searches. It just doesn't do it very often, I've noticed.
Except for that is when you go into planning mode. But say you're just doing coding.
You can actually put in URLs and it will go and look at them. So I'm say make this application conform to these style guides. Then I'm gonna paste in the Shopify application design guidelines.
And now it's gonna go out and actually fetch all the content from that website. So this is a great way to just bring in documentation, the latest documentation
you have into Cloud Code. But now you see it's gone out to that website, come back with very specific things to do to make it conform with the style guidelines. So, for example, updating the typography to match the Shopify
admin interface. So it's really got all the great information we need here. Now it's gonna update the code.
Alright. We're down to the last one and I find this one so useful. I use it all the time. You can actually run Claude code in headless mode, which means it doesn't actually load up the UI or anything. So check it out. You can just say clod in any terminal. You say clod dash p for headless. That's the headless mode switch. Let's ask the question, what is the capital of Slovakia?
It's just going to return the response to me in the command line.
So what this means, we can use it all kinds of different places, pipe it to different files,
use it to look at images,
all kinds of useful functionality just by using the claw dash p command. So check out this much more useful example. If I run an NPM audit, which is gonna tell me all the vulnerabilities with all the packers I have in my application, then take the results of that, pass them to Claude, so I can do the Claude dash p again for the headless mode, and then ask it to prioritize these security vulnerabilities and describe them what's critical fixes needed, and then pipe all that to vulnerabilities dot m d, which will a markdown file which will have all that information. Now it generated this vulnerabilities file, which gives me all the critical things I need to do, like, right away. For example, this one is a Next. J s authorization bypass vulnerability. So I have to get that figured out right away. And then it lists the high priority and low priority from there. So I'm sure your head's spinning all the different places you could use Clog code in headless mode. It's such a powerful tool that add any script,
any kind of workflow. I hope you learned a thing or two. Clock code is great, and I'm do lots of videos on it coming up, as well as everything else around AI software development. So if you're into that, make sure you subscribe to the channel. And I hope you have an amazing day. I'll talk to you in the next one.