register → setup → test or start. Contract authors can use run while refining one
operation, then register the complete definition when it is ready for repeated use.
run compiles and executes one operation in a short-lived process. Registered services use an
immutable compiled revision and can retain profiles, backend state, reports, and deferred work
under SIMILE_HOME.
Register
./Simfile and uses the name declared by its service
block. An explicit name asserts the expected service name. --config URL_OR_FILE selects another
definition.
Registration performs the expensive and failure-prone work before installation:
- load the service configuration from a local path or HTTP(S) URL;
- resolve and load its OpenAPI, Smithy, or TypeScript source and HCL modules;
- parse and semantically validate the selected contract language and HCL;
- compile schemas, outcomes, constraints, and heuristic plans;
- encode and decode the
.similecartifact to verify it; and - install a private immutable revision, then atomically advance
current.
--force is explicit. Routine refreshes
should use update instead.
Setup
.env file without appearing in command output.
Setup without --profile generates an unused human-readable name and creates another independent
consumer identity. Passing an existing profile name updates its collected configuration while
preserving its issued identity. See Set up a service for the authoring model.
Start
./Simfile. --port changes only that invocation. start --config accepts an
explicit local path; URL-based configuration loading belongs to register and update.
Override the configured listener address when a container or virtual machine must expose it:
Test
test starts the selected service on an available loopback port, supplies that address to the
child as SIMILE_BASE_URL, and keeps the emulator alive until the command exits. A registered
service’s current profile is injected automatically; --profile NAME selects another profile.
Simile returns the child command’s exit status and shuts the listener down.
Use --scenario or --fault-profile to run a controlled failure case. See
Local testing for the complete workflow and CI testing for isolated
job state.
Update
current only after success. A failed fetch, parse, semantic check, schema
compile, or artifact check leaves the active revision unchanged.
To replace the configuration source at the same time:
Remove
state/services/NAME.redb, and state/services/NAME.exchanges.redb. The --confirm value is
required and must exactly match the service name. A missing or different value fails before the
registry is changed. If a running process owns the state lock, removal fails rather than unlinking
live state. Other services and the registry layout remain intact.
Stop a running service before removal. After removal, simile start inttegro fails until the
service is registered again.
Run
run compiles the selected contract and optional --module HCL modules in memory, executes one
operation, prints the result, and exits. It does not read or write the service registry. Because
each invocation creates a fresh runtime, replay state does not cross CLI invocations.
Registry layout
The default registry root is~/.simile; set SIMILE_HOME for CI isolation or tests:
state/services/.
Separately launched Stack component processes use state/stack/. Both use embedded redb and
sidecar ownership locks; the registry revisions themselves remain immutable. locks/ is reserved
for broader registry coordination; installation currently relies on same-filesystem staging and
atomic rename.
Continue
- Set up a service when the provider provisions credentials or caller settings.
- Run one operation to exercise the contract without a long-running server.
- Test an application to give a test process ownership of the emulator lifecycle.
- Open the console to inspect operations, exchanges, state, and deferred work.
- Application and registry for the installation and ownership internals.