VS Code Extension
The RE-cue VS Code extension provides in-editor reverse engineering analysis capabilities, allowing developers to analyze and document codebases directly from their IDE.
Overview
The VS Code extension integrates RE-cue’s powerful analysis capabilities directly into Visual Studio Code, providing:
- Right-Click Context Menu: Analyze files and folders with a single click
- Side Panel Results: View analysis results in a dedicated sidebar
- Navigate to Definitions: Click to jump to source code locations
- Inline Documentation Preview: Hover over elements for documentation
- Auto-Update on Save: Keep documentation synchronized with code changes
Installation
Prerequisites
- Python 3.6+: Required for running RE-cue analysis
- RE-cue Python Package: Install via pip:
pip install -e /path/to/re-cue/reverse-engineer-python/
Install from VSIX
- Download the
.vsixfile from the Releases - Install using VS Code:
code --install-extension re-cue-1.0.0.vsix
Install from Source
Clone the repository:
git clone https://github.com/cue-3/re-cue.git cd re-cue/vscode-extensionInstall dependencies and compile:
npm install npm run compileLaunch in Extension Development Host:
- Open the
vscode-extensionfolder in VS Code - Press F5 to launch
- Open the
Features
Context Menu Analysis
Analyze File
Right-click on any supported file in the Explorer or Editor to analyze it:
- Supported languages: Java, Python, TypeScript, JavaScript, Ruby, C#
- The file’s containing folder is analyzed for context
Analyze Folder
Right-click on any folder to analyze all files within:
- Recursively analyzes all supported files
- Generates comprehensive documentation
Side Panel Views
The extension adds a new “RE-cue” view container to the Activity Bar with five views:
Analysis Results
Overview of discovered components:
- API Endpoints
- Data Models
- Services
- Views
Use Cases
Extracted use cases showing:
- Use case ID and name
- Primary actor
- System boundary
- Preconditions, scenario steps, postconditions
Actors
Discovered system actors:
- Human actors (users, administrators)
- System actors (internal services)
- External actors (third-party systems)
System Boundaries
Architectural boundaries:
- Presentation layer
- Business logic layer
- Data access layer
- External integrations
API Endpoints
REST API endpoints:
- HTTP methods (GET, POST, PUT, DELETE)
- Endpoint paths
- Handler functions
- Parameters and responses
Inline Documentation
Hover Information
Hover over code elements to see rich documentation:
- Endpoints: Method, path, handler, parameters
- Models: Fields, types, relationships
- Services: Methods, dependencies
- Actors: Type, roles, description
- Use Cases: Summary and scenario
CodeLens
See use case references directly in your code:
- Shows which use cases reference an endpoint
- Links to endpoint and service definitions
- Click to navigate to related items
Document Links
Navigate to definitions:
- Click model names to go to definition
- Click service references to navigate
- API path references link to handlers
Auto-Update on Save
Enable automatic analysis when files are saved:
- Open Settings (Ctrl+,)
- Search for “recue.autoAnalyzeOnSave”
- Enable the setting
This keeps your documentation synchronized as you make code changes.
Commands
Access commands via the Command Palette (Ctrl+Shift+P):
| Command | Description |
|---|---|
RE-cue: Analyze File | Analyze the current file |
RE-cue: Analyze Folder | Analyze a selected folder |
RE-cue: Analyze Workspace | Analyze the entire workspace |
RE-cue: Generate Specification | Generate spec.md |
RE-cue: Generate Implementation Plan | Generate plan.md |
RE-cue: Generate Use Cases | Generate use case documentation |
RE-cue: Generate Data Model | Generate data-model.md |
RE-cue: Generate API Contract | Generate api-spec.json |
RE-cue: Generate Diagrams | Generate diagrams.md |
RE-cue: Generate All Documentation | Generate all documentation types |
RE-cue: Refresh Results | Refresh analysis results |
RE-cue: Clear Results | Clear all analysis results |
RE-cue: Open Settings | Open extension settings |
RE-cue: Quick Actions | Show quick action picker |
Configuration
Configure the extension via VS Code Settings:
Python Path
{
"recue.pythonPath": "python3"
}
Path to the Python executable used for analysis.
Auto-Analyze on Save
{
"recue.autoAnalyzeOnSave": false
}
Enable to automatically analyze files when saved.
Output Directory
{
"recue.outputDirectory": ""
}
Custom directory for generated documentation (empty = default).
Default Framework
{
"recue.defaultFramework": "auto"
}
Framework to use for analysis. Options:
auto(recommended)java_springnodejs_expressnodejs_nestjspython_djangopython_flaskpython_fastapiruby_railsdotnet
Enable Features
{
"recue.enableDiagnostics": true,
"recue.enableHover": true,
"recue.enableCodeLens": true
}
Toggle individual features on/off.
Performance Options
{
"recue.enableCache": true,
"recue.enableParallelProcessing": true,
"recue.verboseOutput": false
}
Optimize for large codebases.
Output Files
Generated documentation is saved to re-<project-name>/:
your-project/
└── re-your-project/
├── spec.md # Feature specification
├── plan.md # Implementation plan
├── data-model.md # Data model documentation
├── diagrams.md # Visual diagrams (Mermaid)
├── phase1-structure.md # Project structure
├── phase2-actors.md # Actor discovery
├── phase3-boundaries.md # System boundaries
├── phase4-use-cases.md # Use case analysis
└── contracts/
└── api-spec.json # OpenAPI specification
Troubleshooting
Python Not Found
Problem: “Python not found” or “Module not found” error
Solution: Set the correct Python path:
{
"recue.pythonPath": "/usr/local/bin/python3"
}
RE-cue Module Not Found
Problem: “No module named ‘reverse_engineer’” error
Solution: Install the RE-cue package:
pip install -e /path/to/re-cue/reverse-engineer-python/
No Results After Analysis
Problem: Analysis completes but no results show
Solutions:
- Check the Output panel (View > Output > RE-cue)
- Ensure your project has a recognized framework
- Verify files use standard patterns for the framework
Slow Analysis
Problem: Analysis takes too long
Solutions:
- Enable caching:
"recue.enableCache": true - Enable parallel processing:
"recue.enableParallelProcessing": true - For very large projects, use command-line RE-cue with
--incremental
Features Not Working
Problem: Hover, CodeLens, or links not appearing
Solutions:
- Verify features are enabled in settings
- Run an analysis first (features require analysis results)
- Reload VS Code window
Development
Build from Source
cd vscode-extension
npm install
npm run compile
Watch Mode
npm run watch
Run Tests
npm run test
Package Extension
npm run package
Publish Extension
npm run publish
Architecture
vscode-extension/
├── src/
│ ├── extension.ts # Entry point
│ ├── analysisManager.ts # Core analysis logic
│ └── providers/
│ ├── resultsTreeProvider.ts # Results view
│ ├── useCasesTreeProvider.ts # Use cases view
│ ├── actorsTreeProvider.ts # Actors view
│ ├── boundariesTreeProvider.ts # Boundaries view
│ ├── endpointsTreeProvider.ts # Endpoints view
│ ├── hoverProvider.ts # Hover documentation
│ ├── codeLensProvider.ts # CodeLens references
│ └── documentLinkProvider.ts # Navigation links
├── resources/
│ └── icon.svg # Extension icon
├── package.json # Extension manifest
├── tsconfig.json # TypeScript config
└── README.md # Documentation
Related Documentation
Feedback
Report issues or request features on GitHub Issues.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.