Statewright

Install & Setup

Get statewright running in Claude Code in under 2 minutes

Install & Setup

Prerequisites

  • Claude Code CLI installed
  • jq installed (brew install jq on macOS, apt install jq on Linux)

Install the Plugin

claude /plugin marketplace add statewright/statewright
claude /plugin install statewright

This 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 /statewright slash command

Get an API Key

  1. Go to statewright.ai
  2. Sign up and navigate to API Keys
  3. Generate a key (starts with sw_live_)
  4. 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_key

Verify

Start Claude Code and run:

/statewright list

You 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:

VariableDefaultDescription
STATEWRIGHT_API_KEY~/.statewright/api_keyAPI key for authentication
STATEWRIGHT_GATEWAY_URLhttps://mcp.statewright.aiMCP gateway endpoint

Next Steps

On this page