Activate when using Hasura CLI commands in a self-hosted Docker environment, including migrations, metadata management, and console access via docker exec.
This skill guides you through using Hasura CLI in a self-hosted Docker Compose environment where the Hasura CLI runs inside a container.
Claude automatically uses this skill when you:
In a self-hosted setup, the Hasura CLI runs inside a Docker container rather than on your host machine.
Self-Hosted Docker Stack:
┌──────────────────────────────────────────────────┐
│ console service (hasura/graphql-engine) │
│ • Runs hasura-cli console command │
│ • Port 9695: Hasura Console UI │
│ • Has hasura-cli installed │
│ • Working dir: /app (mounted nhost/ directory) │
└──────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────┐
│ graphql service (hasura/graphql-engine) │
│ • Main Hasura GraphQL Engine │
│ • Port 8080: GraphQL API │
└──────────────────────────────────────────────────┘
❌ TRADITIONAL HASURA CLI DOES NOT WORK DIRECTLY:
# ❌ These fail because CLI is inside container
hasura-cli migrate status
hasura-cli metadata export
✅ INSTEAD, USE DOCKER EXEC:
# ✅ Correct way to access Hasura CLI in Docker
docker exec {console-container-name} hasura-cli [command]
# Example:
docker exec backend-console-1 hasura-cli version
docker exec backend-console-1 hasura-cli migrate status
# List all containers to find the console
docker ps | grep console
# Common naming patterns:
# - backend-console-1
# - nhost-console-1
# - hasura-console-1
# - {project}-console-1
The Hasura Console is typically already running when your Docker stack is up:
# Console URL (configure in docker-compose.yaml)