← Back
Mischa Vandenburg May 6, 2025 26m

Is Claude Code Worth It for DevOps Engineers?

Read full transcript 20 segments
  1. Anthropic has come out with claude code Anthropic has come out with claude code which is a CLI tool that you can use for which is a CLI tool that you can use for which is a CLI tool that you can use for agentic coding and in this video I'm agentic coding and in this video I'm agentic coding and in this video I'm going to be trying it out on a DevOps going to be trying it out on a DevOps going to be trying it out on a DevOps project seeing how useful it is for project seeing how useful it is for project seeing how useful it is for DevOps engineers. So Claude code is a DevOps engineers. So Claude code is a DevOps engineers. So Claude code is a CLI tool which is why I like it so much CLI tool which is why I like it so much CLI tool which is why I like it so much why it appeals to me so much because I why it appeals to me so much because I why it appeals to me so much because I do everything in Neoim on the CLI and it do everything in Neoim on the CLI and it do everything in Neoim on the CLI and it will be great to have a tool that I can will be great to have a tool that I can will be great to have a tool that I can use in that workflow. So you install it use in that workflow. So you install it use in that workflow. So you install it with npm install and the great thing with npm install and the great thing with npm install and the great thing about this is that I can also use this about this is that I can also use this about this is that I can also use this in my dev containers because as you know in my dev containers because as you know in my dev containers because as you know I am almost exclusively working inside I am almost exclusively working inside I am almost exclusively working inside of dev containers these days and I have of dev containers these days and I have of dev containers these days and I have a project here prepared which I created a project here prepared which I created a project here prepared which I created a while ago. This is a project that um a while ago. This is a project that um a while ago. This is a project that um reads data from a Shelly sensor and it reads data from a Shelly sensor and it reads data from a Shelly sensor and it reads my bedroom temperature. So the reads my bedroom temperature. So the reads my bedroom temperature. So the Shelly sensor sends data to a MQTT Shelly sensor sends data to a MQTT Shelly sensor sends data to a MQTT message Q and then I have a Python message Q and then I have a Python message Q and then I have a Python container running in my Kubernetes home container running in my Kubernetes home container running in my Kubernetes home lab that reads that queue and then lab that reads that queue and then lab that reads that queue and then pushes that to a Postgress database pushes that to a Postgress database pushes that to a Postgress database which I then can read in my graphana which I then can read in my graphana which I then can read in my graphana dashboard here. So I have a a full dashboard here. So I have a a full dashboard here. So I have a a full overview of my bedroom temperature over overview of my bedroom temperature over overview of my bedroom temperature over the last 90 days for example and the the last 90 days for example and the the last 90 days for example and the humidity. So that's what this does. And humidity. So that's what this does. And humidity. So that's what this does. And the project I am very ashamed to say is the project I am very ashamed to say is the project I am very ashamed to say is running as a root user in my Kubernetes running as a root user in my Kubernetes running as a root user in my Kubernetes home lab. It's running as a root home lab. It's running as a root home lab. It's running as a root container. So uh I need to fix this and

  2. container. So uh I need to fix this and container. So uh I need to fix this and I I wrote this myself but at the time I I I wrote this myself but at the time I I I wrote this myself but at the time I didn't have much time. So the the Docker didn't have much time. So the the Docker didn't have much time. So the the Docker file is currently looking like this file is currently looking like this file is currently looking like this where it's just running as the root where it's just running as the root where it's just running as the root user. That's not good. So I figured this user. That's not good. So I figured this user. That's not good. So I figured this would be a nice challenge for claude would be a nice challenge for claude would be a nice challenge for claude code. So first of all I'm going to build code. So first of all I'm going to build code. So first of all I'm going to build my dev container. So devpod up. my dev container. So devpod up. my dev container. So devpod up. Recreate. So this is going to check my Recreate. So this is going to check my Recreate. So this is going to check my dev dev dev container.json and it is then installing container.json and it is then installing container.json and it is then installing all of the required all of the required all of the required um the things that I need for this um the things that I need for this um the things that I need for this specific project. It is now going to specific project. It is now going to specific project. It is now going to clone all of my dot clone all of my dot clone all of my dot files and installing them exactly as I files and installing them exactly as I files and installing them exactly as I like it. And I am like it. And I am like it. And I am using for this I'm using shame and using for this I'm using shame and using for this I'm using shame and mis. So you will see that mi is now mis. So you will see that mi is now mis. So you will see that mi is now installing fcf rip neovim uh and it's installing fcf rip neovim uh and it's installing fcf rip neovim uh and it's going to basically set up my dev my dev going to basically set up my dev my dev going to basically set up my dev my dev environment exactly as I like it. So if environment exactly as I like it. So if environment exactly as I like it. So if I now do devp pod SSH and I search for I now do devp pod SSH and I search for I now do devp pod SSH and I search for Shelly, then I have my environment Shelly, then I have my environment Shelly, then I have my environment completely configured for me, I'm just completely configured for me, I'm just completely configured for me, I'm just going to allow these experimental going to allow these experimental going to allow these experimental settings to be true like this. And now I settings to be true like this. And now I settings to be true like this. And now I am basically ready to am basically ready to am basically ready to uh to develop. So if I open up Neoim uh to develop. So if I open up Neoim uh to develop. So if I open up Neoim now, then it's going to install Neovim now, then it's going to install Neovim now, then it's going to install Neovim with all of my configuration.

  3. with all of my configuration. with all of my configuration. And when everything is set up, I have a And when everything is set up, I have a And when everything is set up, I have a fully isolated separate environment fully isolated separate environment fully isolated separate environment that's running on my uh on my that's running on my uh on my that's running on my uh on my PC. So now this is done. I will then PC. So now this is done. I will then PC. So now this is done. I will then just add the Python extra like just add the Python extra like just add the Python extra like this. So now my Python is enabled. And this. So now my Python is enabled. And this. So now my Python is enabled. And if I now would open my main.py file, it if I now would open my main.py file, it if I now would open my main.py file, it is now going to install all of the is now going to install all of the is now going to install all of the required packages that I need to do required packages that I need to do required packages that I need to do Python development. So everything is Python development. So everything is Python development. So everything is ready to develop now. And if this all ready to develop now. And if this all ready to develop now. And if this all seems like magic to you or if you're seems like magic to you or if you're seems like magic to you or if you're interested in my dev container workflow, interested in my dev container workflow, interested in my dev container workflow, check out my community at check out my community at check out my community at school.com/cubecraft. I have a full school.com/cubecraft. I have a full school.com/cubecraft. I have a full course that is released just this month course that is released just this month course that is released just this month where I teach you how to set this up. So where I teach you how to set this up. So where I teach you how to set this up. So let's now install clawed code. let's now install clawed code. let's now install clawed code. So I'm going to go into the So I'm going to go into the So I'm going to go into the documentation here and it's just going documentation here and it's just going documentation here and it's just going to be to be to be uh we're going to be using npm to uh we're going to be using npm to uh we're going to be using npm to install cloud code. And the interesting install cloud code. And the interesting install cloud code. And the interesting thing is that I can now actually thing is that I can now actually thing is that I can now actually authenticate as well even though I don't authenticate as well even though I don't authenticate as well even though I don't have a browser. So let's just follow the have a browser. So let's just follow the have a browser. So let's just follow the guide here.

  4. guide here. guide here. So start cla run claude to launch. So start cla run claude to launch. So start cla run claude to launch. That's basically what we have to do. run That's basically what we have to do. run That's basically what we have to do. run claude. And now it's going to ask me for claude. And now it's going to ask me for claude. And now it's going to ask me for a few configuration options. So I do the a few configuration options. So I do the a few configuration options. So I do the light text. And now it's going to uh ask light text. And now it's going to uh ask light text. And now it's going to uh ask me to log to my anthropic console me to log to my anthropic console me to log to my anthropic console account. So let's do that. Now my dev account. So let's do that. Now my dev account. So let's do that. Now my dev container obviously does not have a container obviously does not have a container obviously does not have a browser. So then it's just going to give browser. So then it's just going to give browser. So then it's just going to give me a link that I can follow. So let's me a link that I can follow. So let's me a link that I can follow. So let's follow that link. And now it's going to follow that link. And now it's going to follow that link. And now it's going to ask me to authorize. I'm already logged ask me to authorize. I'm already logged ask me to authorize. I'm already logged into my Anthropic account and if I then into my Anthropic account and if I then into my Anthropic account and if I then copy this code and paste it then it's copy this code and paste it then it's copy this code and paste it then it's going to create an API key and here we going to create an API key and here we going to create an API key and here we go my project is now set up. This is go my project is now set up. This is go my project is now set up. This is basically clawed code and the interface basically clawed code and the interface basically clawed code and the interface that we are presented with. So we can that we are presented with. So we can that we are presented with. So we can run the help command for help or we can run the help command for help or we can run the help command for help or we can run the init command to create a claude run the init command to create a claude run the init command to create a claude MD file with instructions for claude. So MD file with instructions for claude. So MD file with instructions for claude. So let's do that let's do that let's do that first because then it's going to first because then it's going to first because then it's going to basically analyze my little project basically analyze my little project basically analyze my little project here. It's going to see if it needs any here. It's going to see if it needs any here. It's going to see if it needs any it's going to see any conventions that I it's going to see any conventions that I it's going to see any conventions that I might have. It's basing this on the code might have. It's basing this on the code might have. It's basing this on the code but also on the readme. Okay. So now it but also on the readme. Okay. So now it but also on the readme. Okay. So now it has created a cloud MD file. It has some has created a cloud MD file. It has some has created a cloud MD file. It has some instructions how to run the docker instructions how to run the docker instructions how to run the docker container with mi installed. That's container with mi installed. That's container with mi installed. That's interesting. It has detected that we're

  5. interesting. It has detected that we're interesting. It has detected that we're using using using UV rough. Okay. And here are some code UV rough. Okay. And here are some code UV rough. Okay. And here are some code style guidelines that it detected. style guidelines that it detected. style guidelines that it detected. Follow the PEP 8 style guide. Okay. Follow the PEP 8 style guide. Okay. Follow the PEP 8 style guide. Okay. Interesting. So here it has added some Interesting. So here it has added some Interesting. So here it has added some project instructions. Then well also I project instructions. Then well also I project instructions. Then well also I like to use conventional commits for all like to use conventional commits for all like to use conventional commits for all of my commits. So let's I know that of my commits. So let's I know that of my commits. So let's I know that claude code can do git commits. So let's claude code can do git commits. So let's claude code can do git commits. So let's just um add to the just um add to the just um add to the claude MD that we use conventional claude MD that we use conventional claude MD that we use conventional commits in this commits. Okay. So it's actually looking commits. Okay. So it's actually looking at the the commit history now. And now at the the commit history now. And now at the the commit history now. And now it's also using use conventional commits it's also using use conventional commits it's also using use conventional commits for all commit messages. Do you want to for all commit messages. Do you want to for all commit messages. Do you want to make this edit to claude MD? Yes, I do. make this edit to claude MD? Yes, I do. make this edit to claude MD? Yes, I do. Thank Thank Thank you. So I press yes. And now it has you. So I press yes. And now it has you. So I press yes. And now it has added this to the conventional commit added this to the conventional commit added this to the conventional commit section. Okay, great. So so far so good.

  6. section. Okay, great. So so far so good. section. Okay, great. So so far so good. Cloud code is running. It is able to Cloud code is running. It is able to Cloud code is running. It is able to make changes and it's all running inside make changes and it's all running inside make changes and it's all running inside of my dev container. So that's very of my dev container. So that's very of my dev container. So that's very important to note. Uh I have a couple of important to note. Uh I have a couple of important to note. Uh I have a couple of prompts that I want to try out here. So prompts that I want to try out here. So prompts that I want to try out here. So the first one is the layout for this the first one is the layout for this the first one is the layout for this project has changed. update the docker project has changed. update the docker project has changed. update the docker file with the correct paths. So before file with the correct paths. So before file with the correct paths. So before the main.py file was in a src directory the main.py file was in a src directory the main.py file was in a src directory and as I was moving it around to uv I and as I was moving it around to uv I and as I was moving it around to uv I decided to change this to the project decided to change this to the project decided to change this to the project name using a flat structure in this case name using a flat structure in this case name using a flat structure in this case and I figured u let's see if claude can and I figured u let's see if claude can and I figured u let's see if claude can fix this. So let's just paste fix this. So let's just paste fix this. So let's just paste oops not this but let's just copy this oops not this but let's just copy this oops not this but let's just copy this and paste my prompt here. update the and paste my prompt here. update the and paste my prompt here. update the docker file with the correct paths. So docker file with the correct paths. So docker file with the correct paths. So let's see how it's how it will do with let's see how it's how it will do with let's see how it's how it will do with this. Now here we go. Copy the this. Now here we go. Copy the this. Now here we go. Copy the application directory contents into the application directory contents into the application directory contents into the container at app. Okay, so that that container at app. Okay, so that that container at app. Okay, so that that edit was made. So now let's see if edit was made. So now let's see if edit was made. So now let's see if claude can help me with some git claude can help me with some git claude can help me with some git commands. So here in this guide it has commands. So here in this guide it has commands. So here in this guide it has some common tasks here. So you can as some common tasks here. So you can as some common tasks here. So you can as you can see you can ask it to you can you can see you can ask it to you can you can see you can ask it to you can ask it questions about your code. So ask it questions about your code. So ask it questions about your code. So this is interesting explain how the this is interesting explain how the this is interesting explain how the layer caching layer works but also layer caching layer works but also layer caching layer works but also automate git operations. So commit my automate git operations. So commit my automate git operations. So commit my changes create APR with commit added changes create APR with commit added changes create APR with commit added test for markdown back in December. This test for markdown back in December. This test for markdown back in December. This is really interesting. So let's just do is really interesting. So let's just do is really interesting. So let's just do commit my

  7. changes. So here we go. Get add. Okay. changes. So here we go. Get add. Okay. The git add command is fine. The git add command is fine. The git add command is fine. And now let's And now let's And now let's see get commit m see get commit m see get commit m docs add cloud md and fix docker file docs add cloud md and fix docker file docs add cloud md and fix docker file paths. Okay so this is a very long paths. Okay so this is a very long paths. Okay so this is a very long commit message. Is it actually good commit message. Is it actually good commit message. Is it actually good practice to have this long commit practice to have this long commit practice to have this long commit messages? I'm just used to like these messages? I'm just used to like these messages? I'm just used to like these oneliners. This is I would have this oneliners. This is I would have this oneliners. This is I would have this rather in my PR. So rather in my PR. So rather in my PR. So let's tell it no uh use oneline commit let's tell it no uh use oneline commit let's tell it no uh use oneline commit messages like we did earlier in the project. Yeah, here we go. Docs add project. Yeah, here we go. Docs add cloud MD and fix Docker file paths. cloud MD and fix Docker file paths. cloud MD and fix Docker file paths. Okay, I like that. So do you want to Okay, I like that. So do you want to Okay, I like that. So do you want to proceed? Yes. proceed? Yes. proceed? Yes. Okay. So now we have automated this git Okay. So now we have automated this git Okay. So now we have automated this git operation which is nice all from the operation which is nice all from the operation which is nice all from the CLI. So now the next prompt that I have CLI. So now the next prompt that I have CLI. So now the next prompt that I have in mind is the current the container is in mind is the current the container is in mind is the current the container is currently running as root update update currently running as root update update currently running as root update update it to run as a nonroot user also use the it to run as a nonroot user also use the it to run as a nonroot user also use the al 313 Alpine image. So let's see if I al 313 Alpine image. So let's see if I al 313 Alpine image. So let's see if I give it this project but this um prompt.

  8. give it this project but this um prompt. give it this project but this um prompt. There's a little bit of a sneaky one There's a little bit of a sneaky one There's a little bit of a sneaky one here because I'm not telling it to use here because I'm not telling it to use here because I'm not telling it to use the Python 313 Alpine image. So, let's the Python 313 Alpine image. So, let's the Python 313 Alpine image. So, let's just see if it um does that just see if it um does that just see if it um does that correctly. So, it's reading the Docker file. Oh, here we go. It just changed file. Oh, here we go. It just changed this to Python 313 Alpine. So, that's this to Python 313 Alpine. So, that's this to Python 313 Alpine. So, that's nice. Create a nonroot user. nice. Create a nonroot user. nice. Create a nonroot user. Okay. Change the ownership of the Okay. Change the ownership of the Okay. Change the ownership of the application files and switch to a application files and switch to a application files and switch to a nonroot user. Okay. So, I actually made nonroot user. Okay. So, I actually made nonroot user. Okay. So, I actually made a bit of a mistake in my prompt. So, a bit of a mistake in my prompt. So, a bit of a mistake in my prompt. So, let's revise our prompt again. I press let's revise our prompt again. I press let's revise our prompt again. I press three and I'm going to say this looks three and I'm going to say this looks three and I'm going to say this looks great. Just one more change. I want to great. Just one more change. I want to great. Just one more change. I want to use user and group use user and group use user and group [Music] [Music] [Music] ID,000 in my Kubernetes ID,000 in my Kubernetes ID,000 in my Kubernetes manifest. Okay. So now it has it's manifest. Okay. So now it has it's manifest. Okay. So now it has it's changed the command to with the group ID changed the command to with the group ID changed the command to with the group ID and the name like this. Okay. So then and the name like this. Okay. So then and the name like this. Okay. So then this should work. Okay. So let's add this should work. Okay. So let's add this should work. Okay. So let's add that. Looks good. And now uh also let's that. Looks good. And now uh also let's that. Looks good. And now uh also let's do an optimization of the docker file so do an optimization of the docker file so do an optimization of the docker file so it becomes as small as it becomes as small as it becomes as small as possible like possible like possible like this. Okay. So let's see what it has this. Okay. So let's see what it has this. Okay. So let's see what it has done now. So now it has created done now. So now it has created done now. So now it has created a it sets the work directory. It is not using a multi-stage

  9. directory. It is not using a multi-stage build at this Okay. Okay. So let's see if uh I was I Okay. Okay. So let's see if uh I was I was more was more was more thinking in the direction of a thinking in the direction of a thinking in the direction of a multi-stage that. Here we go. This looks better. So that. Here we go. This looks better. So we have a build we have a build we have a build stage. It copies the requirements txt stage. It copies the requirements txt stage. It copies the requirements txt and it copies and it copies and it copies the directory and then there's the final the directory and then there's the final the directory and then there's the final stage. Okay. So now we're having a stage. Okay. So now we're having a stage. Okay. So now we're having a multi-stage multi-stage multi-stage build. All right. So let's accept build. All right. So let's accept build. All right. So let's accept this. And now let's see if if um this this. And now let's see if if um this this. And now let's see if if um this actually will work and build properly.

  10. actually will work and build properly. actually will work and build properly. So I'm now going to go into my uh So I'm now going to go into my uh So I'm now going to go into my uh project again. project again. project again. I do have a Docker Compose file with a I do have a Docker Compose file with a I do have a Docker Compose file with a DB, but currently those ports are in use DB, but currently those ports are in use DB, but currently those ports are in use and I'm not going to bother with and I'm not going to bother with and I'm not going to bother with changing that around. I am just going to changing that around. I am just going to changing that around. I am just going to test if this will actually work. And I test if this will actually work. And I test if this will actually work. And I will also need a environment file. So will also need a environment file. So will also need a environment file. So let's see if I do build like this. let's see if I do build like this. let's see if I do build like this. Docker compose of build. And let's just Docker compose of build. And let's just Docker compose of build. And let's just see if the image builds at all. Okay, great. So yes, there is an error, Okay, great. So yes, there is an error, but this is actually because it um it but this is actually because it um it but this is actually because it um it cannot connect to the database. So it is cannot connect to the database. So it is cannot connect to the database. So it is actually when I run the Python command, actually when I run the Python command, actually when I run the Python command, it is actually able it actually has all it is actually able it actually has all it is actually able it actually has all of the dependencies, all the packages of the dependencies, all the packages of the dependencies, all the packages that it needs. So the Python the Python that it needs. So the Python the Python that it needs. So the Python the Python program is actually running correctly. program is actually running correctly. program is actually running correctly. As we see it's even logging and then it As we see it's even logging and then it As we see it's even logging and then it comes to the point where it creates a comes to the point where it creates a comes to the point where it creates a Postgress connection and then it fails.

  11. Postgress connection and then it fails. Postgress connection and then it fails. So the build does work. Now finally So the build does work. Now finally So the build does work. Now finally there is a last little change that I there is a last little change that I there is a last little change that I have made. So this this project was have made. So this this project was have made. So this this project was using poetry before and now I have using poetry before and now I have using poetry before and now I have migrated this to UV. So I'm migrated this to UV. So I'm migrated this to UV. So I'm the the structure has changed a little the the structure has changed a little the the structure has changed a little bit here because before I was using bit here because before I was using bit here because before I was using requirements.t requirements.t requirements.t txt and that uh according to my research txt and that uh according to my research txt and that uh according to my research that is now the old-fashioned way of that is now the old-fashioned way of that is now the old-fashioned way of doing things and now that UV has come doing things and now that UV has come doing things and now that UV has come along there are cleaner ways of doing along there are cleaner ways of doing along there are cleaner ways of doing this and just by using the pi project this and just by using the pi project this and just by using the pi project toml so the next prompt that I want to toml so the next prompt that I want to toml so the next prompt that I want to give to claw code is this project was give to claw code is this project was give to claw code is this project was using a requirements txt before I've using a requirements txt before I've using a requirements txt before I've migrated the project to use mi and uv migrated the project to use mi and uv migrated the project to use mi and uv please update the docker file so it uses please update the docker file so it uses please update the docker file so it uses uv and the pi project toml uv and the pi project toml uv and the pi project toml So, I have this, but just in case So, I have this, but just in case So, I have this, but just in case because this is so relatively new, I because this is so relatively new, I because this is so relatively new, I think I'm also just going to give it um think I'm also just going to give it um think I'm also just going to give it um the documentation here. So, I'm just the documentation here. So, I'm just the documentation here. So, I'm just going to copy all of the documentation going to copy all of the documentation going to copy all of the documentation about how to use UV in Docker containers about how to use UV in Docker containers about how to use UV in Docker containers like that.

  12. like that. like that. And I'm just going to let's see cloud And I'm just going to let's see cloud And I'm just going to let's see cloud MD I will add a docs directory. Oh, you know what? Before I directory. Oh, you know what? Before I do that, I should actually just commit do that, I should actually just commit do that, I should actually just commit this commit my changes. Ah, interesting. So, it it changes. Ah, interesting. So, it it detected that I had been changing the detected that I had been changing the detected that I had been changing the docker compose. Do you want to make this docker compose. Do you want to make this docker compose. Do you want to make this edit? edit? edit? No. No. Ignore the Docker compose for No. No. Ignore the Docker compose for No. No. Ignore the Docker compose for now. Okay. So, it's now committing the now. Okay. So, it's now committing the now. Okay. So, it's now committing the Docker file updates. Okay. So, that is now updates. Okay. So, that is now committed. That's nice. Now, I will just committed. That's nice. Now, I will just committed. That's nice. Now, I will just do a docs directory. And in the docs do a docs directory. And in the docs do a docs directory. And in the docs directory, directory, directory, docs, I will create uvd and just paste all of this in there.

  13. uvd and just paste all of this in there. It's technically not markdown, but let's It's technically not markdown, but let's It's technically not markdown, but let's see. So then I'm going to add this to my see. So then I'm going to add this to my see. So then I'm going to add this to my prompt as well. I have added prompt as well. I have added prompt as well. I have added instructions in docs instructions in docs instructions in docs uv.md. I have added the latest UV uv.md. I have added the latest UV uv.md. I have added the latest UV docs in u in this directory with docs in u in this directory with docs in u in this directory with instructions about how to use UV in instructions about how to use UV in instructions about how to use UV in Docker Docker Docker containers. So let's see how this uh how containers. So let's see how this uh how containers. So let's see how this uh how this is going to play out. This is quite this is going to play out. This is quite this is going to play out. This is quite a bit of a challenge I think for an LLM a bit of a challenge I think for an LLM a bit of a challenge I think for an LLM that does not have access to the that does not have access to the that does not have access to the internet. Okay, so let's check it out. internet. Okay, so let's check it out. internet. Okay, so let's check it out. So it is So it is So it is now ah it is now going to be using the now ah it is now going to be using the now ah it is now going to be using the UV the UV python image. So UV is already UV the UV python image. So UV is already UV the UV python image. So UV is already going to be there. Then it's going to going to be there. Then it's going to going to be there. Then it's going to copy the pi project tol and the UV lock copy the pi project tol and the UV lock copy the pi project tol and the UV lock and then it's going to install the and then it's going to install the and then it's going to install the dependencies with UV frozen to ensure dependencies with UV frozen to ensure dependencies with UV frozen to ensure reproducibility.

  14. reproducibility. reproducibility. Okay, that looks good. This is not good. It changed this back This is not good. It changed this back to SRC. Why did it do that? It is to SRC. Why did it do that? It is to SRC. Why did it do that? It is actually adding this twice. So, that's actually adding this twice. So, that's actually adding this twice. So, that's not good. not good. not good. Okay. Okay. So, a couple of things. Um, why are you introducing an SRC Um, why are you introducing an SRC directory? Don't do that. Keep it directory? Don't do that. Keep it directory? Don't do that. Keep it simple. Okay, this looks a lot better. simple. Okay, this looks a lot better. simple. Okay, this looks a lot better. So, we're taking that image. It's So, we're taking that image. It's So, we're taking that image. It's copying the PI project and then it's copying the PI project and then it's copying the PI project and then it's installing the the EN. Now it's running installing the the EN. Now it's running installing the the EN. Now it's running this twice. So why is it doing that? this twice. So why is it doing that? this twice. So why is it doing that? Let's check out why it does that. So Let's check out why it does that. So Let's check out why it does that. So um why are um why are um why are we running UV sync twice? Okay. So now it is running UV twice? Okay. So now it is running UV sync only once. So that's good. And it sync only once. So that's good. And it sync only once. So that's good. And it is now adding this here. So let's is now adding this here. So let's is now adding this here. So let's just accept this for just accept this for just accept this for now. And oh now it's actually also now. And oh now it's actually also now. And oh now it's actually also adding me asking me to add this um to adding me asking me to add this um to adding me asking me to add this um to commit this right away. So that's commit this right away. So that's commit this right away. So that's interesting. So the git ad I'm not going interesting. So the git ad I'm not going interesting. So the git ad I'm not going to need confirmation for that anymore.

  15. to need confirmation for that anymore. to need confirmation for that anymore. It doesn't have to ask me. And now it's It doesn't have to ask me. And now it's It doesn't have to ask me. And now it's going to run a git commit. And I want to going to run a git commit. And I want to going to run a git commit. And I want to proceed with that. proceed with that. proceed with that. So let's test out our application for So let's test out our application for So let's test out our application for now. So let's see if I can do a docker now. So let's see if I can do a docker now. So let's see if I can do a docker build again and see if the application build again and see if the application build again and see if the application actually actually actually builds. And here we go. It actually ran. builds. And here we go. It actually ran. builds. And here we go. It actually ran. So it has actually installed it So it has actually installed it So it has actually installed it correctly with all of the correctly with all of the correctly with all of the dependencies. And it because like if I dependencies. And it because like if I dependencies. And it because like if I didn't have the dependencies in here, didn't have the dependencies in here, didn't have the dependencies in here, then it would not run. It would it would then it would not run. It would it would then it would not run. It would it would error out because it wouldn't have the error out because it wouldn't have the error out because it wouldn't have the dependencies available. So that's how I dependencies available. So that's how I dependencies available. So that's how I know that it's going to be running know that it's going to be running know that it's going to be running correctly. Now the next let's just do correctly. Now the next let's just do correctly. Now the next let's just do one more thing and let's see if it can one more thing and let's see if it can one more thing and let's see if it can actually also update my Kubernetes actually also update my Kubernetes actually also update my Kubernetes manifest. So I will go to my home lab manifest. So I will go to my home lab manifest. So I will go to my home lab repo and pull and let's see where pull and let's see where my Shelly deployment here. So this is my my Shelly deployment here. So this is my my Shelly deployment here. So this is my Shelly deployment and for convenience Shelly deployment and for convenience Shelly deployment and for convenience sake I'm just going to add this to my um sake I'm just going to add this to my um sake I'm just going to add this to my um repository for now. So repository for now. So repository for now. So docs I will just do example example example example example deployment deployment deployment yl and paste this in like this.

  16. in like this. So uh I have added an example deployment So uh I have added an example deployment So uh I have added an example deployment YAML update this so it runs as user YAML update this so it runs as user YAML update this so it runs as user thousand,000 in my Kubernetes cluster. Let's see if it detects it even cluster. Let's see if it detects it even if I don't tell it where it is. Okay, so it actually globbed to to Okay, so it actually globbed to to search for the YAML file. That's search for the YAML file. That's search for the YAML file. That's interesting. It sets the security interesting. It sets the security interesting. It sets the security context. It does the run as user and context. It does the run as user and context. It does the run as user and it's also adding dropping capabilities. it's also adding dropping capabilities. it's also adding dropping capabilities. So it's actually uh this is actually So it's actually uh this is actually So it's actually uh this is actually fully secured now. So yes, I want fully secured now. So yes, I want fully secured now. So yes, I want to have this as my correct deployment. Now I Now I believe u believe u believe u github.com is shelly if I go github.com is shelly if I go github.com is shelly if I go here my github actions should now have here my github actions should now have here my github actions should now have uh when I push these changes my github uh when I push these changes my github uh when I push these changes my github actions will build a new container image actions will build a new container image actions will build a new container image for this. So yes, I want to commit changes. I want to push and I'm I'm

  17. changes. I want to push and I'm I'm curious. Yes, it's going to detect my UB curious. Yes, it's going to detect my UB curious. Yes, it's going to detect my UB key successfully pushed my changes. And key successfully pushed my changes. And key successfully pushed my changes. And now we see that now we see that now we see that my GitHub actions is now actually my GitHub actions is now actually my GitHub actions is now actually running. running. running. So this should then result in a new tag So this should then result in a new tag So this should then result in a new tag because this GitHub actions creates tags because this GitHub actions creates tags because this GitHub actions creates tags automatically. So if this all builds and automatically. So if this all builds and automatically. So if this all builds and works out correctly then we can update works out correctly then we can update works out correctly then we can update my manifest and then my container should my manifest and then my container should my manifest and then my container should be running as a non-root be running as a non-root be running as a non-root user. Okay. So my image has now been user. Okay. So my image has now been user. Okay. So my image has now been updated and if I check my updated and if I check my updated and if I check my tags my latest tag is tags my latest tag is tags my latest tag is now now now 030. So what I'm going to do is I'm 030. So what I'm going to do is I'm 030. So what I'm going to do is I'm going to open that deployment.yaml and I'll go to my home deployment.yaml and I'll go to my home lab and paste that lab and paste that lab and paste that in. And let's update this to 030. And I will push this. So feed 030. And I will push this. So feed update Shelly to nonroot.

  18. repo. And then I will just enter the dev repo. And then I will just enter the dev container for that that and reconcile and reconcile and reconcile apps. So now I'm just telling my GitOps apps. So now I'm just telling my GitOps apps. So now I'm just telling my GitOps controller to pull in the latest controller to pull in the latest controller to pull in the latest changes. And if I now open up changes. And if I now open up changes. And if I now open up K9s, we should see a fresh container K9s, we should see a fresh container K9s, we should see a fresh container being deployed. Here we go. My Shelly being deployed. Here we go. My Shelly being deployed. Here we go. My Shelly API is already running. It's 14 seconds API is already running. It's 14 seconds API is already running. It's 14 seconds old. And if I check the L logs for old. And if I check the L logs for old. And if I check the L logs for that, then here we go. Data insertion that, then here we go. Data insertion that, then here we go. Data insertion has completed. So it is running has completed. So it is running has completed. So it is running successfully. And if I enter my shell successfully. And if I enter my shell successfully. And if I enter my shell here, I am now I if I now run who am I? here, I am now I if I now run who am I? here, I am now I if I now run who am I? I'm use I'm running as app user cat at C I'm use I'm running as app user cat at C I'm use I'm running as app user cat at C password. Here we go. I'm running as password. Here we go. I'm running as password. Here we go. I'm running as user 1000 1000. And if I do for example user 1000 1000. And if I do for example user 1000 1000. And if I do for example ape key add ape key add ape key add vim permission is denied. I'm not able vim permission is denied. I'm not able vim permission is denied. I'm not able to add any packages because I'm I'm a to add any packages because I'm I'm a to add any packages because I'm I'm a non-root user. So if I do sudo sue then non-root user. So if I do sudo sue then non-root user. So if I do sudo sue then it won't it won't work. So here we go. I it won't it won't work. So here we go. I it won't it won't work. So here we go. I have successfully updated my my have successfully updated my my have successfully updated my my application to run a multi-stage build.

  19. application to run a multi-stage build. application to run a multi-stage build. It converted my project to UV and it um It converted my project to UV and it um It converted my project to UV and it um is using that method of installing is using that method of installing is using that method of installing packages. Now I'm packages. Now I'm packages. Now I'm automatically pushing my changes to automatically pushing my changes to automatically pushing my changes to GitHub and I'm also and I also managed GitHub and I'm also and I also managed GitHub and I'm also and I also managed to run as a non-rule user successfully. to run as a non-rule user successfully. to run as a non-rule user successfully. So I'm actually really impressed by So I'm actually really impressed by So I'm actually really impressed by this. I'm actually very happy with this this. I'm actually very happy with this this. I'm actually very happy with this um with um with um with this um with this tool because as you this um with this tool because as you this um with this tool because as you see I am now working completely in the see I am now working completely in the see I am now working completely in the CLI while having the benefits of agentic CLI while having the benefits of agentic CLI while having the benefits of agentic coding. So I can go back and forth coding. So I can go back and forth coding. So I can go back and forth between sessions where I have my claw between sessions where I have my claw between sessions where I have my claw code open and my plain neoim and I can code open and my plain neoim and I can code open and my plain neoim and I can just do everything that I want like I'm just do everything that I want like I'm just do everything that I want like I'm used to on the CLI using my dev used to on the CLI using my dev used to on the CLI using my dev containers. So cloud code combined with containers. So cloud code combined with containers. So cloud code combined with dev containers is a very powerful thing. dev containers is a very powerful thing. dev containers is a very powerful thing. So the the final thing is I've know I've So the the final thing is I've know I've So the the final thing is I've know I've heard that claude code is very heard that claude code is very heard that claude code is very expensive. So let's check out what the expensive. So let's check out what the expensive. So let's check out what the costs are for costs are for costs are for this. Let's exit. Okay. So this whole this. Let's exit. Okay. So this whole this. Let's exit. Okay. So this whole session cost me $1. So this is a very session cost me $1. So this is a very session cost me $1. So this is a very small project with with not so much small project with with not so much small project with with not so much code. So yeah, is this a lot of money? I code. So yeah, is this a lot of money? I code. So yeah, is this a lot of money? I don't know. It it it seems more it seems don't know. It it it seems more it seems don't know. It it it seems more it seems more expensive than if I would be using more expensive than if I would be using more expensive than if I would be using the claw API the claw API the claw API myself. It takes ages to burn through myself. It takes ages to burn through myself. It takes ages to burn through $20 there. However, I this is manageable $20 there. However, I this is manageable $20 there. However, I this is manageable for me. Like I'm okay with this. I this for me. Like I'm okay with this. I this for me. Like I'm okay with this. I this is definitely $1 of value that I have

  20. is definitely $1 of value that I have is definitely $1 of value that I have gotten here. But I have heard that with gotten here. But I have heard that with gotten here. But I have heard that with bigger projects and bigger bigger tasks bigger projects and bigger bigger tasks bigger projects and bigger bigger tasks that this can get expensive very that this can get expensive very that this can get expensive very quickly. So I am definitely going to be quickly. So I am definitely going to be quickly. So I am definitely going to be using this more and testing it out. So using this more and testing it out. So using this more and testing it out. So if you if you were interested in this if you if you were interested in this if you if you were interested in this dev container workflow that I have, I dev container workflow that I have, I dev container workflow that I have, I have a full course for you that can help have a full course for you that can help have a full course for you that can help you or if you liked what I was doing on you or if you liked what I was doing on you or if you liked what I was doing on my my home lab, I also have I can also my my home lab, I also have I can also my my home lab, I also have I can also help you build your Kubernetes home lab help you build your Kubernetes home lab help you build your Kubernetes home lab yourself. For all of that and direct yourself. For all of that and direct yourself. For all of that and direct access to me and the community, go to access to me and the community, go to access to me and the community, go to school.com/cubcraft and I hope to see school.com/cubcraft and I hope to see school.com/cubcraft and I hope to see you there. All right, thank you for you there. All right, thank you for you there. All right, thank you for watching and see you in the next

Summary

This analysis explores the capabilities of Anthropic's Claude Code CLI tool for agentic coding, specifically using it on a DevOps project involving a Shelly sensor, MQTT, Python, PostgreSQL, and Grafana. The practical takeaway is that Claude Code efficiently integrates into existing workflows, such as those within dev containers and Neoim, for automating complex tasks and improving code execution, like fixing a root user vulnerability in a Kubernetes container.

View original episode ↗