Building Custom Terminal Tools with Claude 3.5
Vibecoders spend a lot of time in two places: the AI-native editor (Cursor/Windsurf) and the terminal. If you find yourself typing the same convoluted find | grep | awk chain more than twice a week, you are wasting the prime advantage of having an AI at your fingertips.
In 2026, building a custom CLI tool doesn’t require spending a week reading documentation. You can spin up a blazingly fast utility in Go or Rust in about 15 minutes.
Here is the exact vibecoding workflow for automating your terminal.
1. Choose Your Weapon (Language)
When generating CLI tools, language choice matters for distribution.
- Node/Python: Easy to write, but annoying to distribute because the user needs the runtime installed.
- Go/Rust: The preferred choice for vibecoders. They compile down to a single standalone binary. You don’t need to know Rust to have Claude write Rust for you.
For this example, we will ask Claude to use Go.
2. The Prompt Architecture
Don’t just say, “Write a CLI tool that deletes node_modules.” You need to provide structure to get a robust, error-handled output.
Open your editor, open a new chat context, and use this template:
Goal: Create a standalone CLI utility in Go to help me manage my local Astro projects.
Functionality:
- The command
astro-sweepshould find allnode_modulesand.astrocache directories in subfolders of my current directory and delete them to free up space.- Provide a
--dry-runflag to just output the space that would be saved.Requirements:
- Use the standard library where possible, or popular stable libraries like
cobraif necessary.- Include colorful terminal output with progress indicators.
- Handle permissions errors gracefully (don’t crash, just log and skip).
- Write the resulting output into a single
main.gofile.
3. The Iteration Loop
Claude will likely generate something very close to perfect on the first try.
Save it as main.go and run:
go run main.go --dry-run
If it errors (e.g., a missing package):
Copy the terminal error, paste it back to the AI: “I got this error on execution.” The AI will instantly tell you to run go mod init and go get.
If you want to tweak the vibe: “The output is a bit dull. Add chalk/color styling so that deleted folders show up in red, and the total space saved is bold green.”
4. Compiling and Installing
Once the script works perfectly, you need to make it accessible globally on your system.
Ask the AI:
“How do I build this Go file into an executable and move it to my PATH on macOS so I can run
astro-sweepfrom anywhere?”
It will give you the exact build commands (e.g., go build -o astro-sweep main.go) and the mv command to place it in /usr/local/bin.
Takeaways
By treating your AI as a rapid CLI-generator, you turn your terminal into a personalized, frictionless environment. Need to resize 50 images in a folder? It’s a 5-minute prompt for a custom Go tool. Need to parse a massive JSON log file? Generate a custom Rust utility.
Stop fighting with bash syntax and let your AI co-pilot do the heavy lifting.


