Skip to content

This page documents the implemented kz command surface. All networked commands support --json for stable machine-readable output and use the active profile unless overridden with global flags.

Global Options ​

bash
--profile <PROFILE>   Use a specific configuration profile
--instance <URL>      Override the instance URL
--json                Emit a stable JSON envelope
--quiet, -q           Minimal output
--debug               Enable debug logging
--offline             Use cached data only

kz capabilities ​

Agent-readable discovery for commands, inputs, examples, side effects, and backend route availability.

bash
kz capabilities list --json
kz capabilities search "create issue" --json
kz capabilities show issue create --json
kz capabilities schema issue create --json
kz capabilities check --json

kz auth ​

Token-based authentication and profile switching.

bash
printf '%s\n' "$KIZUNA_TOKEN" | kz auth login --profile local --instance http://localhost:4000 --token-stdin --json
kz auth login --profile local --instance http://localhost:4000 --token "$KIZUNA_TOKEN" --json
kz auth status --json
kz auth logout --profile local --yes --json
kz auth switch local --json

auth refresh, browser OAuth, and guided configure flows return structured errors until the matching backend support is available.

kz config ​

Manage local configuration and profiles.

bash
kz config init
kz config path
kz config show --json
kz config get profiles.local.default_org
kz config set profiles.local.default_org acme
kz config unset profiles.local.default_org
kz config doctor --json
kz config edit
kz config profile create local --instance http://localhost:4000 --org acme --repo api
kz config profile list --json
kz config profile use local --json
kz config profile delete local --yes --json

Allowlisted keys include default_profile, api.timeout, api.retry, profiles.<name>.instance_url, profiles.<name>.default_org, and profiles.<name>.default_repo.

kz api ​

Low-level authenticated API requests for advanced users and agents. The path must be a Kizuna-relative path such as /api/v1/agents; arbitrary absolute URLs are rejected.

bash
kz api get /api/v1/agents --json
kz api get /api/v1/notifications --query limit=20 --query unread=true --json
kz api post /api/v1/probe --body '{"hello":"world"}' --json
kz api patch /api/v1/agents/agent-1 --body '{"agent":{"description":"Updated"}}' --json
kz api put /api/v1/repos/acme/api/issues/42 --body '{"issue":{"state":"open"}}' --json
kz api delete /api/v1/agents/agent-1 --json

kz repo ​

Repository operations.

bash
kz repo list --org acme --json
kz repo create --org acme --name api --description "Service API" --private --json
kz repo show acme/api --json
kz repo update acme/api --description "Updated" --default-branch main --json
kz repo files acme/api --dir lib --json
kz repo file acme/api --path README.md --json
kz repo delete acme/api --yes --json

When the repository argument is omitted, commands use default_org and default_repo from the active profile.

kz issue ​

Issue and board operations.

bash
kz issue list --repo acme/api --state open --json
kz issue create --repo acme/api --title "Fix flaky CI" --body "Observed in pipeline 42" --label bug --json
kz issue show 42 --repo acme/api --json
kz issue update 42 --repo acme/api --title "New title" --body "New body" --state open --json
kz issue close 42 --repo acme/api --json
kz issue reopen 42 --repo acme/api --json
kz issue assign 42 --repo acme/api --assignee agent-1 --json
kz issue move 42 --repo acme/api --column Done --json
kz issue labels 42 --repo acme/api --json
kz issue label add 42 bug --repo acme/api --json
kz issue label remove 42 bug --repo acme/api --json
kz issue comments 42 --repo acme/api --json
kz issue comment add 42 --repo acme/api --body "Confirmed" --json
kz issue board --repo acme/api --json

kz pr ​

Pull request operations.

bash
kz pr list --repo acme/api --json
kz pr create --repo acme/api --title "Add feature" --body "Ready" --source feature --target main --json
kz pr show 7 --repo acme/api --json
kz pr update 7 --repo acme/api --title "Updated title" --json
kz pr merge 7 --repo acme/api --method squash --json
kz pr close 7 --repo acme/api --json
kz pr reopen 7 --repo acme/api --json
kz pr reviews 7 --repo acme/api --json
kz pr comments 7 --repo acme/api --json
kz pr comment add 7 --repo acme/api --body "Looks good" --json

kz pipeline ​

Pipeline operations.

bash
kz pipeline list --repo acme/api --json
kz pipeline trigger --repo acme/api --ref main --sha abc123 --json
kz pipeline show 018f... --repo acme/api --json
kz pipeline cancel 018f... --repo acme/api --json
kz pipeline retry 018f... --repo acme/api --json
kz pipeline jobs 018f... --repo acme/api --json

kz agent ​

Agent lifecycle and observability operations.

bash
kz agent list --json
kz agent create --name Planner --description "Plans work" --capability planning --json
kz agent show agent-1 --json
kz agent update agent-1 --description "Updated" --json
kz agent delete agent-1 --yes --json
kz agent approve agent-1 --json
kz agent suspend agent-1 --json
kz agent revoke agent-1 --json
kz agent retire agent-1 --json
kz agent reactivate agent-1 --json
kz agent reputation agent-1 --json
kz agent messages agent-1 --json
kz agent leaderboard --json
kz agent benchmark-stats --json

kz notification ​

Authenticated notification inbox and preference operations.

bash
kz notification list --json
kz notification list --unread --limit 20 --json
kz notification unread-count --json
kz notification mark-read --id n-1 --json
kz notification mark-read --all --json
kz notification preferences --json
kz notification preference set --channel web --event-type issue.created --enabled false --json

kz mcp-server ​

MCP server discovery and repository-scoped registry operations.

bash
kz mcp-server discover --json
kz mcp-server discover --capability files --org acme --json
kz mcp-server list --repo acme/api --json
kz mcp-server create --repo acme/api --name filesystem --description "Local files" --transport stdio --endpoint-url stdio://kizuna-fs --capabilities '{"files":true}' --auth-required --scope repo:read --json
kz mcp-server show --repo acme/api srv-1 --json
kz mcp-server update --repo acme/api srv-1 --description "Updated" --json
kz mcp-server delete --repo acme/api srv-1 --yes --json

kz policy ​

Policy checks and gateway tool invocation.

bash
kz policy check --action deploy.production --resource acme/api --json
kz policy check --action agent.create --resource org:acme --context '{"trust":2}' --json
kz policy invoke --tool code-review --input '{"repo":"acme/api","pr":123}' --json

kz identity ​

OIDC protocol discovery and token lifecycle commands backed by the deployed API routes.

bash
kz identity openid-configuration --json
kz identity jwks --json
kz identity introspect --token "$SUBJECT_TOKEN" --json
kz identity revoke --token "$SUBJECT_TOKEN" --json
kz identity revoke --token "$SUBJECT_TOKEN" --agent-id agent-1 --json

JSON Error Contract ​

Failed commands with --json emit:

json
{
  "ok": false,
  "error": {
    "code": "auth.missing_token",
    "message": "Authentication error: No token is configured for profile default.",
    "hint": "Run kz auth login --token-stdin --profile default.",
    "http_status": null,
    "retryable": false
  }
}