Get up and running with Stim in 5 minutes.
- Claude Code setup
- Basic familiarity with command-line tools
Quick install:
curl -fsSL https://raw.githubusercontent.com/wess/stim/main/install.sh | shOr via Homebrew:
brew install wess/packages/stimVerify it works:
stim versionCreate a simple .stim file:
# Create hello.stim
cat > hello.stim << 'EOF'
command hello {
ask("What's your name?")
wait_for_response()
ask("Nice to meet you! What would you like to work on today?")
wait_for_response()
if (confirm("Ready to get started?")) {
ask("Let's build something amazing!")
}
}
EOFstim install hello.stimThis compiles and places the output in ~/.claude/commands/hello.md. Use --local to install to the current project instead.
To compile without installing (outputs to dist/):
stim compile hello.stimIn Claude Code, type:
/hello
Claude will now execute your interactive command workflow!
Let's create a project planning command:
command quickplan {
features = [
"User authentication",
"Data storage",
"API endpoints",
"Frontend interface"
]
ask("What are you building?")
wait_for_response()
ask("What's your tech stack preference?")
wait_for_response()
for feature in features {
if (confirm("Do you need: " + feature + "?")) {
ask("Any specific requirements for " + feature + "?")
wait_for_response()
}
}
create_file("PROJECT_PLAN.md", "project_plan_template")
ask("Created your project plan! Ready to start implementing?")
}
Compile and use it:
stim install quickplan.stim
# Use with: /quickplanSpawn a subagent to handle a subtask:
command analyze {
task explore "find all API endpoints" {
ask("Search the codebase and list every API endpoint")
wait_for_response()
}
ask("Analysis complete!")
}
Or run multiple tasks in parallel:
command full_scan {
parallel {
task explore "check frontend" {
ask("What frontend frameworks and patterns are used?")
}
task explore "check backend" {
ask("What backend frameworks and patterns are used?")
}
}
}
- Tutorial - Comprehensive guide covering variables, control flow, tasks, and parallel execution
- API Reference - Complete syntax documentation
- Examples - Real-world command examples including multi-agent workflows
If /hello doesn't work in Claude Code:
- Check that the file was created:
ls ~/.claude/commands/hello.md - Restart Claude Code
- Verify your
.claude/commands/directory exists
Most common issues:
- Missing quotes: Use
"string"notstring - Unclosed braces: Every
{needs a matching} - Invalid syntax: Check the Syntax Reference
🎉 Congratulations! You've created your first Stim command. Now explore the full tutorial to learn advanced features.