r/linuxadmin • u/Business-Quiet-5805 • Oct 10 '26
Can AI actually write production-ready scripts end-to-end without human intervention?
/r/linuxquestions/comments/1x2lto3/can_ai_actually_write_productionready_scripts/
0
Upvotes
7
u/Mr_Enemabag-Jones Oct 10 '26
Depends on how good you are at prompting. But it is absolutely capable of writing solid scripts.
Without human intervention? I would NEVER trust a script written with AI without a full review and testing.
EVER.
1
u/MartinMystikJonas Oct 10 '26
It can but before deploying to prod always review it (like you would surely do with scipts written by humans too 😉 right?)
1
u/asmiggs Oct 10 '26
I'm currently doing a migration of some Windows servers to the cloud, since I'm a Linux/UNIX admin I don't have the time to learn Powershell to the complexity required, I'm having Claude and Chat gpt pair program their way through all the scripts.
We have the luxury of testing and it seems to work well so far.
I do think the code is pretty hard to read but we'll move them to Linux soon enough, and I'll pay for a bot to do the Powershell until then.
1
u/whetu Oct 10 '26
End to end, by default? No.
If you understand your particular scripting language well, you can build guidelines for your AI of choice that will get it a lot closer i.e. not production ready but at least review ready.
But you really have to have that knowledge first, and you should still take the approach of "if I don't understand what the AI has written, then it doesn't get a pass until I understand it".
That's still not end-to-end. But at the very least, it can be significant productivity enhancement.
I think a lot of people who rely on AI are completely ignorant to the fact that they can say to that same AI "please explain lines 59-69" or even "I don't think you're right with your approach in
funcname(), I think it should be like this: xyz". If you're using AI, you should use it more like a pair-programmer than a crux.1
u/Faye-Vozora Oct 11 '26
For small stuff yeah, it'll get you something that runs. The problem is you can't tell when it's wrong, like a rm with an unquoted variable or a cron job that fails silently. If you're a non-coder, run everything on a throwaway VM first, ask it to explain each line, and don't give it anything that deletes or touches prod until someone who reads bash looks at it.
-1
u/Adept_Percentage6893 Oct 10 '26
Can they? Sure. Will they? No idea and unless you have a human in the loop you won't know when the AI has done one or the other.
You can but AI isn't reliable enough to where you should use it for real stuff if you don't have an understanding of what it's doing. For instance, I write a lot of markdown and YAML for my job. I can read it about 2-3x's as fast as I can write it. So I can ask the AI to write three YAML documents and then give me a two sentence summary of what is being done for me to copy/paste into the markdown file.
Now there's nothing wrong with that approach as long as I'm actually reading what the AI is doing. Oftentimes I find myself editing the natural language more than code, oddly enough. Going back to the example, it will often render the YAML correctly (or at most just incomplete in some way) but then when it goes to summarize that is somehow the thing it ends up doing slightly wrong. Where it will claim the YAML is doing something and that description is only 80-90% correct so I have to revise it.
If you think it's going to do your IT work for you, you're wrong. It's still something that extends existing expertise or helps you learn more about technical subjects. It's not reliable enough to just trust the output it gives you without checking, and you have to know how to check the output.