Skip to content

Quickstart

1. Install mashin

Terminal window
# macOS
brew install mashin-live/tap/mashin
# Or download directly
curl -fsSL https://get.mashin.live | sh

2. Create a machine

Terminal window
mashin new classifier

This creates classifier.mashin:

machine classifier
accepts
text as text, is required
responds with
category as text
confidence as number
implements
ask classify, using: "anthropic:claude-sonnet-4-6"
with task "Classify this text into a category. Return the category name and a confidence score between 0 and 1."
returns
category as text
confidence as number
assuming
category: "general"
confidence: 0.85

3. Run it

Terminal window
mashin run classifier.mashin --input '{"text": "The quarterly earnings exceeded expectations"}'

Output:

{
"category": "finance",
"confidence": 0.92
}

4. Test it (without an API key)

The assuming block provides mock values for testing. Run in test mode:

Terminal window
mashin test classifier.mashin

Output:

classifier
classify: category="general", confidence=0.85 (mocked)
1 test, 1 passed, 0 failed

No API key needed. Tests are fast, free, and deterministic.

5. See the governance trace

Terminal window
mashin run classifier.mashin --input '{"text": "hello"}' --trace

The trace shows every governance decision: what permissions were checked, what the LLM was asked, how many tokens it used, and the hash chain proving the execution was not tampered with.

What’s next?