Shell

A machine of your own: run commands, keep files, build things

Open Shell →

Calling it

This is your own data, so a call has to say who you are. Make a token at /token and send it as a header.

curl -H "Authorization: Bearer $MU_TOKEN" \
  https://micro.mu/api/v1/shell/list

The same method over MCP, which is what an agent speaks: shell_list. The answer is identical.

How every call behaves →

Methods

GET /api/v1/shell/list

List a directory on your machine

Needs an account.

ArgumentTypeDescription
dirstringThe directory to list, under /work. Defaults to /work
curl \
  -H "Authorization: Bearer $MU_TOKEN" \
  "https://micro.mu/api/v1/shell/list"
GET /api/v1/shell/read

Read a file from your machine

Needs an account.

ArgumentTypeDescription
path *stringThe file to read, under /work
curl \
  -H "Authorization: Bearer $MU_TOKEN" \
  "https://micro.mu/api/v1/shell/read?path=path"
2 creditsPOST /api/v1/shell/run

Run a shell command on your own machine and get back what it wrote. A real shell in a container: pipes, redirection and && all work, the working directory is /work and files there persist between calls. Use it to build, test, run scripts and move files about. A non-zero exit code comes back in the response rather than as an error, so read the output — a failing build is an answer

Needs an account. Changes something, so POST only. Draws 2 credits per call, or accepts payment.

ArgumentTypeDescription
command *stringA shell command to run, e.g. 'go test ./... 2>&1 | tail -40'
dirstringDirectory to run it in, under /work. Defaults to /work
timeoutnumberSeconds to allow, up to the instance's maximum. Defaults to 120
curl -X POST \
  -H "Authorization: Bearer $MU_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"command":"command"}' \
  https://micro.mu/api/v1/shell/run
Costs 2 credits
POST /api/v1/shell/write

Put a file on your machine, creating any missing directories. Use this rather than shell redirection for anything with quotes or backticks in it, which is most source code

Needs an account. Changes something, so POST only.

ArgumentTypeDescription
path *stringWhere to put it, under /work. Missing directories are created
content *stringThe whole file. This replaces what was there
curl -X POST \
  -H "Authorization: Bearer $MU_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"content","path":"path"}' \
  https://micro.mu/api/v1/shell/write

The same methods are tools over MCP, and every service on this instance is in one reference. Same method, same answer, same price.