Quickstart
このコンテンツはまだ日本語訳がありません。
1. Install mashin
Section titled “1. Install mashin”# macOSbrew install mashin-live/tap/mashin
# Or download directlycurl -fsSL https://get.mashin.live | sh2. Create a machine
Section titled “2. Create a machine”mashin new classifier --template classifierThis 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.
3. Run it
Section titled “3. Run it”mashin run classifier.mashin --input '{"text": "The quarterly earnings exceeded expectations"}'Output:
{ "category": "finance", "confidence": 0.92, "confident": true}4. Test it (without an API key)
Section titled “4. Test it (without an API key)”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.
mashin test classifier.mashinOutput:
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.
5. See the governance trace
Section titled “5. See the governance trace”mashin run classifier.mashin --input '{"text": "hello"}' --traceThe 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.
Ship it
Section titled “Ship it”Your machine works locally. Now make it live:
mashin deploy classifier.mashinYour 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.
What’s next?
Section titled “What’s next?”- AI Providers - Configure Anthropic, OpenAI, Google, Groq, or run models locally with Ollama
- Key Concepts - Understand machines, steps, and governance
- Platform Overview - How all the platform components fit together
- Introduction to mashin - Full 10-lesson course
- Language Reference - Every keyword documented