Skip to content

Renamify

Smart search & replace for code and files with
case-aware replacements and built-in undo/redo.

Released as a CLI tool, MCP Server, and VS Code / Cursor Extension

Case-Aware

Replaces snake_case, camelCase, PascalCase, kebab-case, etc.

Content & Files

Renames both file contents and files/directories in a single operation.

Safe & Atomic

Plan then apply atomically with full undo/redo. No partial states.


Renamify is a tool that understands different naming conventions and can rename both file contents and the files themselves in a single atomic operation. It’s designed for developers (and AI agents) who need to rename terms safely and efficiently.

Traditional find-and-replace tools work at the text level, but don’t understand code conventions. If you want to rename getUserName to fetchUserProfile, you need to handle:

  • getUserName (camelCase)
  • get_user_name (snake_case)
  • GetUserName (PascalCase)
  • GET_USER_NAME (SCREAMING_SNAKE_CASE)
  • Files like get-user-name.js
  • Directories like user-name/

Renamify handles all of these automatically in a single operation.

The Renamify MCP Server enables AI agents to:

  • Plan renames with case-aware transformations
  • Preview changes in AI-friendly formats
  • Apply changes atomically with full undo/redo support
  • Manage rename history across your codebase
Terminal window
# Quick install to ~/.local/bin (no sudo)
curl -fsSL https://docspring.github.io/renamify/install.sh | bash

See the installation guide for system-wide installation and more options.

Rename getUserName to fetchUserProfile across your entire codebase:

Terminal window
renamify rename getUserName fetchUserProfile

This automatically handles:

  • getUserNamefetchUserProfile
  • get_user_namefetch_user_profile
  • GetUserNameFetchUserProfile
  • GET_USER_NAMEFETCH_USER_PROFILE
  • Files like getUserName.jsfetchUserProfile.js

You can also specify specific paths:

Terminal window
renamify rename getUserName fetchUserProfile src/ tests/

(The other kind of self-hosting.)

Why do I need Renamify when IDEs already have rename/refactoring features?

While IDEs have had context-aware search and replace capabilities for decades, the landscape has changed dramatically:

  1. AI Development Era: With AI assistants like Claude and Cursor, many developers now code outside traditional IDEs. These AI tools need programmatic access to powerful search & replace features.

  2. Cross-Platform Consistency: IDE refactoring features vary between editors and may not handle all case styles or file renames consistently.

  3. Automation-Friendly: Renamify can be used in scripts, CI/CD pipelines, and integrated with AI agents via MCP (Model Context Protocol).

  4. Beyond IDE Boundaries: Renamify works across your entire codebase including documentation, configuration files, and scripts that IDEs might not understand.

  5. Undo/Redo History: Unlike IDE operations, Renamify maintains a persistent history that survives editor restarts.

Productivity has skyrocketed in the new era of AI development, but AI agents are still missing a lot of tooling to make them more effective. Renamify helps fill one of these gaps.

How is this different from VS Code’s case-preserving find and replace?

VS Code introduced case-preserving find and replace, which is great for simple cases. Renamify goes much further:

  • More case styles: Handles snake_case, kebab-case, camelCase, PascalCase, SCREAMING_SNAKE_CASE, Title Case, Train-Case, and dot.case
  • File and directory renaming: Automatically renames matching files and folders, not just content
  • Acronym intelligence: Properly handles HTTPSConnection, XMLParser, URLRouter
  • Atomic operations: All changes succeed or roll back together
  • Cross-editor: Works consistently regardless of your editor choice
  • AI integration: Can be controlled by AI agents through MCP
Why use the MCP server instead of the CLI directly?

The MCP (Model Context Protocol) server is optimized for AI agents:

  • Structured outputs: Returns data in formats that AI can easily parse and understand
  • Stateful operations: Maintains context between operations within a session
  • Error handling: Provides clear, actionable error messages for AI to interpret
  • Integration: Works seamlessly with Claude Desktop, Cursor, and other MCP-compatible tools

However, if the MCP server doesn’t work for your setup, you can always instruct your AI assistant to use the CLI directly by running shell commands. Both approaches give you the same powerful refactoring capabilities.

What if the MCP server doesn’t work with my AI tool?

No problem! Renamify is primarily a command-line tool. If your AI assistant can run shell commands, it can use Renamify directly:

Terminal window
# AI agents can run these commands directly
renamify rename oldName newName
renamify plan oldName newName --preview table
renamify apply
renamify undo

The MCP server is just a convenience wrapper that makes it easier for AI tools to use Renamify, but it’s not required.

How does Renamify handle acronyms like HTTP, API, or URL?

Renamify has built-in intelligence for common acronyms:

  • Recognizes acronym boundaries: HTTPSConnectionHTTPS + Connection
  • Preserves acronyms during transformation: parseURLparseWebAddress (if renaming URL to WebAddress)
  • Maintains case appropriately: XMLParser in PascalCase becomes xml_parser in snake_case
  • Configurable with --include-acronyms, --exclude-acronyms, or --no-acronyms flags
Is it safe to use on my production codebase?

Yes! Renamify has multiple safety features:

  1. Plan-first workflow: Always preview changes before applying
  2. Atomic operations: All changes succeed or none are applied (no partial states)
  3. Automatic backups: Creates temporary backups during operations
  4. Full undo/redo: Every operation can be reversed
  5. Git-aware: Respects .gitignore and can create safety commits
  6. Binary protection: Ignores binary files by default
  7. Conflict detection: Identifies and reports merge conflicts

We recommend creating a git commit before major refactoring operations for extra safety.

What files does Renamify ignore by default?

Renamify respects the same ignore rules as ripgrep:

  • .gitignore - Git’s ignore patterns
  • .ignore - Generic ignore file
  • .rgignore - Ripgrep-specific patterns
  • .rnignore - Renamify-specific patterns

It also ignores:

  • Binary files (unless using -uuu flag)
  • Hidden files and directories (unless using -u flag)
  • Common build artifacts (node_modules/, target/, dist/, etc.)

Use -u, -uu, or -uuu flags to override ignore rules progressively.

Does Renamify work on Windows?

Yes! Renamify is fully cross-platform and works on:

  • Linux (x86_64, arm64)
  • macOS (Intel, Apple Silicon)
  • Windows (x86_64, arm64)

All features work consistently across platforms, including proper handling of Windows path separators and long path names.

How do I rename something back if I make a mistake?

Renamify maintains a complete history:

Terminal window
# Undo the last operation
renamify undo
# Or undo a specific operation by ID
renamify undo <id>
# View history to find the right operation
renamify history
# Redo if you change your mind
renamify redo

The history is persistent and survives terminal sessions.

Can Renamify handle complex, multi-word identifiers?

Yes! Renamify properly tokenizes and transforms complex identifiers:

  • getUserAccountDetailsfetchCustomerAccountDetails
  • get_user_account_detailsfetch_customer_account_details
  • user-account-service.jscustomer-account-service.js
  • UserAccountDTOCustomerAccountDTO

It understands word boundaries, compound words, and mixed-case patterns.

What’s the advantage of atomic operations?

Atomic operations ensure your codebase is never in a broken state:

  • All file content changes are applied first
  • Then all file/directory renames happen in dependency order
  • If anything fails, everything rolls back
  • No partially renamed code that won’t compile
  • No broken imports from incomplete renames

This is especially important when renaming across hundreds of files.

How fast is Renamify on large codebases?

Renamify is built on the ripgrep engine and is extremely fast:

  • Single-pass scanning with compiled regex/automaton
  • Parallel file processing
  • Efficient ignore file handling
  • Memory-mapped file I/O where appropriate

It can handle codebases with thousands of files in seconds.

Can I use Renamify for non-code files?

Yes! Renamify works with any text files:

  • Markdown documentation
  • Configuration files (YAML, JSON, TOML)
  • Shell scripts
  • Docker files
  • CI/CD configurations
  • Even prose documents

Use --preview to verify changes make sense for your file types.

Who maintains Renamify?

Renamify is developed and maintained by DocSpring, a company that builds developer tools and PDF API services. It’s open source under the MIT license.

CI

E2E Tests