Stats
Actions
Tags
How this command is triggered — by the user, by Claude, or both
Slash command
/syntropic137:syn-metrics [--workflow <id>]sonnetThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# /syn-metrics — Aggregated Metrics First, resolve the API URL: Detect whether the `syn` CLI is available: Parse the user's argument: - No argument: - If SYN_CLI: `$SYN_CLI metrics show` - Else: `curl -sf "$SYN_API_URL/api/v1/metrics"` - `--workflow <id>`: - If SYN_CLI: `$SYN_CLI metrics show --workflow <id>` - Else: `curl -sf "$SYN_API_URL/api/v1/metrics?workflow_id=<id>"` Run the appropriate command and display the output (pipe through `jq .` for readability if available). If the API is unreachable, suggest running `/syn-health` to diagnose.
First, resolve the API URL:
if [ -n "${SYN_API_URL:-}" ]; then
SYN_API_URL="$SYN_API_URL"
elif [ -f "$HOME/.syntropic137/.env" ]; then
_hostname=$(grep '^SYN_PUBLIC_HOSTNAME=' "$HOME/.syntropic137/.env" 2>/dev/null | cut -d= -f2 | tr -d '"' | tr -d "'")
if [ -n "$_hostname" ]; then
SYN_API_URL="https://$_hostname"
fi
fi
SYN_API_URL="${SYN_API_URL:-http://localhost:8137}"
Detect whether the syn CLI is available:
if command -v syn &>/dev/null; then
SYN_CLI="syn"
else
SYN_CLI=""
fi
Parse the user's argument:
$SYN_CLI metrics showcurl -sf "$SYN_API_URL/api/v1/metrics"--workflow <id>:
$SYN_CLI metrics show --workflow <id>curl -sf "$SYN_API_URL/api/v1/metrics?workflow_id=<id>"Run the appropriate command and display the output (pipe through jq . for readability if available). If the API is unreachable, suggest running /syn-health to diagnose.
npx claudepluginhub syntropic137/syntropic137-claude-plugin --plugin syntropic137