# Rename

Modes: preview/apply or execute.
Use execute for routine changes.
Use preview/apply when learning a mutation command or inspecting a large multi-step request before writing files.

If a name is ambiguous, use selectors.
Run help selectors to refresh selector syntax.

Rename is for semantic symbol renames.
It follows TypeScript references.
It is not plain-text replacement.

Single rename:
rename preview <file> <entity> <newName>
rename execute <file> <entity> <newName>
rename apply <previewId>

Use preview/apply when you want to inspect the planned change before writing files.
Use execute when you want to write immediately.

Run:
aib rename execute --stdin

Input:
@file src/service.ts
rename oldName->newName OldService->NewService

Rename can use plain names or selectors.
For methods and properties, use parent-qualified syntax when needed:
rename Service.oldMethod->newMethod

Single rename:
rename preview <file> <entity> <newName>
rename execute <file> <entity> <newName>
rename apply <previewId>

Use preview/apply when you want to inspect the planned change before writing files.
Use execute when you want to write immediately.
