Skip to content

Open source · Apache-2.0

@mihari/cloudmap Cloud topology, Apache-2.0.

The engine underneath Mihari’s Infrastructure section, released on its own under Apache 2.0: a vendor-neutral model of cloud topology, importers, layout, renderers, a signed wire protocol, and a command line that does all of it on your laptop with no account and no credential.

  • Apache-2.0
  • 4 packages
  • Node >= 22.13
  • No account required

cloudmap-cli

# On your laptop. No account, no credential.

cloudmap import tf

# state or plan JSON → snapshot

cloudmap validate

# against cloudmap.snapshot/v1

cloudmap diff

# added, removed, changed

cloudmap render

# SVG, PNG, JSON, draw.io, D2, Mermaid

cloudmap serve

# a viewer on 127.0.0.1 only

# The only verbs that talk to a server: a URL you supply.

cloudmap push

cloudmap agent

Not published to npm yet

The @mihari npm scope is not secured, and nothing is published until it is. The packages, their version numbers and the command line below all exist and are tested — what does not exist yet is an npm install that resolves. If you want the source before the first release, get in touch.

What is supported

A vendor-neutral model of cloud topology. Importers, layout, renderers and a signed wire protocol.

  • The model

    Resources, relationships, snapshots, deterministic ids, containment, diffs, entity linking, scrubbing of sensitive attributes, and a filter grammar.

  • Importers

    Terraform and OpenTofu state and plan JSON.

  • Discovery

    Kubernetes and AWS, each in its own optional package, each using the ambient credentials of the process you run.

  • Layout and rendering

    Stable positions across scans, SVG, PNG, JSON, draw.io, D2 and Mermaid, plus a framework-agnostic pan/zoom viewer.

  • The wire protocol

    Ed25519-signed envelopes, chunking and sequence rules, published as a schema and a document.

  • Drawings

    Blueprint and annotation documents, authored and operated entirely from the command line.

Four packages

One engine, two optional providers, one command line.

They are a fixed release group: every package carries the same version number, and a bump does not imply a change in every package. All four require Node 22.13 or later — WebCrypto Ed25519 is only stable from that release, and the wire protocol is built on it.

  • @mihari/cloudmapdual CJS / ESM

    The engine: the resource, relationship and snapshot model with deterministic ids; Terraform and OpenTofu importers; the filter grammar; layout; SVG, PNG, JSON, draw.io, D2 and Mermaid renderers; a browser pan/zoom viewer; the signed wire protocol; and icon resolution.

  • @mihari/cloudmap-cliESM

    The command line and the agent runtime. Imports, validates, diffs, lays out, renders, serves a local viewer, authors and folds drawings, generates keys, prints least-privilege policies and pushes signed snapshots.

  • @mihari/cloudmap-k8sESM

    Kubernetes discovery, loaded on demand by the CLI. Uses the ambient kubeconfig or in-cluster service account of the process it runs in; no credential is ever passed to it.

  • @mihari/cloudmap-awsESM

    AWS discovery, loaded on demand by the CLI. Uses the ambient AWS credential chain of the process it runs in, and runs a start-up self-check before the first inventory call.

Without an account

The command line is not a client. It is the product.

Nothing below needs a Mihari account, a login or a network connection. Point it at a Terraform plan and you get a diagram; point it at a cluster you can already reach and you get a snapshot. The push and agent verbs are the only ones that talk to a server, and the server they talk to is a URL you supply.

import tf
Read a Terraform or OpenTofu state file, a terraform show -json state, or a plan JSON, and write a declared snapshot — or render it to SVG or PNG in one step. No credential and no network call.
validate
Check a document against the cloudmap.snapshot/v1 schema and print the failing paths.
diff
Compare two snapshots: added, removed and changed resources with a per-resource delta, plus relationship changes. Text, Markdown or JSON.
layout
Lay a snapshot out and write a cloudmap.scene/v1 scene graph, with the filter and grouping you asked for.
render
Render a snapshot or a scene to SVG, PNG, JSON, draw.io, D2 or Mermaid.
serve
Serve an interactive viewer on 127.0.0.1 only — pan, zoom, hover, search-and-dim, and regrouping handled by the same process. Every response carries a strict Content-Security-Policy; nothing is fetched off the machine.
blueprint
Create, seed from an observation, validate, render and diff a cloudmap.blueprint/v1 document — a design a human authored, with its own geometry. Local files only.
manual
Fold an append-only annotation log onto an observed snapshot and print the composed view, or explain one operation: what it asserts, which slot it owns and whether it still applies.
discover k8s | aws
One discovery pass through the matching optional provider package. Exits non-zero whenever a coverage row is not clean, so a partial read never passes for a complete one.
agent
Keep discovering and pushing on the interval the server returns. An estate whose content hash has not moved sends a heartbeat instead of a snapshot.
push
Send a snapshot to an ingest URL you supply: a signed hello, then gzipped, signed chunks. The snapshot is scrubbed again here, so a hand-edited file cannot carry a secret onto the wire.
keygen
Generate an Ed25519 agent key pair and print its fingerprint, or rotate a key a server has already pinned.
policy aws | k8s
Print the least-privilege read policy the engine ships as data, as JSON, Terraform or YAML. Works with no provider package installed.
icons
Fetch, list and attribute vendor icon sets on your own machine, under that vendor’s terms.
doctor
Report the Node version, the optional binaries and the optional packages. Never fails for a missing optional.

Blueprints & annotations

A map is an observation. A blueprint is an assertion.

Every box on a map was computed from what an agent saw. Two document formats let a human say something instead: a blueprint, a design with its own geometry and no estate underneath it, and a manual op log, annotations folded onto an estate that already exists.

Both formats are open and both are fully operable from the Apache-2.0 command line: create, seed from an observation, validate, render, diff, fold and explain. The boundary between them is one-way and deliberate — folding annotations onto a snapshot prints a view, never a snapshot, so a drawn label can never end up inside a content hash, a signature or a change history.

Where the line is

The engine owns the format. Mihari sells the canvas.

We would rather say this plainly than let you find it out. The drag-and-drop designer that produces a blueprint, and the hosted map it sits next to, are the paid half of the product. The documents those tools write are open, and every operation that makes them meaningful — validation, rendering, diffing, folding — lives in the open-source command line.

Three JSON Schemas ship with the source and are the actual contract. Write your own tooling against them; nothing in the engine depends on Mihari.

JSON Schemas

  • cloudmap.snapshot/v1
  • cloudmap.blueprint/v1
  • cloudmap.protocol/v1

Vendor icons

No vendor artwork ships in the tarball.

The official AWS, Azure and Google Cloud architecture icon sets are not open source — the artwork is under each vendor’s own terms. So the Apache-2.0 packages carry none of it, and a test in the repository keeps it that way. The engine draws with its own neutral shapes out of the box.

cloudmap icons fetch

brings a set onto your machine, by your decision:

  • It refuses without --accept-terms, and the refusal names the terms and the page they are published on.
  • Every byte is checked against a sha256 digest before anything is written; a mismatch aborts, naming the file and both digests.
  • This build pins no download location for any set, so you supply the archive and the digest you verified yourself.
  • Nothing lands inside the package — the archive goes to an icon cache in your own home directory.
  • A separate attribution command prints who owns what, for your own notice file.

What is not

What it does not do, said before you find out.

  • No service-level agreement: this is a single-maintainer open-source project, and reviews are best effort.
  • No Azure or Google Cloud discovery. Their Terraform state still imports, with a generic resource kind.
  • No Terraform (HCL) parsing or export — the importers read machine-readable state and plan JSON only.
  • No cost estimation. The model reserves a place for it; nothing computes a price today.
  • No graphical editor in the open-source packages. The documents are open; the canvas is the hosted product.
  • No vendor icons in the distribution, and no download location pinned for them yet.

Mihari Cloudmap is not affiliated with, endorsed by, or connected to Amazon Web Services, and it is unrelated to the AWS service named Cloud Map.

Keep the engine. Pay for the canvas, or don’t.

The hosted Infrastructure section adds the map, the history, the overlays and the approval flow. The format it speaks is the one above, and it is yours either way.