Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>ReCodeXNew to Visual Studio Code? Get it now.
ReCodeX

ReCodeX

ReCodeX

|
2 installs
| (0) | Free
Turn research papers into executable code — and verify it actually works.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ReCodeX

Turn research papers into executable code — and verify it actually works.

ReCodeX is a VS Code extension that transforms academic research papers (PDFs) into runnable code implementations. Simply upload a paper, provide optional instructions, and ReCodeX will analyze it and generate the corresponding source code files directly in your workspace.

Features

  • PDF Upload: Select and upload research papers directly from VS Code
  • Upload from URL: Paste an arXiv or direct PDF link to download and process
  • Custom Instructions: Provide implementation guidance (e.g., "Implement in Python with type hints")
  • Automatic Code Generation: Converts paper algorithms and methods into executable code
  • Multiple Output Files: Generates complete project structure with source files, README, and dependencies
  • Real-time Progress Tracking: Rotating status messages show what's happening during processing
  • Cancel Anytime: Stop long-running operations with the cancel button
  • Backend Health Monitoring: Live connectivity status indicator
  • Secure File Handling: Path validation and sanitization for safe file operations

Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions (Cmd+Shift+X / Ctrl+Shift+X)
  3. Search for "ReCodeX"
  4. Click Install

From Source

  1. Clone the repository:

    git clone https://github.com/Re-Code-X/recodex-extension.git
    cd recodex-extension
    
  2. Install dependencies:

    npm install
    
  3. Compile the extension:

    npm run compile
    
  4. Press F5 in VS Code to launch the Extension Development Host.

Requirements

  • VS Code: Version 1.107.0 or higher
  • Backend Service: A running ReCodeX backend server

Quick Start

  1. Click the ReCodeX icon (beaker) in the Activity Bar
  2. Click "Upload Research Paper" or "Upload from URL"
  3. Enter optional implementation instructions when prompted
  4. Wait for processing (watch the rotating progress messages!)
  5. Find your generated code in a new project folder

Uploading PDF Files

Method 1: Local File Upload

  1. Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
  2. Type "ReCodeX: Upload Research Paper"
  3. Select your PDF file
  4. Enter implementation instructions (optional)
  5. Wait for code generation

Method 2: Upload from URL

  1. Open the Command Palette
  2. Type "ReCodeX: Upload from URL"
  3. Paste the PDF URL (e.g., https://arxiv.org/pdf/1706.03762.pdf)
  4. Enter implementation instructions (optional)
  5. Wait for code generation

Method 3: Using the Sidebar

  1. Click the ReCodeX icon in the Activity Bar
  2. Click "Upload Research Paper" or "Upload from URL"
  3. Follow the prompts

Custom Implementation Instructions

After selecting a file or URL, you'll be prompted to enter custom instructions:

Enter implementation instructions (optional)
e.g., Implement the main algorithm in Python with type hints

Examples:

  • "Implement in PyTorch with GPU support"
  • "Use TensorFlow 2.x with Keras API"
  • "Focus on the attention mechanism from Section 3"
  • "Include unit tests for all functions"

Press Enter with empty input to use default behavior, or Escape to cancel.

Cancelling Operations

Long-running operations can be cancelled:

  • Click the Cancel button in the sidebar
  • Or click the X on the VS Code notification

PDF Requirements

Requirement Details
File Format PDF only (.pdf extension)
File Count One file at a time
File Size Supported up to 10-minute processing time
Content Research papers, academic articles, technical documents

Progress Messages

During processing, you'll see rotating status messages that reflect actual backend steps:

  • "Parsing research paper..."
  • "Analyzing document structure..."
  • "Identifying key algorithms..."
  • "Designing project architecture..."
  • "Generating file structure..."
  • "Writing core implementation..."
  • And more...

Generated Output

Each PDF generates a complete project directory:

your-workspace/
├── .recodex/
│   └── uploads/                    # Original PDFs saved here
│       └── 2025-01-15T10-30-00_paper.pdf
│
└── paper_name/                     # Generated implementation
    ├── src/
    │   ├── model.py
    │   ├── trainer.py
    │   └── utils.py
    ├── tests/
    │   └── test_model.py
    ├── requirements.txt
    └── README.md                   # Auto-generated with summary & quick start

The auto-generated README includes:

  • Summary: Overview of the implementation
  • Project Structure: ASCII tree of all files
  • Quick Start: Instructions to run the code

Troubleshooting

Issue Cause Solution
"Backend unavailable" Backend server not running Start the backend server and verify connectivity
"Open a workspace folder" No folder open in VS Code Click "Open Folder" when prompted
Upload times out Very large/complex paper Try a simpler paper; processing can take up to 10 minutes
No files generated Backend processing error Check the ReCodeX output log for details
Operation cancelled User or network interruption Try again; check network connection

Viewing Logs

  1. Click "View Logs" in the ReCodeX sidebar, or
  2. Open Output panel (View → Output) and select "ReCodeX"

Backend API

ReCodeX communicates with a backend service that processes PDFs.

Endpoints

Endpoint Method Description
/ GET Health check
/implement POST Upload PDF, receive generated implementation

Request Format

POST /implement
Content-Type: multipart/form-data

Form Fields:
  - file: PDF binary data (required)
  - query: Custom implementation instructions (optional)
  - top_k_retrieve: Number of chunks to retrieve (optional)
  - top_k_rerank: Number of chunks after reranking (optional)

Response Format

{
  "success": true,
  "filename": "paper.pdf",
  "chunks_count": 142,
  "project_structure": "project/\n├── src/\n│   └── model.py\n└── README.md",
  "summary": "Implementation of the Transformer architecture...",
  "quick_start": "1. Install: pip install -r requirements.txt\n2. Run: python src/main.py",
  "files": [
    {
      "filename": "src/model.py",
      "content": "import torch\n..."
    },
    {
      "filename": "requirements.txt",
      "content": "torch>=2.0.0\n..."
    }
  ],
  "error": null
}

Development

Project Structure

recodex-extension/
├── src/
│   ├── api/
│   │   ├── backendClient.ts     # HTTP client with abort support
│   │   └── types.ts             # TypeScript interfaces
│   ├── commands/
│   │   ├── uploadPaper.ts       # Local file upload handler
│   │   └── uploadFromUrl.ts     # URL upload handler
│   ├── ui/
│   │   └── sidebarProvider.ts   # Webview sidebar with cancel button
│   ├── utils/
│   │   ├── logger.ts            # Output channel logging
│   │   ├── paths.ts             # Path validation utilities
│   │   ├── pdf.ts               # PDF file utilities
│   │   └── progressMessages.ts  # Rotating progress messages
│   ├── workspace/
│   │   ├── fileWriter.ts        # Safe file writing
│   │   └── projectLayout.ts     # Project directory setup
│   └── extension.ts             # Extension entry point
└── package.json

Available Scripts

Script Description
npm run compile Compile and bundle for development
npm run package Build production bundle
npm run watch Watch mode for development
npm run lint Run ESLint
npm run check-types TypeScript type checking
npm test Run extension tests

Security

  • Path Traversal Prevention: Rejects paths containing .. or absolute paths
  • Filename Sanitization: Removes dangerous characters
  • Workspace Boundary Enforcement: All files written within workspace only
  • Content Security Policy: Webview restricted to extension resources
  • Input Validation: All API responses validated before processing
  • Request Cancellation: AbortController support for clean request termination

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE.md file for details.


Support

  • Issues: GitHub Issues
  • Repository: GitHub
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft