Install & Setup
Get statewright running in Claude Code in under 2 minutes
Install & Setup
Prerequisites
- Claude Code CLI installed
jqinstalled (brew install jqon macOS,apt install jqon Linux)
Install the Plugin
claude /plugin marketplace add statewright/statewright
claude /plugin install statewrightThis installs the statewright plugin, which adds:
- MCP tools for workflow control (
statewright_transition,statewright_get_state, etc.) - Hook-based enforcement (tool restrictions per workflow phase)
- The
/statewrightslash command
Get an API Key
- Go to statewright.ai
- Sign up and navigate to API Keys
- Generate a key (starts with
sw_live_) - Paste it into a Claude Code session (the plugin auto-detects and saves it)
Or save manually:
mkdir -p ~/.statewright
echo 'sw_live_your_key_here' > ~/.statewright/api_key
chmod 600 ~/.statewright/api_keyVerify
Start Claude Code and run:
/statewright listYou should see your available workflows. If you just signed up, you'll have a default bugfix workflow.
Environment Variables
For CI/CD or custom setups:
| Variable | Default | Description |
|---|---|---|
STATEWRIGHT_API_KEY | ~/.statewright/api_key | API key for authentication |
STATEWRIGHT_GATEWAY_URL | https://mcp.statewright.ai | MCP gateway endpoint |
Next Steps
- Quick Start — run your first workflow
- Core Concepts — understand the model