Quick Start
Basic Renaming
Section titled “Basic Renaming”The fastest way to rename something across your codebase:
renamify rename old_name new_name
This will:
- Show you a preview of all changes
- Ask for confirmation
- Apply changes atomically
- Create backups for undo
Your First Rename
Section titled “Your First Rename”Let’s say you want to rename getUserName
to fetchUserProfile
:
# Rename with preview and confirmationrenamify rename getUserName fetchUserProfile
You’ll see output like:
Files to modify: 15┌─────────────────────────────────────┬──────────┬────────────────────┬─────────────────────┐│ File │ Lines │ Old │ New │├─────────────────────────────────────┼──────────┼────────────────────┼─────────────────────┤│ src/auth.js │ 23, 45 │ getUserName │ fetchUserProfile ││ src/auth.js │ 12 │ get_user_name │ fetch_user_profile ││ components/UserProfile.tsx │ 89 │ GetUserName │ FetchUserProfile ││ constants.py │ 5 │ GET_USER_NAME │ FETCH_USER_PROFILE │└─────────────────────────────────────┴──────────┴────────────────────┴─────────────────────┘
Files to rename: 2┌─────────────────────────────────────┬─────────────────────────────────────┐│ Current Path │ New Path │├─────────────────────────────────────┼─────────────────────────────────────┤│ utils/get-user-name.js │ utils/fetch-user-profile.js ││ tests/getUserName.test.js │ tests/fetchUserProfile.test.js │└─────────────────────────────────────┴─────────────────────────────────────┘
Apply these changes? [y/N]: y✅ Applied successfully! Operation ID: abc123
Undo if Needed
Section titled “Undo if Needed”If you make a mistake, you can easily undo:
# See recent operationsrenamify history
# Undo the last operationrenamify undo abc123
Plan and Apply Workflow
Section titled “Plan and Apply Workflow”For large renames, use the plan/apply workflow for extra safety:
# Step 1: Create a planrenamify plan old_name new_name
# Step 2: Review the plan filecat .renamify/plan.json
# Step 3: Apply when readyrenamify apply
Common Options
Section titled “Common Options”Limit to Specific Files
Section titled “Limit to Specific Files”# Only rename in src/ directoryrenamify rename old_name new_name src/
# Or use include patterns for more controlrenamify rename old_name new_name --include "src/**"
# Exclude test filesrenamify rename old_name new_name --exclude "**/*test*"
Control What Gets Renamed
Section titled “Control What Gets Renamed”# Don't rename files, only contentrenamify rename old_name new_name --no-rename-files
# Don't rename directoriesrenamify rename old_name new_name --no-rename-dirs
Limit Case Styles
Section titled “Limit Case Styles”# Only handle camelCase and snake_caserenamify rename old_name new_name --only-styles camel,snake
Safe Practices
Section titled “Safe Practices”- Preview is automatic - Renamify shows a preview by default before applying
- Commit before large renames - Makes git-based rollback possible in addition to Renamify’s built-in history
- Start small - Try on a subset with
--include
first - Use undo - Renamify’s undo is often faster than git reset
Next Steps
Section titled “Next Steps”- Learn about case-aware transformations
- Explore safety features
- See more examples