Editor "magic" URL flags?

With reference to @peli’s post here, with @mmoskal’s reply immediately below, I am really interested in mapping what URL flag options that are available for configuring the pxt-arcade/MakeCode Arcade Monaco editor, compiler targets etc.?

From searching the this forum, the GitHub code repositories and the web, I have only been able to find these URL flags/options for pxt-arcade/MakeCode Arcade:

Compiler switches:

  • ?compile=rawElf etc. (set compiler file target = rawElf)
  • ?hw=rpi etc. (set compiler hardware target = Raspberry Pi)
  • ?nolocalhub=1 (not connected to usb hardware?)
  • ?dbg=1 (some sort of debug code output?)

Editor options:

  • #pub: (for opening editor with public/github project share links)
  • /—multi (for opening two editors in split screen view)

But judging from e.g. this source file, there are plenty of more options to choose from, but I am unfortunately utterly unable to find out how they are parsed/to be included in URLs…

In the short run, I would like to make an URL link that opens a certain project link with certain compiler options directly in the Python Monaco editor instead of in the default Blockly editor.

Other ideas could a URL that opens two project links with certain other options directly in the “multi” view. The possibilities are endless.

Do you have a link to a document or source code, cheat sheet or similar, that could help us with an overview of and how to use all the different URL paths, query key/value pairs and fragments etc. available for makecode.arcade.com?


@makecode? @livcheerful? @shakao? @Richard? @hassan? Advanced MCA/pxt-arcade users/administrators?

By the way, a small correction: The ?nolocalhub query should be ?nolocalhost=1…

Here are some of the public ones off of the top of my head. Please note that all of these are subject to change at any time, I’m just listing the ones that are semi-public/useful for content creators. There are a bunch of other “private” ones that I will not mention because we don’t want people to use them.

  • /---skillmap opens the skillmap for the editor (arcade only)
  • ?saveblocks=1 makes it so that the save button next to the project name downloads the .blocks file for the current project. This is useful for looking at the XML for debugging
  • ?savetemplate=1 makes it so that the save button downloads the project as a json blob that can be included in a tutorial file as template code.
  • ?controller=1 enables controlling the editor though iframe messages. For an example of how to do this, see https://github.com/microsoft/pxt/blob/master/webapp/public/controller.html
  • ?light=1 turns on “light mode” which has some performance enhancements like fewer animations, less frequent compiles, no transparency in sprite editor, etc.
  • #editor opens the most recent project directly in the editor
  • #home opens the home page
  • #newproject creates a new project
  • #newjavascript creates a new javascript-only project
  • #tutorial:xxxx opens the given tutorial argument. There are a few ways to use this one:
    • #tutorial:py:xxxx will open as a python tutorial
    • #tutorial:js:xxxx or #tutorial:ts:xxxx will open as a javascript tutorial
    • #tutorial:blocks:xxxx will open as a blocks tutorial
    • The xxxx can be in the following format:

And for the skillmap specifically, we have:

  • ---skillmap#github:owner/repo/blob/master/skillmap.md. Note that the argument for this one is just the end of the URL you get when you open the markdown file in github

This was really elaborate and useful, @richard! -Thanks!

I also understand that there are some that you don’t want us to use.

I am therefore a bit hesitant to ask, but is there a “hash”, link, query or argument that would open the editor directly in the texteditor/Monaco mode directly - both Python(py) and JavaScript(js) - instead of the blockseditor/Blockly mode?