renamify plan
The plan command generates a detailed plan of all changes that will be made
without modifying any files. This is the first step in Renamify’s two-phase
workflow.
renamify plan <OLD> <NEW> [PATHS]... [OPTIONS]Arguments
Section titled “Arguments”<OLD>- Old identifier to replace<NEW>- New identifier to replace with[PATHS]...- Search paths (files or directories)
Options
Section titled “Options”Output Control
Section titled “Output Control”--preview <FORMAT>- Human-readable preview format: table (default), diff, matches, summary, none--output <FORMAT>- Terminal output format for scripting: summary (default), json--plan-out <PATH>- Where to save the plan (default: .renamify/plan.json)--dry-run- Only show preview, don’t write plan file
Note: The plan is always saved to .renamify/plan.json (or the path specified by --plan-out) regardless of the --output format. The --output json flag only controls what’s displayed in the terminal.
File Processing
Section titled “File Processing”--include <PATTERNS>- Only process files matching these glob patterns--exclude <PATTERNS>- Skip files matching these glob patterns--no-rename-files- Don’t rename matching files--no-rename-dirs- Don’t rename matching directories--no-rename-paths- Don’t rename files or directories (equivalent to —no-rename-files —no-rename-dirs)
Case Styles
Section titled “Case Styles”--exclude-styles <STYLES>- Exclude specific case styles from the default set--include-styles <STYLES>- Add additional case styles to the active set--only-styles <STYLES>- Use only these case styles, ignoring defaults
Match Control
Section titled “Match Control”--exclude-match <PATTERNS>- Skip specific matches (e.g., compound words to ignore)--exclude-matching-lines <REGEX>- Skip matches on lines matching this regex pattern (e.g.,^//for comments,(TODO|FIXME)for todo markers)
Acronym Handling
Section titled “Acronym Handling”--no-acronyms- Disable acronym detection and transformation--include-acronyms <ACRONYMS>- Add custom acronyms to detect (e.g., “API,URL”)--exclude-acronyms <ACRONYMS>- Exclude specific acronyms from detection--only-acronyms <ACRONYMS>- Only use these acronyms, ignore defaults
Atomic Mode
Section titled “Atomic Mode”“Atomic” means treating a search or replace identifier as a single unit, not splitting it into separate components. E.g. GitHub → github, not git_hub
--atomic-identifiers- Treat both search and replace terms as indivisible units--atomic-search- Only treat search term as atomic--atomic-replace- Only treat replace term as atomic--no-atomic-identifiers- Disable atomic mode (override config)--no-atomic-search- Disable atomic for search term--no-atomic-replace- Disable atomic for replace term
Display Options
Section titled “Display Options”--fixed-table-width- Use fixed column widths in table output for consistent formatting
Unrestricted Mode
Section titled “Unrestricted Mode”-u- Disable .gitignore files-uu- Disable all ignore files, include hidden files-uuu- Disable all ignore files, include hidden files, process binary files
Output Formats
Section titled “Output Formats”Table Format (Default)
Section titled “Table Format (Default)”renamify plan getUserName fetchUserProfileShows a clear table view of all changes:
Files to modify: 12┌─────────────────────────────────────┬──────────┬────────────────────┬─────────────────────┐│ File │ Lines │ Old │ New │├─────────────────────────────────────┼──────────┼────────────────────┼─────────────────────┤│ src/auth.js │ 23, 45 │ getUserName │ fetchUserProfile ││ src/types.ts │ 8 │ GetUserName │ FetchUserProfile ││ utils/helpers.py │ 156 │ get_user_name │ fetch_user_profile │└─────────────────────────────────────┴──────────┴────────────────────┴─────────────────────┘
Files to rename: 3┌─────────────────────────────────────┬─────────────────────────────────────┐│ Current Path │ New Path │├─────────────────────────────────────┼─────────────────────────────────────┤│ src/getUserName.js │ src/fetchUserProfile.js ││ components/GetUserName.tsx │ components/FetchUserProfile.tsx ││ tests/get_user_name.test.py │ tests/fetch_user_profile.test.py │└─────────────────────────────────────┴─────────────────────────────────────┘Diff Format
Section titled “Diff Format”renamify plan getUserName fetchUserProfile --preview diffShows changes in diff format:
--- src/auth.js+++ src/auth.js@@ -20,7 +20,7 @@ function authenticateUser(token) {- const username = getUserName(token);+ const username = fetchUserProfile(token); return validateUser(username); }JSON Format
Section titled “JSON Format”renamify plan getUserName fetchUserProfile --output jsonDisplays structured JSON to the terminal for scripting/piping:
{ "id": "a3b7c9d4e8f2a6b1", "created_at": "1734567890", "old": "getUserName", "new": "fetchUserProfile", "matches": [ { "file": "src/auth.js", "line": 23, "old_text": "getUserName", "new_text": "fetchUserProfile" } ], "renames": [ { "old_path": "src/getUserName.js", "new_path": "src/fetchUserProfile.js" } ]}Examples
Section titled “Examples”Basic Planning
Section titled “Basic Planning”# Create a plan with table preview (default)renamify plan old_name new_name
# Plan is saved to .renamify/plan.jsoncat .renamify/plan.json
# Or specify specific pathsrenamify plan old_name new_name src/ tests/Dry Run (No Plan File)
Section titled “Dry Run (No Plan File)”# Just see what would change, don't create a plan filerenamify plan old_name new_name --dry-runAtomic Mode
Section titled “Atomic Mode”# Treat compound words as single unitsrenamify plan DocSpring FormAPI --atomic-identifiers
# Only search term is atomicrenamify plan DocSpring form_api --atomic-search
# Only replace term is atomicrenamify plan doc_spring FormAPI --atomic-replaceExcluding Lines by Pattern
Section titled “Excluding Lines by Pattern”# Skip matches in comment lines (starting with //)renamify plan old_name new_name --exclude-matching-lines '^//'
# Skip matches in lines containing TODO or FIXMErenamify plan old_name new_name --exclude-matching-lines '(TODO|FIXME)'
# Combine with other optionsrenamify plan old_name new_name \ --exclude-matching-lines '^\\s*#' \ # Skip Python comments --exclude-styles kebab \ # Don't generate kebab-case variants --preview diff # Show as diffCustom Plan Location
Section titled “Custom Plan Location”# Save plan to a specific locationrenamify plan old_name new_name --plan-out ./renamify-plan.jsonSpecific File Types
Section titled “Specific File Types”# Only plan changes for Rust files using pathsrenamify plan old_name new_name src/ lib/
# Or use include patterns for more controlrenamify plan old_name new_name --include "**/*.rs"
# Plan for source files, exclude testsrenamify plan old_name new_name \ --include "src/**/*.{js,ts}" \ --exclude "**/*test*"Case Style Control
Section titled “Case Style Control”# Only plan camelCase and snake_case transformationsrenamify plan oldName newName --only-styles camel,snake
# Exclude SCREAMING_SNAKE_CASE from default stylesrenamify plan oldName newName --exclude-styles screaming-snakeLarge Codebase Planning
Section titled “Large Codebase Planning”# Include gitignored files (like vendor directories)renamify plan old_name new_name -u
# Plan for everything (including hidden files)renamify plan old_name new_name -uuPlan File Structure
Section titled “Plan File Structure”The generated plan file (.renamify/plan.json) contains:
{ "id": "7f3a2b5c9d1e8f4a", "created_at": "1734567890", "old": "original_pattern", "new": "replacement_pattern", "styles": ["snake", "kebab", "camel", "pascal", "screaming-snake"], "includes": ["**/*"], "excludes": ["target/**", "node_modules/**"], "matches": [ { "file": "relative/path/to/file.js", "line": 42, "column": 10, "old_text": "matched_text", "new_text": "replacement_text", "context": "surrounding context for verification" } ], "renames": [ { "old_path": "old/file/path.js", "new_path": "new/file/path.js", "is_dir": false } ], "stats": { "files_scanned": 1247, "files_to_modify": 23, "files_to_rename": 5, "directories_to_rename": 2, "total_matches": 89 }}After Planning
Section titled “After Planning”Once you have a plan, you can:
Apply the Plan
Section titled “Apply the Plan”renamify applyReview Before Applying
Section titled “Review Before Applying”# Look at the plan in detailcat .renamify/plan.json | jq .
# Count total changesjq '.stats.total_matches' .renamify/plan.jsonModify the Plan
Section titled “Modify the Plan”Advanced users can edit the plan file directly before applying (not recommended for beginners).
Create a New Plan
Section titled “Create a New Plan”Running plan again will overwrite the existing plan file.
Exit Codes
Section titled “Exit Codes”0- Plan created successfully1- Conflicts detected in planned changes2- Invalid input or arguments3- Internal error or system issue
Performance Tips
Section titled “Performance Tips”For large codebases:
- Use specific
--includepatterns to limit scope - Use
--excludeto skip large directories likenode_modules/ - Consider using
-uflags judiciously to include necessary ignored files