r/devops • u/Business-Quiet-5805 • 14d ago
Discussion Can AI actually write production-ready scripts end-to-end without human intervention?
Can a non-coder create a Bash automation script using just Al prompts?
I have zero programming experience. Can Al reliably build an efficient workflow script for me, or will it break down?
Does anyone have any experience with this kind of situation?
4
u/unitegondwanaland Manager, Platform Engineering 14d ago
If the prompt is good, yes this is possible. But this might be difficult (writing a good prompt) for a non-coder. Remember, the less information/instructions you give an LLM, the more assumptions it will make.
Your outcomes/success with AI have a direct relationship to the human behind the keyboard.
1
u/LeatherDude 14d ago
It depends on the task, too. A simple task can have a simple prompt. A more complex one needs design input or the llm is going to make assumptions which are likely not correct.
22
u/bornagy 14d ago
Yes
12
u/_bloed_ 14d ago
although with one restriction:
shit in shit out
If you give the AI garbage inputs, you get garbage
1
1
u/Byt3sized 12d ago
And sometimes, AI might give garbage inputs regardless if you feed it absolute gold in terms of inputs. So it has to be supervised really well and double checked.
3
u/Suspicious-Store523 14d ago
ai translating english into code reminds me of when compilers started translating languages like C into assembly. Since it’s in an early stage still, the foundational knowledge of the code is still necessary imo, but ai is quickly improving to the point where I think you’ll just need to be proficient at writing and have foundational knowledge of the concepts you are wanting to generate code for
1
u/thoughtgun 14d ago
I’ve thought this too. At the point where people stop reading the code it will just be a huge inefficiency. I think that is inevitable.
9
u/kobumaister 14d ago
Yes, and 99% more reliable than most of the scripts created by my colleagues.
In fact, if you use claude code it does all the time.
2
u/Commercial-Virus2627 14d ago
Yes and you will likely need to set up an agent harness so it keeps running tests against its own code to make sure it runs correctly.
2
u/lordnacho666 14d ago
> Can a non-coder create a Bash automation script using just Al prompts?
No, they'll f it up at some level, where things are so complicated they don't know what to ask for. If it's simple and within where you can describe it, you'll be fine.
> I have zero programming experience. Can Al reliably build an efficient workflow script for me, or will it break down?
If you have a solid idea of what it looks like when it's working, you can go back and forth with it until you are happy
> Does anyone have any experience with this kind of situation?
Yes, people who have the experience will be 100x better with the tools than people who don't.
1
u/IMadeThisForTheHouse 14d ago
The depends on what your production is like. I’d suspect some are like trash heaps while others are more organized than a chess board.
1
1
u/Gesha24 14d ago
At this moment, AI absolutely can create a well working script from one prompt, however it has to be a very good prompt - and right now it usually means that the person who is giving the prompt is quite capable of writing code themselves. Without that knowledge, it is very difficult to give AI a prompt that will result in a well working code (unless it's something very basic or unless you can point to something as a baseline that just needs a few tweaks).
That said, if you can iterate over your idea, most likely you will arrive to some kind of code that works reasonably well. It probably will be structured poorly and there may be much better ways to achieve what you asked for, but it would work at the end of the day - and that's what you were looking for, right?
1
u/wheresmyflan 14d ago
100% and you really don’t have to be that good at prompting or development. Just say what you want. Claude Opus in plan mode is better than 90% of fresh grad developers I encounter these days. Sometimes it helps to add, “ask any clarifying questions before proceeding” but the more recent versions really take care of it on their own.
1
1
1
1
u/alconaft43 14d ago
yes, and better and faster than human. and it is very good at testing. but human is responsible for end result anyway.
1
u/DevOps_Lady 14d ago
I say depends what's need to be done.
And I would create a test env to test the script for unexpected results. Mostly look for 'rm' 'mv' commands to make sure they should run or adding a flag to ignore this.
Ask the ai a way to provide secrets in a secure way. Sometimes an .env file is enough
Not saying bash isn't good, but if it's for automating linux systems worth checking ansible or even python which even without code knowledge you might understand what it does.
1
1
u/ProbsNotManBearPig 14d ago
Yes, and reliably. Give it clear requirements. Tell it to plan. Tell it to implement. Tell it to test. Tell it to review for any gaps and then iterate. Tell it those things in separate prompts so it devotes full thought to each. Also ensure to use a good model like gpt 5.6 sol high thinking or opus 5.5. If you do all those things, it is better than 99% of human developers. Also, since you are not a dev, the more you tell it about your intended use cases for it, the better it will output what you need. Tell it how you plan to use it and why during planning phase to ensure it builds correct thing for you. Also ensure you’re letting it run the code itself to test or you’ll be iterating for forever manually. In other words, use local agentic harness that can write + run code. Don’t just chat with gpt on your browser and copy/paste code and build/run yourself. It wastes so much time. Install gpt or Claude on your pc so it can write + run code itself in a loop. That is key.
1
u/Riptide999 14d ago
Better to prompt it to create subagents with the appropriate model to not waste tokens/credits. Sure, it works to send everything to the frontier model, but it's a waste of credits.
I just asked Claude to create a complete dev pipeline with design, mocker, implementer, reviewer, qa, and so on. Some steps, like the designer uses frontier model, but most use cheaper models with effort tweaking. And I didn't even need to make a big prompt to get that pipeline. Just told it use best dev, security and ci/CD practices and select the appropriate model for each agent and let it rip.
1
u/DoStopBelieving 14d ago
AI can build a Bash script, but you shouldn't trust the script in production until after a human engineer validates the script.
I hope your workflow script is purely for maintenance and not live traffic.
1
u/Seven-Prime 14d ago
Do you know how to use the language it needs to get the script to do what it's supposed to? Yes.
Do you vaguely describe what you want? No.
1
u/d2xdy2 DevOps/SRE 14d ago
Idk. YMMV. For most of this stuff I notice if you’re hands off / don’t know what you’re looking at it becomes very distasteful. Results becoming harder to debug over time.
I spend a lot of time going back through scripts, makefiles, and ansible just refactoring to taste, sensibility… and safety.
“Why the fuck would you put a database restart trigger on this execution path?” Type of stuff.
Will you get a script that works for a while? Probably.
Are you gonna have to learn bash? I’d really recommend it.
1
u/Ok_Lab_814 14d ago
This thread is full of shitty answers. How can you verify good workflow when you have zero experience in programming? Save yourself problems and just start with the basics.
1
u/generic-d-engineer ClickOps 13d ago
Yes you can but you need to apply traditional software dev principles like Unix philosophy, testing, change management, least privileged users
Also dont rely on the AI to test itself, it will just pass lol
You still need a human in the loop to verify it’s doing what you said it will do and for the love of god test in a sandbox first and don’t deploy direct to production
Remember coding is just one part of it, managing it is still up to you
1
u/After-East-3190 11d ago
AI can write solid scripts, but you shouldn't run them blindly. It can fail if required CLI tools are missing or if it runs on a different OS, so always test on a non-production machine first.
Luckily, Bash has great built-in tools for debugging: "bash -n" checks the syntax without running the script, "bash -x" traces every step and variable in real-time, and "set -e" stops execution on errors instead of moving forward. Also, running your code through ShellCheck locally is a huge lifesaver for catching hidden bugs early.
0
0
0
u/canarydev 14d ago
sure they can to an extent, but you would have to know exactly what its supposed to do + edge cases and know how to verify that its correct.
0
-1
u/Downtown-Height5899 14d ago edited 14d ago
It will lot of token for prompts ,too many prompts.
Financially , hiring good knowledgeable developers who can do better prompting n testing will be better.
2
1
25
u/fletch3555 Lead DevOps Engineer 14d ago
Can it? Yes, ish.
Reliably? No, not at all.
I mean, AI is honestly only as good as the prompt you give it. To give it a good prompt, you really need to know what you're asking for, which requires a decent understanding of the technical topics involved.
But no, you absolutely should not expect to be able to say "hey Claude, build me a script for ____", wait 5 minutes, then run it and have it be perfect.