Mica runs on a machine you rent for an afternoon exactly as it runs on your own. The starter repository’s devkit creates a small machine in Google Cloud, installs the compiler and the examples on it, compiles one of them there to prove the machine works, and opens your editor on it. Your laptop only draws the window: everything you edit, compile and run happens on the machine. When you are done, one command parks the machine and another deletes it.

What you need

  • macOS or Linux, with git and python3; on a Mac, Apple’s command line developer tools bring both
  • Visual Studio Code, its code command on the PATH
  • a Google Cloud account with a project; the console’s first page creates one in a minute, and a new account’s trial credit covers this road many times

The cloud tool, the sign-in and the SSH key are not on the list. The one command below handles each of them, and asks before it acts.

One command

git clone https://gitlab.com/mica-dev/mica-container.git
cd mica-container
devkit/mica-devbox my-mica --profile try --region europe

my-mica is the machine’s name, try the profile of a machine for trying Mica, and europe the region; us and asia work too, and so does a country’s name, germany or japan. Everything that follows is that command at work:

  • If the cloud tool is missing, the command shows the exact install command and runs it only after you agree.

  • If you are not signed in, Google prints a URL and takes back a verification code, from any device you sign in with.

  • The plan prints before anything exists, and nothing has cost anything so far:

    cloud        Google Cloud
    machine      my-mica
    profile      try
    image        ubuntu-2604-lts-amd64
    type         e2-medium (amd64)
    zone         europe-west4-a
    project      your-project
    price        priced per machine type at cloud.google.com/products/calculator
    shutdown     20:00
    ssh from     anywhere - no password exists, only the key; --ssh-from 203.0.113.4/32 narrows it
    ssh key      from your ssh agent: ssh-ed25519 …

    Two cores and four gigabytes, the size the region sells for them. The machine shuts itself down at 20:00 every day, so a forgotten one stops billing by the evening. It answers SSH with a key and nothing else, and the key is the one your agent holds; with none anywhere, one is made for this machine, and the plan says so first.

  • create this machine? [y/N] is the moment billing starts.

Then the machine is created, which takes a couple of minutes, and it installs its toolchain, which takes a few more. The last question opens your editor on ~/source/repos/mica-container, the examples repository, on the machine.

What the machine proves before you see it

Before the editor opens, the command reads back what landed on the machine, and it compiles and runs the Hello example there:

   done  the machine is ready
    mica       7.6.0
    gcc        15.2.0
    sources    mica-container
    hello      Hello — the shape of a Mica program

The hello row is not a promise. It is the first line the Hello example printed, compiled and run on the machine a moment before.

Your first program there

The editor’s terminal is the machine’s terminal:

cd ~/source/repos/mica-container/examples/Hello
mica Hello.mica
Hello — the shape of a Mica program

The greeting
  text:  Hello, Mica!
  runes: 12

The answer
  6 * 7 = 42

The examples directory holds a program for each part of the tutorial series. Each opens with a header that says what it teaches, the directory’s README lists them in learning order, and every one of them runs the same way.

End the day

devkit/mica-devbox my-mica --stop     # park it: the disk stays, the machine stops billing
devkit/mica-devbox my-mica            # the next day: wake it and open the editor again
devkit/mica-devbox my-mica --down     # or delete it and everything it owns

A parked machine keeps only its disk, a few euros a month. A deleted one costs nothing. The daily shutdown at 20:00 stands behind both.

Next

Get started with Mica takes a first program into the debugger: breakpoints, variables, stepping. It works on this machine as it works in the dev container.