principaldescribes a kind of caller and the credentials it may use;principal_setupdescribes how Simile provisions that kind of caller;profileis one concrete local instance of the principal.
Declare the principal
Credential permissions belong to the principal contract. The credential label names an OpenAPI security scheme.Declare principal setup
Theprincipal_setup label selects the principal it provisions:
operation names an operation from the selected API contract. Simile synthesizes its smallest
valid request, places collected values at their request projections, executes a successful outcome,
and extracts the issued values. credential connects an issued string to one credential slot on
the principal. Permissions remain centralized on that slot.
Use generate = "token" when the public response omits a local-only secret. Generated tokens use
cryptographic randomness and may carry a recognizable prefix.
Run setup
When a service declares oneprincipal_setup, the principal is unambiguous:
Profile names
When--profile is omitted, Simile chooses an unused two-word name from its built-in word catalog.
The first word is an adjective; the second is a noun or another adjective. Names are lowercase and
hyphenated, such as steady-heron or bright-nimble.
Pass an explicit name when scripts or teammates already refer to it:
--use when a later profile should become the
CLI default.
Reporting choice
When the service publishes a reporting endpoint, interactive setup asks whether the new profile may send automatic emulator issue reports. The prompt shows the exact destination before asking for consent. Choosing yes also collects an email address for clarification and fix notifications. Automation can make the same decision explicitly:simile reporting inttegro to inspect profile choices and --mode off to withdraw automatic
reporting consent. See Report an issue for the complete evidence and
privacy flow.
Credential handling
Setup output withholds issued values. Simile writes them to a private environment file:0700 and credential files use 0600. The file includes
SIMILE_SERVICE, SIMILE_PRINCIPAL, SIMILE_PROFILE, SIMILE_BASE_URL, and one uppercase
variable per issued value.
The complete profile remains in the service’s local state database so the running service can
authenticate requests and sign webhooks. Protect ~/.simile as credential-bearing local state and
exclude it from source control and build artifacts.