Safely rename a FastMCP project after bootstrap without missing package names, entry points, docs, or tests. Use when: renaming the project, changing the Python package name, changing the CLI command name, changing the display name, or fixing an inconsistent project name. Reads current names from pyproject.toml, shows a diff summary, then updates all affected files consistently.
Safely updates project names across every affected file in one guided pass, using the same file substitution map as bootstrap-personalize.
pyproject.tomlDetect and display the current values:
Current display name: <name from [project].name>
Current package name: <name from [tool.hatch.build.targets.wheel].packages>
Current CLI command: <name from [project.scripts]>
Ask only what is changing. Use vscode_askQuestions if available.
| # | Question | Default |
|---|---|---|
| 1 | New display name | Current value |
| 2 | New Python package name (snake_case) | Current value |
| 3 | New CLI command (kebab-case) | Current value |
If all three answers match the current values exactly, tell the user nothing needs to change and exit.
Display a table of every planned substitution before touching any file:
Display name: OldName → NewName
Package name: old_pkg → new_pkg
CLI command: old-cmd → new-cmd
Files to update:
pyproject.toml
src/old_pkg/__main__.py
src/old_pkg/config.py
src/old_pkg/server.py
src/old_pkg/routes/health.py
src/old_pkg/tools/hello_world.py (if present)
tests/conftest.py
tests/test_config.py
tests/test_*.py (import lines)
.env.example
Dockerfile
README.md
AGENTS.md
Directory rename: src/old_pkg/ → src/new_pkg/ (if package name changes)
Ask for confirmation before proceeding.
Follow the substitution map in ../bootstrap-personalize/references/file-substitutions.md.
Apply in this order:
src/<old_package>/ → src/<new_package>/ (only if package name changed)pyproject.tomlsrc/<pkg>/__main__.pysrc/<pkg>/config.pysrc/<pkg>/server.pysrc/<pkg>/tools/ and src/<pkg>/routes/tests/conftest.pytests/test_*.py files.env.exampleDockerfile (update CMD with new CLI command)README.mdAGENTS.mdruff check .
pytest -v
Fix any import errors or broken assertions before reporting completion. The most common failure is tests/test_config.py asserting a hardcoded display name — check and update those assertion values.
Tell the user which files were changed and confirm tests pass.