CLI
The Alloy CLI supports developer workflows and Foundry integration. The examples below cover the core commands.
Initialize Alloy for a project
alloy init my-projectCreates local config and links the project to an Alloy workspace.
Discover intent from codebase
alloy discover my-project --path .Runs Codebase Archaeology and produces hypotheses.
Review hypotheses
alloy review hypotheses my-projectPresents accept/edit/reject choices over the generated hypotheses. See Hypothesis Format for the structure of a hypothesis.
Ask an elicitation question
alloy ask my-project --mode scarsStarts an assistant-led interview.
Create a formation brief
alloy brief create my-project \
--epilogue-interaction et.interaction.checkout.submit-payment \
--intent alloy.intent.gateway.payment-provider \
--intent alloy.intent.functional-core.checkout-policyAssembles a Formation Brief from the named interaction and intent records.
Run through Foundry
alloy foundry run alloy.brief.checkout-payment.2026-06-06 \
--dry-run-firstThis could compile local artifacts and emit the appropriate Foundry event.
Export repo-local projection
alloy export charter my-project --output CHARTER.md
alloy export agents my-project --output AGENTS.mdThese are projections, not the canonical store.
Assess drift
alloy drift my-projectCompares active intent records against code observations and gate evidence. See Drift Detection for how drift is assessed.
Import Foundry trace feedback
alloy trace ingest my-project <event-id>Looks up the Foundry trace and updates run feedback. See Trace Feedback for how ingested traces flow back into Alloy.
Up: Interfaces · Related: API
Source: Product Brief §21 (API and CLI Seed).