Skip to content

chant emulator

chant emulator up [--lexicon <name>] [--json]
chant emulator down [--lexicon <name>] [--json]
chant emulator status [--lexicon <name>] [--json]

chant emulator manages the local emulators of the lexicons your project configures, and reports the endpoint and environment that redirect tooling at them.

The Local Testing pages boot an emulator inside an Op, which tears it down again when the Op finishes. This command is the other shape: up leaves the emulator running so you can deploy to it, observe it with chant lifecycle diff --live, graph it with chant graph --live, and come back to it across several commands.

Every action is idempotent. up on an already-running emulator reports the existing endpoint rather than starting a second container.

Boots each configured lexicon’s emulator container and waits for it to report healthy, then prints the endpoint.

Terminal window
chant emulator up
✓ aws: chant-floci up on http://localhost:4566
✓ azure: chant-floci-az up on http://localhost:4577
✓ gcp: chant-floci-gcp up on http://localhost:4588
✓ fly: chant-mudflaps up on http://localhost:4280
✓ fly: chant-spritzer up on http://localhost:4290

One line per emulator, not per lexicon: fly ships two, and --lexicon fly acts on both.

Stops and removes the containers.

Terminal window
chant emulator down

Reports whether each emulator is running, without starting or stopping anything. A container that is not running reports down with an empty endpoint.

Terminal window
chant emulator status
aws: chant-floci — up on http://localhost:4566
FlagDescription
--lexicon <name>Act on one lexicon’s emulator instead of all of them. A lexicon with no emulator, or one this project does not configure, warns and exits 0.
--jsonEmit the machine-readable report on stdout instead of the human summary.

The report is the contract other tools consume — behold’s serve --local uses it to point itself at a running emulator.

Terminal window
chant emulator up --json
{
"emulators": [
{
"lexicon": "aws",
"name": "chant-floci",
"endpoint": "http://localhost:4566",
"env": {
"AWS_ENDPOINT_URL": "http://localhost:4566",
"AWS_ACCESS_KEY_ID": "test",
"AWS_SECRET_ACCESS_KEY": "test",
"AWS_REGION": "us-east-1"
}
}
]
}

env is the point of the report: exporting those variables is what makes the AWS SDK, chant lifecycle --live, and a triggered Op talk to the emulator rather than the real account.

Terminal window
eval "$(chant emulator up --json | jq -r '.emulators[].env | to_entries[] | "export \(.key)=\(.value)"')"
chant lifecycle diff local --live

down and a stopped status report an empty endpoint and an empty env, so a consumer can tell “not running” from “running here” without parsing prose. With --json, a project whose lexicons have no emulator reports {"emulators":[]}.

LexiconContainerImagePortHealth checkEndpoint var
awschant-flocifloci/floci:1.5.344566/_localstack/health, waiting on cloudformationAWS_ENDPOINT_URL
azurechant-floci-azfloci/floci-az:0.10.04577/_floci/healthAZURE_ENDPOINT_URL
gcpchant-floci-gcpfloci/floci-gcp:0.5.04588/_floci-gcp/health
flychant-mudflapsghcr.io/intentius/mudflaps:0.4.14280/_mudflaps/healthFLY_FLAPS_BASE_URL
flychant-spritzerghcr.io/intentius/spritzer:0.4.14290/_spritzer/healthSPRITES_BASE_URL

gcp has no endpoint variable because gcpApply takes the endpoint as an explicit argument rather than reading one — chant emulator up --json still reports the endpoint, there is just nothing to export.

Every image is pinned rather than tracking :latest, so a local suite that passes today does not fail tomorrow because an image moved. A weekly workflow reports how far behind each pin is; the bump is a human decision, made when a consuming test needs the newer emulator.

Requires Docker. If Docker is missing or not running, status reports the emulator as down rather than failing.

CodeMeaning
0The action completed, including the case where no configured lexicon has an emulator
1No subcommand, or one that is not up, down, or status
  • Local Testing — deploying chant’s real output to an emulator, per cloud
  • chant lifecycle — observing a running emulator with --live
  • Config File — binding an endpoint to a named environment