Every developer has been there. You join a new project, or you're cleaning up a legacy codebase, and you see it:
UserService.tsproduct_api.jsget-orders.tsFinal_component.jsx
It’s a visual mess, and it makes finding files in your editor a constant friction point. Manually renaming dozens or hundreds of files is a tedious, error-prone nightmare.
I built CaselyJS to solve this problem permanently, and I just upgraded it to v1.0 with a full TypeScript rewrite and a brand-new CLI.
⚡ The 10-Second Quick Start (No Install Required)
The best way to try CaselyJS is with npx. You can clean up your current project right now without adding a single dependency to your package.json.
# Preview changes (dry run) in the current directory
npx caselyjs --dry
# Re-case all files in the ./src folder to kebab-case
npx caselyjs ./src --case kebab
✨ What’s New in v1.0?
I’ve transformed CaselyJS from a simple string utility into a robust, high-performance CLI tool designed for large-scale codebase refactoring.
Features
Full CLI: No code required. Run it directly from the terminal.
Refactor codebases in seconds.Dry Run Mode: See exactly which files will be renamed before it happens.
Total peace of mind. Zero risk.Recursive Bottom-Up: Renames deep directories first, keeping parent paths valid.
It just works, even on deeply nested structures.File Filtering: target specific extensions (e.g., just
.tsand.tsx).
Complete control over the scope of changes.
🚀 Usage Examples
npx caselyjs ./src --full --case pascal --dry
CLI Options
--case: pascal | kebab | camel ( default: kebab, shorthand: -c )
npx caselyjs ./src/components --case pascal
# or
npm caselyjs ./src/components -c pascal
--ext: ( default: "js,jsx,ts,tsx", shorthand: -e )
npx caselyjs ./src/components --ext "go,py,cpp"
# or
npm caselyjs ./src/components -e "go,py,cpp"
--extoverrides the existing extensions
--full: ( default: false, shorthand: -e )
npx caselyjs ./src/components --case kebab --full
# or
npm caselyjs ./src/components -c kebab -f
--dry: ( default: false )
npx caselyjs ./src/components --case kebab --full --dry
🧠 Under the Hood (For the Geeks)
This v1.0 rewrite was about more than just a CLI. I moved the entire core to TypeScript for strict type safety. We use Commander.js for robust flag parsing, Chalk for those beautiful terminal colors, and a custom Bottom-Up Sorting algorithm for recursive folder renames. This ensures that a child file's path isn't broken when its parent folder is renamed during the process.
Mit-Licensed and Open Source
CaselyJS is 100% open source and free to use.
I would love your feedback on the new CLI and features! If you run into any issues or have a feature request (more case types?), please open an issue or pull request on GitHub.
Try it out: npx caselyjs ./your-test-folder --dry
Repository: github.com/codezaura/caselyjs
NPM: npm/caselyjs
Made with ❤️ by codezaura
Top comments (1)
🚀💥Fastest way to organize your codebase
for safety use
--dryflag before executing.😃