mirror of
https://github.com/hanzoai/bot.git
synced 2026-11-01 18:02:28 +00:00
Full coverage of Hanzo infrastructure: MCP (260+ tools), CLI, LLM Gateway, Chat, Network, Node, Web3, Consensus, ACI, REPL, Vector DB, KV Store, PubSub, DocumentDB, Storage, Studio, Insights, Commerce, Search, and Telemetry. Updated PaaS skill to use hanzo-tools-paas SDK.
5.0 KiB
5.0 KiB
name, description, metadata
| name | description | metadata | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| hanzo-paas | Deploy and manage applications on Hanzo PaaS. Manage projects, environments, deployments, domains, logs, and cloud services via the hanzo-tools-paas MCP tool or REST API. |
|
Hanzo PaaS — Platform as a Service
pip install hanzo-tools-paas
Deploy and manage applications on Hanzo PaaS (platform.hanzo.ai). Supports Dokploy-based hosting, Docker/Compose deployments, domain management, and IAM integration.
Authentication
# Login via Hanzo CLI (stores token at ~/.hanzo/auth/token.json)
hanzo login
# Or set environment variables
export HANZO_IAM_URL=https://hanzo.id
export HANZO_IAM_CLIENT_ID=your-client-id
export HANZO_IAM_CLIENT_SECRET=your-client-secret
MCP Tool (Recommended)
The paas MCP tool provides a unified interface via hanzo-mcp:
# Via hanzo-mcp server — single tool with action parameter
# Tool: paas(action, org, project, environment, container)
IAM Actions
# Who am I?
paas(action="whoami")
# → {"sub": "user-id", "name": "...", "email": "...", "organization": "hanzo"}
# List users
paas(action="users")
# → {"count": 5, "users": [{"id": "...", "name": "...", "email": "..."}]}
# List organizations
paas(action="orgs")
# → {"count": 3, "organizations": [...]}
# List roles
paas(action="roles")
# → {"count": 4, "roles": [...]}
Deployment Actions
# List projects in org
paas(action="projects", org="hanzo")
# → {"org": "hanzo", "count": 12, "projects": [...]}
# List environments for a project
paas(action="env", org="hanzo", project="my-project")
# → {"environments": [{"id": "...", "name": "production"}, ...]}
# List containers/deployments
paas(action="deployments", org="hanzo", project="my-project", environment="prod")
# → {"containers": [{"id": "...", "name": "web", "image": "...", "status": "running", "replicas": 3}]}
# Get deployment details
paas(action="deploy", org="hanzo", project="my-project", environment="prod", container="web")
# View container logs
paas(action="logs", org="hanzo", project="my-project", environment="prod", container="web")
# Redeploy (rolling restart)
paas(action="redeploy", org="hanzo", project="my-project", environment="prod", container="web")
Cloud Services
# List managed services and cluster info
paas(action="services")
# → {"cluster": {...}, "templates": {...}}
REST API (Direct)
Base URL: https://platform.hanzo.ai/api
TOKEN=$(cat ~/.hanzo/auth/token.json | jq -r .access_token)
# List projects
curl -s -H "Authorization: Bearer $TOKEN" \
"https://platform.hanzo.ai/api/project.all" | jq
# Create project
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "my-app", "description": "My application"}' \
"https://platform.hanzo.ai/api/project.create" | jq
# Deploy application
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"applicationId": "<app-id>"}' \
"https://platform.hanzo.ai/api/application.deploy" | jq
# Read logs
curl -s -H "Authorization: Bearer $TOKEN" \
"https://platform.hanzo.ai/api/application.readLogs?applicationId=<id>" | jq
Docker Compose Deployments
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectId": "<project-id>",
"name": "my-stack",
"composeFile": "services:\n web:\n image: nginx"
}' "https://platform.hanzo.ai/api/compose.create" | jq
Domain Management
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"applicationId": "<app-id>",
"host": "myapp.hanzo.ai",
"certificateType": "letsencrypt"
}' "https://platform.hanzo.ai/api/domain.create" | jq
Environment Variables
HANZO_IAM_URL=https://hanzo.id # IAM endpoint
HANZO_IAM_CLIENT_ID=... # OAuth client ID
HANZO_IAM_CLIENT_SECRET=... # OAuth client secret
HANZO_PLATFORM_URL=https://platform.hanzo.ai # PaaS endpoint
Key Endpoints
| Endpoint | Purpose |
|---|---|
project.all |
List all projects |
project.create |
Create project |
application.create |
Create app service |
application.deploy |
Trigger deployment |
application.readLogs |
Read app logs |
compose.create |
Create compose service |
compose.deploy |
Deploy compose |
domain.create |
Add domain |
application.saveEnvironment |
Set env vars |