Running BlockAssist with Cursor

This guide shows non-technical users how to set up and run BlockAssist on macOS using Cursor, an AI-powered code editor with an integrated chat assistant.

Step 1: Installing Cursor

Go to the Cursor website and click Download.

Step 2: Setting up your workspace

  • Open the Cursor app and, on the welcome screen, click on "Clone repo”

  • Select "GitHub” from the dropdown on top, and paste: https://github.com/gensyn-ai/blockassist/

  • Pick a local folder where the code will be downloaded

  • Once the download finishes, Cursor will open your blockassist local folder.

Step 3: Installing dependencies

Note: You only need to do this once. To record additional episodes, skip to Running BlockAssist.

  • You should be able to see the "Chat” panel of Cursor on the right side of the screen. If you don't see it, press Cmd+L.

  • In the chat window, enter the following prompt:

    help me install the right dependencies for Mac according to README.md
  • Cursor will now guide you through the installation steps of various dependencies needed to run BlockAssist. At the end, you should see a message saying the installation is complete.

  • Now, we need to give Cursor permission to minimize the Minecraft AI assistant window while you play the game. To do this, go to System Settings > Privacy & Security > Accessibility and set the toggle next to Cursor to ON.

Step 4: Running BlockAssist

  • Make sure you see the Terminal panel at the bottom of Cursor. If you don't see it, press Cmd+J.

  • In the terminal, type:

    pyenv exec python run.py
  • Once prompted, enter your Hugging Face user access token. This is required so your trained model gets uploaded and your contribution shows up the BlockAssist leaderboard.

    • To get a Hugging Face account and access token, follow these steps. Make sure you get an access token with WRITE access.

  • You'll now be asked to sign up or log in so your contributions are tracked on-chain, in the Gensyn Testnet. Follow the instructions in the browser to create an account or to log in to your existing account.

    • If you don't see a log in screen, try typing http://localhost:3000 on your browser.

    • Once you logged in, go back to the Terminal in Cursor.

  • Next, you'll see two Minecraft windows pop up. Wait until you see both, and then return to the Terminal in Cursor and press ENTER.

    • Don't do anything in the Minecraft windows just yet!

  • You should now see the message STARTING EPISODE in Terminal, and after a few moments you should see the mission loading up in the Minecraft window.

    • Click on the Minecraft window, press ENTER and start playing. Your actions in the game will be recorded and then used to train your assistant.

    • The goal of the mission is to build the structure you see in front of you, use your mouse's left click to break blocks, and right click to place blocks.

    • Select an axe to break things, or various blocks, by pressing the number keys 1-9.

    • Use the keys W A S D to move around.

  • Once you've finished playing, press ESC, then go back to the terminal window in Cursor and press ENTER until you see the message Stopping episode recording.

    • You may need to press ENTER multiple times until you see the message above.

  • Now your assistant will be trained using the data you recorded. This all happens locally, on your device, and it may take several minutes to complete depending on your hardware. Please leave the Cursor window open until you see the message Training complete.

  • Once training has completed, you should see some stats in the Terminal window and recommendations on what to do next. That's it, you did it! Your contribution should be reflected on the BlockAssist Leaderboard (it may take a few minutes for it to show up). Just log in with the same account you used above, and you should be able to see your stats at the top of the page.

Troubleshooting

If you see any errors while trying to install or run BlockAssist, Cursor may be able to help you fix the issue and get unblocked.

If you see an error in Terminal

  • To help you understand and fix an error you see in Terminal, go to the Chat panel on the right and enter the following prompt:

    Help me fix this error
    • Make sure that Cursor AI can see the error, by clicking on Add Context in the chat box and then selecting Terminal(s)

    • Alternatively, you can also copy and paste the error you see to the chat next to the prompt above.

If you don't see an error in Terminal but BlockAssist isn't working as expected:

  • You can ask Cursor to look at your log files by entering the following prompt in the Chat panel:

    Look at my logs folder and see if there are any errors preventing BlockAssist from running as expected
  • You can then follow the recommendations from Cursor to help you fix any issues and get unblocked.

Last updated