Skip to content
Developer Preview — APIs and language features may change before 1.0

Quickstart

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

This creates classifier.mashin:

machine classifier
accepts
text as text, is required
responds with
category as text
confidence as number
confident as boolean
behaves
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.\n\nText: ${input.text}"
returns
category as text
confidence as number
compute assess
{category: classify.category, confidence: classify.confidence, confident: classify.confidence >= 0.7}
verifies
test "a confident classification is flagged confident"
assuming classify {category: "general", confidence: 0.85}
given {text: "What are your opening hours?"}
expect {category: "general", confident: true}
test "a low-confidence classification is not"
assuming classify {category: "billing", confidence: 0.4}
given {text: "asdf qwerty"}
expect {confident: false}

The machine asks an LLM to classify, then a compute step decides whether the classification is confident enough to act on.

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

Output:

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

The assuming block mocks the LLM step: it supplies the answer the model would give. The expect asserts what the machine derives from that answer. The first test feeds in confidence 0.85 and asserts the machine flags it confident: true; the second feeds in 0.4 and asserts the flag comes back false. The logic under test is the machine’s own, not the mock.

Terminal window
mashin test classifier.mashin

Output:

Testing Machine: classifier.mashin
classifier
PASS a confident classification is flagged confident (59ms)
PASS a low-confidence classification is not (1ms)
Summary: 2/2 passed (60ms)

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

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.

Your machine works locally. Now make it live:

Terminal window
mashin deploy classifier.mashin

Your machine is now running on your Kortex, accessible from any device. The governance, audit trail, and behavioral ledger travel with it.

From your phone: “Hey Siri, run email triage.” From the web: visit your machine’s page. From another machine: ask classify, from: "@you/email-triage".

One command. Zero infrastructure. That is the mashin deployment story.