goat

goat

One command-line tool to operate a goatnet: its health, who is on it, and its data.

goat answers the questions an operator asks about a running goatnet. Is it healthy? Is data flowing? Who is on it, and what may they do? Why is this connection blocked? It is one file per platform, it runs with your own certificate, and it starts in a sandbox that needs no credentials and no network.

Star on GitHubTry itEvery verb

OS="$(uname -s | tr '[:upper:]' '[:lower:]')"; ARCH="$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/')"
base=https://github.com/usareur-af/goatcore/releases/download/goat-cli-v0.5.20
curl -fsSL -o goat "$base/goat-$OS-$ARCH" && chmod +x goat
./goat hello
$ goat hello◇ SANDBOX — simulated fabric, no real mesh. Run `goat init` to attach a real env.goat hello — saying `lo` to the fabric as `default` on topic `hello/default`  [t+  42ms] portal     accepted topic `hello/default` (simulated)  [t+  73ms] fabric     routed `lo` to `hello/default` over the WireGuard P2P path (simulated)  [t+ 100ms] subscriber your subscriber received `lo` — round-trip complete (simulated)  └─ `lo`: the first message ever sent over a network (ARPANET, 29 Oct 1969) — they typed "LOGIN" and the link crashed after two letters.round-trip complete.next: `goat tutor` to learn the fabric · `goat sub <key>` to watch live traffic.
Real output of goat 0.5.20, the release binary, on a laptop with no profile and no network. hello runs in the built-in sandbox. why-blocked reads the example goatnet zagros from a goatcore checkout, and the line … marks where its output is cut. The output scrolls sideways.

What it is

One operator binary over the whole fabric.

It starts in a sandbox

goat hello and goat tutor run against a simulated fabric inside the binary. Every simulated line is marked ◇ SANDBOX. The tutor has 11 lessons, saves your place, and ends where a real goatnet begins.

It reads; it does not guess

Health that cannot be measured reads unknown or unmetered, never green. Each row names the observer that produced it. An empty check fails instead of passing.

It is safe to script

The reading verbs take --json; top and who take --once for one plain frame. The interactive screens need a terminal and refuse a pipe. Exit codes are fixed: 3 profile, 4 portal refused or unreachable, 5 off the mesh, 6 certificate.

goat and goatbuilder come with every goatnet. goatbuilder builds the machines and deploys the services. goat operates what goatbuilder built: it reads the goatnet, changes who is on it, and moves data on it.

Health

It says unmetered when it cannot see.

goat top is one screen for the whole goatnet: a line of health per domain, the load per fabric class, and the producers ranked by rate, refreshed as beats arrive. It only reads what the goatnet already publishes. A domain with no beat reads UNMETERED n=0; a stale beat shows its age and hides its bars.

$ goat top --onceENV  MESH UNMETERED n=0   ·   FABRIC GREEN n=200   ·   TIME UNMETERED n=0   ·   PRESENCE UNMETERED n=0   ·   PEER UNMETERED n=0​FABRIC CLASS LOAD  C2  situational     40 /    100 msgs/s     40%  GREEN​PRODUCERS (1 active · sort msgs/s)  #   PEER                      MSG/S        B/S  SUBS BAND  SHARES                PATH                  LATENCY  1   maintainer-operator          40       1000     — —     C2 100%               —                           —​TOTALS  peers 1  40 msgs/s  1000 B/s  links 0 direct / 0 relayed  presence 0 alive / 0 dropped

Printed by the renderer behind goat top --once (render_plain in crates/goat-cli/src/tui/top.rs) from the synthetic zagros state of its unit test, plain_snapshot_renders_panes_with_honesty, goat 0.5.20 source: a fabric beat with one class and one producer, and no mesh, time, presence or peer beat. The output scrolls sideways.

goat health --domain <d> reads one domain in depth, and --watch keeps reading. The domains:

fabricFabric load per class against capacity. The default.
meshWireGuard mesh-link health from the site's vantage host.
presenceWho is alive on the fabric and who dropped.
timePer-host clock health from the signed time attestation.
netEach node's connections, classified against its egress contract.
cryptoThe key-exchange group probed live, and the router's FIPS self-attestation.
consistencyWhich generation of the goatnet's intent each node converged against.
peerFaults on peers you do not own, measured at your router.

goat status asks whether you are connected: the router port, a real mTLS session to the router, the portal, and your certificate's expiry, one line per check. Trust the session line over the port line; a stuck router still accepts a TCP connection.

goat flow asks whether data is flowing and when it last did, per topic. It keeps three answers apart: no observer could answer; an observer looked back over a stated horizon and found nothing; data is flowing. It never claims a topic has never published.

Who

One roster across the identity layers.

goat who lists every identity on the goatnet, declared and live, and shows for each one what it may do and what it is doing. Select a row and the detail pane rolls the layers into one view: identity, mesh, data and release. A read grant says an identity may read; a live subscription says it is reading. goat keeps the two apart.

NetBird meshenrolled, connected nowOrypeople and their sign-inZenoh ACLwrite and read grantsSPIRE / SPIFFEworkload identity, designedgoat whoone row per identity, declared and liveNAME LIVE MSG/S BAND W/R STATESelect a row: identity, mesh, dataand release in one detail pane.May read and is reading are shownapart; nothing absent is faked.

Solid: the layers goat who joins today. Dashed: SPIRE and SPIFFE workload identity, designed as the fourth layer. The figure scrolls sideways.

STATEMeaning
onlineA matched mesh peer is connected now.
on-meshEnrolled on the mesh, not connected now.
cut-offRevoked or disabled.
no-grantsOnboarded with no write or read grant. Its requests are refused without a reply.
strayLive on the goatnet with no registry record.
activeHolds grants, with no richer signal.
·No summary yet. Nothing is guessed.

For a stray or a cut-off identity the detail pane prints the goat admin command that would act on it. goat who itself changes nothing.

Access

Ask why a connection is blocked before you touch the network.

The fabric refuses a denied request without telling the party it refused, so a denial looks like a broken link. goat answers access questions from the declaration in git, with no network and no credentials. When the gap is real, goat warrant why-blocked names the smallest port-set that closes it and prints the change to propose.

$ goat warrant why-blocked --declaration ops/ansible --scope zagros --from DEVELOPER --to INFRA --port 22warrant why-blocked: reading the ACL declaration from --declaration ops/ansibleZAGROS-DEVELOPER -> ZAGROS-INFRA  tcp/22  [scope: zagros]​BLOCKED by the declared ACL — no rule grants this pair that port.​What DOES exist between the pair:  - all → infra (web/dns/fabric tcp)  (tcp 443, 53, 5353, 7447)  - all → infra (dns/fabric udp)  (udp 53, 5353, 7448)  - all → infra (icmp)  (icmp any port)​The minimal port-set that closes it: shell  tcp 22  owner: platform-admin  Interactive login — tcp/22, and nothing else. Break-glass access and network administration. The name is `shell` rather than anything about what the session is for: this is the mechanism, and the reference vocabulary ships publicly (docs/project/warrant-plan.md §3A).​The diff to put in a PR — ops/warrant/rule-intents/netbird-acl.yaml:​      - name: "developer → infra (shell)"        description: "<why this pair needs this set — one sentence a reviewer can check>"        sources: [DEVELOPER]        destinations: [INFRA]        protocol: tcp        port_set: shell        action: accept        bidirectional: false​Then: ops/warrant/generate.py && git commit. CODEOWNERS routes it toplatform-admin for review; CI runs the assertions on the proposal, before effect.If the grant is temporary, add `expires: YYYY-MM-DD` and an `owner:`and it recertifies itself by going red.​--This read the DECLARED plane (the YAML in git). It did not consult livegroup membership, the listening surface, or DNS — so it can tell you a pathis not permitted, and it cannot tell you a permitted path works.

Real output of goat 0.5.20 for the example goatnet zagros, reading the declaration in a goatcore checkout. The output scrolls sideways.

$ goat acl test --declaration acl --verboseacl test: reading the ACL declaration from --declaration acl​lone: all 3 assertions hold  checked against the DECLARATION, all-to-all: every source must reach every destination  ok        [existence] a developer reaches the box on 443  ok        [isolation] a developer has no SSH to the box  ok        [flat_mesh] no enabled permit grants All→All on all protocols​not checked — no assertions declared: quiet

goat acl test runs the assertions declared with the mesh ACL through the same evaluator as CI and applies nothing. Here it reads the test declaration in goatcore, crates/goat-cli/tests/fixtures/acl. Run against a declaration with no assertions, it fails: an empty check is not a pass.

goat access asks the same of data: who (what may this identity write and read, with the reason at each layer), topic (who may write and read this topic), why (one allow or deny traced across mesh, identity, Zenoh ACL and release) and strays (every live identity with no declared match, grouped by why).

Errors

Every error says what happened, why, and what to do.

Each error goat prints says what happened, the likely cause, what to do (a command where one exists) and where to read more, and most carry a code. The words a called tool leaves behind, such as ssh, are interpreted the same way. One catalog in goatcore, ops/errors/catalog.yaml, is compiled into both goat and goatbuilder, so goat explain works offline and with no checkout.

$ goat explain E_NOT_ADMINE_NOT_ADMIN — an operator-only action without operator authority  what: a `goat admin` action was refused, client-side (no operator credentials in the profile) or by the portal/NetBird API (HTTP 403, nothing changed).  why:  the profile is using the vp_ participant token, not the op_ operator key        the role is not authorized for this action  fix:  GOAT_PORTAL_TOKEN=op_… goat admin …        goat admin operator-key request --reason …   (when you hold no op_ key)  read: docs/design/platform-admin-lifecycle.md  exit: 4

An operator-only action without operator authority changes nothing and exits 4. Real output of goat explain E_NOT_ADMIN, goat 0.5.20.

$ goat explain "Permission denied (publickey)"Permission denied (publickey)  [matched: Permission denied (publickey)]  X-SSH-001 — the host refused the key    what: the connection reached the host and SSH rejected every key offered.    why:  your public key is not on the host's operator user (ssh-key-self-service)          the wrong user (hosts take the deploy.ssh_user account)          the key is not loaded in the agent    fix:  ssh -v <ssh user>@<host> true 2>&1 | grep -i 'offering\|denied'          goat admin ssh-key …   (register the key through the goatnet)    read: docs/design/ssh-key-self-service.md

Any pasted error text, matched against the catalog. When nothing matches, goat explain --report - writes the text to a file to share, so the catalog can grow. Every code has a page in this documentation: E_OFF_MESH, all codes.

People

Changing who is on a goatnet takes operator authority.

goat admin holds the operator verbs. Each is authorized on the server by the person's own op_ operator key, which is never in an onboarding bundle; a participant's vp_ token gets E_NOT_ADMIN. Each action is recorded, and goat audit reads the record of who did what.

VerbWhat it does
admin inviteSponsors a candidate with a one-time onboarding invite: the first stage of the three-stage onboarding.
admin queueLists the onboarding proposals, then approves or rejects each one: the operator's gate.
admin onboard --revokeRevokes an operator or an org by handle: the offboarding path.
admin rotateReissues a peer's certificate in place: same anchor, same grants, a fresh leaf.
admin roleChanges an existing person's sign-in groups or activation, with the same guard and audit as the console.
admin operator-keyRequests and collects a person's own op_ key, so an admin action names a person.

Verbs

Every verb, grouped by the question it answers.

From goat --help, release 0.5.20. goat <verb> --help is authoritative, and goat docs --markdown prints the full reference.

QuestionVerbs
Am I set up and connected?init hello tutor ca profile context doctor status heal update
Is the goatnet healthy?top health flow presence services inspect microscope ui
Who is on it, and what may they do?who access acl warrant audit
What data is there, and how do I move it?org topic schema pub sub blob mock demo replay narrate
How do I change who is on it?admin machine
How do I join another goatnet?federate, moving to goatbuilder federate with the same flags
What does this mean, and what do I type?explain docs compose completion plugin
This deviceclient names

The goatnet is chosen with --context; there is no global --env. goat <name> also runs any goat-<name> program on the path.

Try it

Try it before you hold any credentials.

Download, check the checksum, and run the sandbox. Linux and macOS on amd64 and arm64, and Windows on amd64; each release lists a SHA-256 checksum per binary in SHA256SUMS, signed with cosign.

OS="$(uname -s | tr '[:upper:]' '[:lower:]')"; ARCH="$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/')"
base=https://github.com/usareur-af/goatcore/releases/download/goat-cli-v0.5.20
curl -fL --remote-name-all "$base/goat-$OS-$ARCH" "$base/SHA256SUMS"
shasum -a 256 -c --ignore-missing SHA256SUMS
install -m 0755 "goat-$OS-$ARCH" ~/.local/bin/goat
goat hello
goat tutor

When you are issued an onboarding bundle, attach the real goatnet. goat trusts no goatnet until you add the root that signed your bundle; check the fingerprint goat ca add prints against one your operator gives you.

goat ca add <bundle-ca.pem>
goat profile init <bundle.cbor>
goat init
goat doctor

Next: the goat book, or goatbuilder to build a goatnet of your own.

$ goat tutor --listgoat tutor — 11 lessons:   1. Orientation — what the fabric is   2. Identity & profile   3. Reachability — goat doctor   4. Publish & subscribe   5. Compose — build a command with live substrate context   6. Diagnose — goat inspect   7. Cascade — the --narrate flag   8. Access — who can read what   9. Sealed data — encryption that carries its own read cut  10. Rotate your key — forward secrecy on your terms  11. Wrap — from sandbox to the real thing

Real output of goat tutor --list, goat 0.5.20.

$ goat doctor[✗] step-0 local-readiness — local setup needs attention (3ms)     hint: check `goat context ls`; if this is your first setup, run `goat ca add <bundle-ca.pem>` and compare its fingerprint with your operator's, then `goat profile init <bundle.cbor>`; rerun `goat doctor`     [✗] profile.context — no goat profile for context `default`         next: check `goat context ls`; if this is your first setup, run `goat ca add <bundle-ca.pem>` and compare its fingerprint with your operator's, then `goat profile init <bundle.cbor>`; rerun `goat doctor`     [✗] mesh.client — no supported mesh client responded         next: install the mesh client supplied by your goatnet, start its daemon, then rerun `goat doctor`     [!] management.reachability — configured management endpoint could not be established locally         next: inspect `netbird status -d` or `goat client diagnostics`; doctor will not guess a management URL     [!] clock.skew — clock skew could not be measured from a management HTTP Date header         next: check the device's time synchronization if TLS or certificate checks fail[⏭] step-1 ztol-membership — skipped — no readable profile endpoints for this context (0ms)[⏭] step-2 zenoh-tls-material — skipped — no readable profile endpoints for this context (0ms)[⏭] step-3 zenoh-mtls-session — skipped — no readable profile endpoints for this context (0ms)[⏭] step-4 portal-api-orgs — skipped — no readable profile endpoints for this context (0ms)error: no profile for context `default`  help: no profile at /tmp/you/.goat/contexts/default. Run `goat profile init <bundle.cbor>` first.  code: E_PROFILE_MISSING

goat doctor on the same laptop before any profile: it names each missing piece and the command that supplies it, and skips the steps that need one. Real output, goat 0.5.20. The output scrolls sideways.