azuresim authoring skill

azuresim is a standalone native local Azure Storage emulator on 127.0.0.1:4577 built on Floci-AZ 0.15.0 with a real-Azure semantics and authentication overlay.

Purpose

Use azuresim to run Azure Blob Storage and Azure Queue Storage locally in one native process without Docker, Java, or an Azure subscription, and to test SharedKey HMAC-SHA256 signatures, Bearer tokens, and storage access policies with lmazure.

When to use it

Choose azuresim when testing LMScript programs, lmazure workflows, or Azure SDK applications against local Blob and Queue HTTP wire endpoints on 127.0.0.1:4577 in open mode or --auth enforce mode.

Install

Download the prebuilt azuresim release executable and verify its SHA256SUMS digest, or build the native binary from the pinned source lock using GraalVM 25.

python3 scripts/build.py --native
./target/azuresim --version

Commands

Run azuresim in the foreground with in-memory or durable storage, or enable authentication and permission enforcement.

azuresim --version
azuresim --help
azuresim serve
azuresim start --port 4577 --data-dir ./data
azuresim serve --auth enforce --auth-config auth.json

Inputs and outputs

Blob requests target http://127.0.0.1:4577/devstoreaccount1/<container>/<blob> and Queue requests target http://127.0.0.1:4577/devstoreaccount1-queue/<queue>/messages. Service responses retain official Azure Storage XML and header wire formats. CLI usage and startup errors emit a JSON envelope {"ok":false,"error":"..."} on stdout, while server logs go to stderr.

Safety rules

azuresim binds exclusively to IPv4 loopback (127.0.0.1), disables TLS, and disables Event Hubs and Service Bus boot sidecars so an idle Blob and Queue session never launches Docker containers or binds extra ports. Other upstream services remain present and may require Docker when explicitly used. Always use the standard Azurite/azuresim development account (devstoreaccount1) or dummy tokens in --auth-config files; never place live Azure Storage keys in repository files. Wait for the first successful HTTP probe before sending workload requests.

Worked examples

Example 1: Direct curl round-trip for Azure Blob and Queue Storage against a running azuresim server.

curl -f -X PUT "http://127.0.0.1:4577/devstoreaccount1/demo?restype=container"
curl -f -X PUT -H "x-ms-blob-type: BlockBlob" --data-binary "hello Azure" http://127.0.0.1:4577/devstoreaccount1/demo/hello.txt
curl -f http://127.0.0.1:4577/devstoreaccount1/demo/hello.txt
curl -f -X PUT http://127.0.0.1:4577/devstoreaccount1-queue/demo
curl -f -X POST -H "Content-Type: application/xml" --data "<QueueMessage><MessageText>hello</MessageText></QueueMessage>" http://127.0.0.1:4577/devstoreaccount1-queue/demo/messages

Example 2: Driving azuresim from LMScript via lmazure and standard lmcode_std_v3 REST/CLI handlers.

p = _lmcode_ cli="lmazure" install="github:lmctl-ai/lmazure@latest";
  @"/storage/:container/:key"
  fn read_blob(x: RestExchange) -> void implements RestGet {
    x.send(cloud.object_get(x.param("container"), x.param("key")));
  }

  @"seed-azure"
  fn cmd_seed(x: RestExchange) -> void implements CliCommand {
    cloud.set_endpoint("all", "http://127.0.0.1:4577");
    cloud.bucket_create("sim-container");
    cloud.object_put("sim-container", "note.txt", x.body());
    x.send("seeded");
  }

  rest_config("prefix", "/v1");
  let s = rest_cli(str_split("seed-azure -- azuresim-payload", " "));
  let g = rest_cli(str_split("/v1/storage/sim-container/note.txt", " "));
  print(s + ":" + g);
end _lmcode_

Errors and exit codes

Invalid CLI arguments or invalid auth configuration exit with code 2 and a JSON error envelope. Emulator startup failures (such as an occupied port) exit with code 3 and the same JSON envelope. Normal completion, --version, and --help exit with code 0. Missing container or queue deletions return HTTP 404 ContainerNotFound or QueueNotFound matching real Azure semantics.

How to verify

Run the CLI, storage, auth, and pinned lmazure client verification scripts against the built executable.

python3 scripts/test-cli.py target/azuresim
python3 scripts/test-storage.py target/azuresim
python3 scripts/test-auth.py target/azuresim
python3 scripts/fetch-client.py
python3 scripts/test-lmazure.py target/azuresim target/lmazure