vvv-engine 0.2.0

Composes vvv plugins into refactoring pipelines
Documentation

vvv reads declarations, identifiers, and imports. Rename follows references resolved through module paths, and move rewrites paths it can resolve. Mutations preview by default; --apply writes a checked plan and records an undo entry. Resolution and failure-recovery limits are specified in the guide.

Install

cargo install vvv-rs

Prebuilt binaries for Linux (x86_64, aarch64), macOS (x86_64, aarch64) and Windows are attached to each release.

[!NOTE] The binary is vvv. The default build includes Rust, TypeScript and the picker. To install a subset, name the features, e.g. --no-default-features --features rust,tui.

Commands

Every command runs against the current directory (-C <dir> picks another) and prints human output (--json prints the machine-readable result).

Find

vvv search <name>                       # every identifier spelling the name
vvv search --symbol <kind>              # declarations of one kind: function, struct, trait, …
vvv search '<pattern>'                  # ast-grep structural pattern, e.g. 'fn $N($$$) { $$$ }'

Understand

vvv outline <file>                      # declarations, visibility, module path
vvv references <name>                   # every use, judged like a rename
vvv where <name> --from <file>          # the declaration, and the import to write there
vvv deps <file>                         # what the file imports, and who imports it
vvv explain <file>:<line>:<column>      # what is at a position
vvv surface <package>                   # what a package offers, and who takes it
vvv impact <name>                       # who would feel a change, ring by ring
vvv dead                                # declarations nothing refers to
vvv imports <file>                      # unresolved, unused or redundant imports

Change

vvv rename <name> <new>                 # the declaration and every reference
vvv move <from> <to>                    # a file or directory, and the paths pointing at it
vvv move --symbol <name> <from> <to>    # one declaration between files
vvv rewrite '<pattern>' '<template>'    # pattern matches, template expanded
vvv batch <file.json>                   # several intents as one transaction; - reads stdin

[!NOTE] A changing command previews and stops. --apply writes the plan, --diff prints the full patch of every file, and --select acts on chosen rows only.

Output

Every command draws from one set of marks:

mark meaning
● a declaration
○ a use, not a declaration
→ ← an import / imported by
↗ a re-export
✓ ? ✗ refers to the declaration / can't tell / another one
± a structural edit: a mod line, a visibility
! left to you, with the reason
∅ nothing
+N the match continues for N more lines

Rows are numbered in the order printed; those numbers are what --select takes.

Documentation

License

MIT