CLI Tool / Script Generation

A shared folder with AI prompts and code snippets

From workspace: Replit

Team: AI Prompts

Total snippets: 5

Replit

CLI Tool / Script Generation

5 snippets

Python Script to Rename Files in Bulk

Write a Python script to batch rename files with a prefix.

Write a script to: – Rename all `.txt` files in a folder – Add prefix 'renamed_' to each filename – Show before/after filenames Use pathlib or os.

Node CLI with Commander.js

Build a Node.js CLI tool using Commander.js.

Build a CLI in Node.js with Commander.js that: – Has a command `hello` that takes a `--name` flag – Prints `Hello, [name]!` Show install and run instructions too.

Write Shell Script to Monitor Disk Usage

Generate a shell script that sends a warning if disk usage exceeds 90%.

Create a shell script that: – Checks disk usage – Prints warning if > 90% – Can be run via cron Add comments for each part.

Python CLI with Argparse

Generate a Python CLI tool that accepts arguments using argparse.

Write a Python CLI that: – Accepts two numbers – Has a flag for addition or subtraction – Prints the result Use argparse for argument parsing.

Create Bash Script to Backup Folder

Write a Bash script to back up a folder into a timestamped archive.

Write a Bash script to: – Accept a folder path as an argument – Create a .tar.gz backup with a timestamp – Save it in a 'backups' directory Make the script safe and reusable.

Replit - CLI Tool / Script Generation - AI Prompts & Code Snippets | Snippets AI