Let AI drive | Master AI Automation in 4 hours Master AI Automation in 4 hours Course About Ayush Modules Sample chapter Toolbox The Microcap Minute Classroom / Module 03: The Command Line / Chapter 7 Let AI drive Watch first, then read. Same lesson, your pace. What you will learn – Running Python and shell scripts from the terminal – The error-reading protocol that turns failures into answers – Working with terminal-native AI agents Your first script Create hello.py in ai-workspace/learn (use Chapter 4’s redirect for speed): echo ‘print(“hello from a script”)’ > hello.py Run it: python3 hello.py # or: python hello.py on Windows That loop, edit file, run command, see output, is the entire engine of programming. Everything else is variations. Shell scripts work the same way: put commands one-per-line into backup.sh , run with bash backup.sh . The error-reading protocol Errors are the terminal’s way of being helpful, and they follow a format. When something fails, read in this order: Last line first , the actual complaint (“FileNotFoundError”, “command not found”). Then the line number , where it happened. Then the message body , what was expected vs found. Example: Traceback (most recent call last): File “hello.py”, line 2 NameError: name ‘pirnt’ is not defined Translation: line 2, you typed pirnt , no such thing exists. The machine literally told you the fix. Most beginners panic at the wall of red; professionals scan the last two lines and smile. The protocol upgrade: AI reads it too Now combine Modules 2 and 3. When an error resists you, feed the whole thing to your AI, never paraphrase it: I ran this command: python3 hello.py in this folder situation: [pwd + ls output] and got this exact error: [paste all of it] My goal was X. Explain the error simply and give me the corrected command. Full command + full error + goal = near-instant diagnosis. This one habit, pasting complete errors instead of describing them badly, is worth more than any paid course. Meet your terminal-native teammate The next level isn’t pasting errors, it’s an AI living inside the terminal with you. Tools like OpenCode (open-source, works with Claude/Kimi/Qwen/free OpenRouter models) and Claude Code are coding agents: you describe the task, they read files, write code, run commands and fix their own mistakes, showing every step. Why this matters to this course’s philosophy: these agents operate through the very commands you learned in Chapters 1-6. Terminal fluency isn’t just for you anymore, it’s how you direct machines that direct computers. You’ll install OpenCode properly in Module 10; today just know the species exists and where it lives. Try it yourself Deliberately break things, professionally. Run python3 hello.py , then edit the file to contain print(undefined_variable) and run again. Read the error using the three-step protocol. Then paste the exact traceback into Kimi or Claude with the template above and compare its explanation to yours. Finally ask it: “Give me three more common Python errors a beginner should recognise.” Save them to prompts/error-zoo.txt . Key takeaways – Edit โ run โ observe is programming’s whole engine; scripts are just saved commands. – Read errors last-line-first: complaint, location, detail. – Paste complete errors + context + goal to any AI; partial descriptions waste everyone’s time. – Terminal-native agents (OpenCode, Claude Code) turn your fluency into leverage, arriving in Module 10. Download the exercise sheet (PDF) Module workbook (PDF) โ Prev: IDEs vs the command line Module 03 index โ Classroom / Module 03: The Command Line / Chapter 7 Let AI drive What you will learn – Running Python and shell scripts from the terminal – The error-reading protocol that turns failures into answers – Working with terminal-native AI agents Your first script Create hello.py in ai-workspace/learn (use Chapter 4’s redirect for speed): echo ‘print(“hello from a script”)’ > hello.py Run it: python3 hello.py # or: python hello.py on
Let AI drive
Written by
in