Skip to content

CHashtager/renom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

renom

A simple CLI tool to recursively rename files, directories, and replace text inside files.

🚀 Features

  • Rename directories that contain a specific substring.
  • Rename files that contain a specific substring.
  • Replace text inside files.

🛠️ Installation

Option 1: Direct Installation with Go

You can install renom directly using Go:

go install github.com/CHashtager/renom/cmd/renom@latest

This will download, compile, and install the renom binary to your $GOPATH/bin directory, which should be in your PATH.

Option 2: Manual Installation

1️⃣ Clone the Repository

git clone https://github.com/CHashtager/renom.git
cd renom

2️⃣ Build the CLI

Compile the Go binary:

go build -o renom ./cmd/renom/main.go

This will generate an executable file named renom.

📌 Adding to PATH for Global Use

To use renom from anywhere in the terminal, you need to add it to your system's PATH.

🔹 Linux / macOS
  1. Move the binary to /usr/local/bin:
    sudo mv renom /usr/local/bin/
  2. Verify installation:
    renom --help
🔹 Windows
  1. Move renom.exe to a permanent location, e.g., C:\renom\

  2. Add this directory to the system PATH:

    • Open Start Menu → Search "Environment Variables" → Open "Edit the system environment variables"
    • Under System Properties, click Environment Variables
    • Under System variables, select PathEdit
    • Click New, then add C:\renom\
    • Click OK to save
  3. Verify installation:

    renom --help

🏃 Usage

renom old_string new_string

Example:

renom "test" "example"

This renames all occurrences of "test" with "example" in files, directories, and file contents.


🛠 Uninstalling

To remove the tool, delete the binary from the PATH:

sudo rm /usr/local/bin/renom  # Linux/macOS
del C:\renom\renom.exe  # Windows

📝 License

MIT License

About

A simple CLI tool to recursively rename files, directories, and replace text inside files.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages