Skip to content

Go based terminal application for finding and replacing strings across an entire project. This should be used when you cant trust your IDE to do the job.

License

Notifications You must be signed in to change notification settings

LouisWhit/chainsaw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

   ___ _           _                           
  / __\ |__   __ _(_)_ __  ___  __ ___      __ 
 / /  | '_ \ / _` | | '_ \/ __|/ _` \ \ /\ / / 
/ /___| | | | (_| | | | | \__ \ (_| |\ V  V /  
\____/|_| |_|\__,_|_|_| |_|___/\__,_| \_/\_/   

Slice through your HTML with precision!

InstallationUsageFeaturesContributingLicense


🌟 About

Chainsaw is a powerful command-line tool that allows you to make surgical changes to your HTML files across entire project directories. With Chainsaw, you can easily find and replace text within specific HTML elements, saving you time and reducing the risk of manual errors.

🚀 Features

  • 🔍 Search for specific HTML IDs across multiple files
  • 🔄 Find and replace text within targeted HTML elements
  • 📁 Recursively process entire project directories
  • 📝 Detailed logging of all changes
  • 💅 Stylish CLI interface powered by Bubble Tea

🛠 Installation

macOS

Run the following command in your terminal:

curl -sSL https://raw.githubusercontent.com/LouisWhit/chainsaw/main/unix-install.sh | bash

Other platforms

Ensure you have Go installed (version 1.16+) Run:

go install github.com/LouisWhit/chainsaw@latest

🔧 Usage

bashCopychainsaw <project_folder> <html_id> <find_string> <replace_string>

Example:

chainsaw ./my-project "header-nav" "Contact Us" "Get in Touch"

This command will:

Search through all files in ./my-project Find elements with the ID header-nav Replace "Contact Us" with "Get in Touch" within those elements

📊 Output

Chainsaw provides real-time feedback in your terminal and generates a detailed log file in your home directory: Copy~/chainsaw_log-2024-08-07_14-30-45.txt

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

📜 License

This project is good luck licensed.

About

Go based terminal application for finding and replacing strings across an entire project. This should be used when you cant trust your IDE to do the job.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published