Skip to content

Cursor Extension

Document code directly from Cursor IDE with the BlockForge extension.

Overview

The BlockForge Cursor extension allows you to:

  • Document code directly from Cursor
  • Link GitHub repositories
  • Sync GitHub issues to BlockForge pages
  • Document pull requests
  • Generate project dashboards

Installation

Prerequisites

  • Cursor installed (or VS Code 1.80.0+)
  • Node.js 18+ installed
  • BlockForge account and workspace

Step 1: Navigate to Extension Folder

The extension is in the BlockForge project:

cursor-blockforge-extension/

Step 2: Install Dependencies

bash
cd cursor-blockforge-extension
npm install
npm run compile

Step 3: Launch Extension

For Development:

  • Press F5 in Cursor
  • A new window opens with the extension loaded

For Production:

bash
npm run package

Then install the .vsix file via Command Palette → "Extensions: Install from VSIX..."

Configuration

Get Workspace ID

  1. Open BlockForge in browser
  2. Open browser console (F12)
  3. Run: localStorage.getItem("active-workspace-id")
  4. Copy the workspace ID

Configure Settings

  1. Open Cursor Settings (Cmd+,)
  2. Search for "BlockForge"
  3. Set these values:
    • BlockForge: Workspace Id - Your workspace ID
    • BlockForge: Api Url - API endpoint (default configured)
    • BlockForge: Supabase Anon Key - Anon key (default configured)

Or edit settings JSON:

json
{
  "blockforge.workspaceId": "your-workspace-id",
  "blockforge.apiUrl": "https://your-project.supabase.co/functions/v1/cursor-api",
  "blockforge.autoSync": false
}

Features

Document Code

  1. Select code in editor
  2. Right-click → "BlockForge: Document Selected Code"
  3. Or use Command Palette → "BlockForge: Document Selected Code"
  4. Code is sent to BlockForge as documentation
  1. Open folder with GitHub repo
  2. Command Palette → "BlockForge: Link GitHub Repository"
  3. Extension detects repo from git remote
  4. Repository is linked to your workspace

Sync GitHub Issues

  1. Ensure repo is linked
  2. Command Palette → "BlockForge: Sync GitHub Issues"
  3. Choose: Open, Closed, or All Issues
  4. Issues sync as pages in BlockForge

Document Pull Request

  1. Ensure repo is linked
  2. Command Palette → "BlockForge: Document Pull Request"
  3. Enter PR number
  4. PR documentation is created in BlockForge

Generate Project Dashboard

  1. Ensure repo is linked
  2. Command Palette → "BlockForge: Generate Project Dashboard"
  3. Dashboard page is created with:
    • Repository information
    • Recent issues
    • Recent pull requests
    • Project overview

Usage Tips

  1. Auto-sync: Enable auto-sync to automatically sync code changes
  2. Workspace selection: Use the correct workspace ID for organization
  3. Batch operations: Sync multiple issues or PRs at once
  4. Link before sync: Always link repository before syncing issues/PRs

Troubleshooting

Extension Not Appearing

  • Verify compilation succeeded (npm run compile)
  • Check extension is loaded in Extension Development Host
  • Restart Cursor if needed

Configuration Errors

  • Verify workspace ID is correct
  • Check API URL is accessible
  • Ensure Supabase anon key is valid

GitHub Integration Issues

  • Verify git remote is configured
  • Check GitHub authentication
  • Ensure repository is accessible

Next Steps

Built with ❤️ for BlockForge