Skip to content

hegner123/easypath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easypath

Rename files with spaces and irregular casing to lowercase underscore style.

Parses filenames using a stack-based dot parser — every dot is a structural separator, every segment gets the same transform. No extension map needed.

Examples

Input Output
My File Name.txt my_file_name.txt
camelCaseFile.go camel_case_file.go
component.test.js component.test.js
XMLParser.d.ts xml_parser.d.ts
LOUD FILE.tar.gz loud_file.tar.gz
.eslintrc.json .eslintrc.json

Installation

go build -o easypath && codesign -s - easypath
sudo cp easypath /usr/local/bin/

Or with just:

just install

Usage

CLI

# Single file
easypath --cli "My File.txt"

# Multiple files
easypath --cli "File One.txt" "File Two.go"

# Directory
easypath --cli --dir /path/to/dir

# Recursive directory
easypath --cli --dir /path/to/dir --recursive

# Dry run (preview without renaming)
easypath --cli --dry-run --dir /path/to/dir

MCP Server

Runs as a stdio MCP server by default (no --cli flag). Parameters:

Param Type Description
files array Array of absolute file paths to rename
dir string Directory to scan and rename all files
recursive bool Recurse into subdirectories (dir mode)
dry_run bool Preview renames without executing

License

MIT

About

Rename files with spaces and irregular casing to lowercase underscore style. Stack-based dot parser, MCP server + CLI.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors