kctl-api 0.9.1__tar.gz → 0.9.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kctl_api-0.9.1 → kctl_api-0.9.2}/PKG-INFO +1 -1
- {kctl_api-0.9.1 → kctl_api-0.9.2}/pyproject.toml +1 -1
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/__init__.py +1 -1
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/_register.py +0 -2
- {kctl_api-0.9.1 → kctl_api-0.9.2}/tests/test_smoke.py +0 -14
- kctl_api-0.9.1/skills/api-admin/SKILL.md +0 -679
- kctl_api-0.9.1/src/kctl_api/commands/skill_cmd.py +0 -58
- {kctl_api-0.9.1 → kctl_api-0.9.2}/.gitignore +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/README.md +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/__main__.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/cli.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/__init__.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/ai.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/aliases.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/apps.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/auth.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/automation.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/build_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/clean.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/config_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/dashboard.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/db.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/deploy.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/deps.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/dev.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/docker_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/doctor_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/env.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/files.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/fmt_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/health.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/jobs.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/lint_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/logs.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/marketplace.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/monitor_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/notifications.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/odoo_proxy.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/openapi.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/perf.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/rate_limit.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/realtime.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/redis_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/routes_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/saas.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/scaffold.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/security_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/services.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/shell.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/streams.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/stripe_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/tenant_ai.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/test_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/users.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/webhooks.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/workflows.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/commands/ws.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/core/__init__.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/core/async_client.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/core/callbacks.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/core/client.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/core/config.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/core/db.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/core/exceptions.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/core/output.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/core/plugins.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/core/redis.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/core/resolve.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/src/kctl_api/core/utils.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/tests/conftest.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/tests/test_auth.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/tests/test_cli.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/tests/test_config_cmd.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/tests/test_core.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/tests/test_deploy.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/tests/test_doctor_ai_summary.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/tests/test_logs.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/tests/test_standard.py +0 -0
- {kctl_api-0.9.1 → kctl_api-0.9.2}/tests/test_users.py +0 -0
|
@@ -44,7 +44,6 @@ from kctl_api.commands.scaffold import app as scaffold_app
|
|
|
44
44
|
from kctl_api.commands.security_cmd import app as security_app
|
|
45
45
|
from kctl_api.commands.services import app as services_app
|
|
46
46
|
from kctl_api.commands.shell import app as shell_app
|
|
47
|
-
from kctl_api.commands.skill_cmd import app as skill_app
|
|
48
47
|
from kctl_api.commands.streams import app as streams_app
|
|
49
48
|
from kctl_api.commands.stripe_cmd import app as stripe_app
|
|
50
49
|
from kctl_api.commands.tenant_ai import app as tenant_ai_app
|
|
@@ -121,7 +120,6 @@ def register_all(app: typer.Typer) -> None:
|
|
|
121
120
|
app.add_typer(monitor_app, name="monitor")
|
|
122
121
|
|
|
123
122
|
# Skill generation
|
|
124
|
-
app.add_typer(skill_app, name="skill")
|
|
125
123
|
|
|
126
124
|
# Short aliases
|
|
127
125
|
register_aliases(app)
|
|
@@ -648,19 +648,6 @@ class TestMonitorHelp:
|
|
|
648
648
|
assert result.exit_code == 0
|
|
649
649
|
|
|
650
650
|
|
|
651
|
-
# ---------------------------------------------------------------------------
|
|
652
|
-
# Skill generation
|
|
653
|
-
# ---------------------------------------------------------------------------
|
|
654
|
-
class TestSkillHelp:
|
|
655
|
-
def test_skill_help(self, runner: CliRunner) -> None:
|
|
656
|
-
result = runner.invoke(app, ["skill", "--help"])
|
|
657
|
-
assert result.exit_code == 0
|
|
658
|
-
|
|
659
|
-
def test_skill_generate_help(self, runner: CliRunner) -> None:
|
|
660
|
-
result = runner.invoke(app, ["skill", "generate", "--help"])
|
|
661
|
-
assert result.exit_code == 0
|
|
662
|
-
|
|
663
|
-
|
|
664
651
|
# ---------------------------------------------------------------------------
|
|
665
652
|
# Comprehensive group registration check
|
|
666
653
|
# ---------------------------------------------------------------------------
|
|
@@ -721,7 +708,6 @@ class TestAllGroupsRegistered:
|
|
|
721
708
|
"dashboard",
|
|
722
709
|
"monitor",
|
|
723
710
|
# Skill generation
|
|
724
|
-
"skill",
|
|
725
711
|
]
|
|
726
712
|
|
|
727
713
|
def test_all_groups_in_help(self, runner: CliRunner) -> None:
|
|
@@ -1,679 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: api-admin
|
|
3
|
-
description: >
|
|
4
|
-
FastAPI platform management via kctl-api CLI (59 groups, ~236 commands). MUST use for ANY kctl-api operation. See SKILL.md ## Triggers for keywords.
|
|
5
|
-
Auto-generated: 2026-05-22
|
|
6
|
-
registry_hash: 92e9f30a4f23
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# api-admin — kctl-api CLI Reference
|
|
10
|
-
|
|
11
|
-
> Auto-generated from `kctl-api` command registry. Do not edit manually.
|
|
12
|
-
> To regenerate: `kctl-api skill generate`
|
|
13
|
-
> To add custom content: edit `SKILL.extra.md` in the same directory.
|
|
14
|
-
|
|
15
|
-
## Overview
|
|
16
|
-
|
|
17
|
-
**CLI:** `kctl-api`
|
|
18
|
-
**Command groups:** 59
|
|
19
|
-
**Total commands:** ~236
|
|
20
|
-
**Install:** `cd cli && uv tool install --editable .`
|
|
21
|
-
|
|
22
|
-
## Global Options
|
|
23
|
-
|
|
24
|
-
| Flag | Description |
|
|
25
|
-
|------|-------------|
|
|
26
|
-
| `--json` | JSON output |
|
|
27
|
-
| `--quiet`, `-q` | Suppress info messages |
|
|
28
|
-
| `--format`, `-f` | Output format: pretty/json/csv/yaml |
|
|
29
|
-
| `--no-header` | Omit CSV header row |
|
|
30
|
-
| `--profile`, `-p` | Config profile name |
|
|
31
|
-
| `--version`, `-V` | Show version |
|
|
32
|
-
|
|
33
|
-
## Quick Discovery (for AI agents)
|
|
34
|
-
|
|
35
|
-
**DO NOT GUESS command paths or flag names.** Before invoking `kctl-api <group> <verb> ...`, use these AI-facing affordances:
|
|
36
|
-
|
|
37
|
-
1. **Find a command by keyword** — substring filter, returns sorted leaf paths:
|
|
38
|
-
```bash
|
|
39
|
-
kctl-api commands list --filter <keyword>
|
|
40
|
-
```
|
|
41
|
-
Example: `kctl-api commands list --filter database` → all database-related commands in one call.
|
|
42
|
-
|
|
43
|
-
2. **Inspect flags before invoking** — full param schema with
|
|
44
|
-
opts/defaults/required/choices/help:
|
|
45
|
-
```bash
|
|
46
|
-
kctl-api commands tree --json | jq '.. | objects | select(.name == "<verb>") | .params'
|
|
47
|
-
```
|
|
48
|
-
Reading the `params` array tells you exact flag names (`--lang`), short aliases (`-l`), defaults, required-vs-optional, and choices — eliminating the `No such option '--xxx'` failure mode.
|
|
49
|
-
|
|
50
|
-
3. **Preview destructive operations without executing** — `--explain` is supported on selected write commands:
|
|
51
|
-
```bash
|
|
52
|
-
kctl-api <group> <verb> <args> --explain
|
|
53
|
-
```
|
|
54
|
-
Prints the planned action and exits 0. If `--explain` errors with "no such option", that command does not support it — fall back to verifying via `commands tree` schema inspection before running for real.
|
|
55
|
-
|
|
56
|
-
4. **Errors are user-facing one-liners**, not Python tracebacks. A failed invocation shows `❌ <ErrorClass>: <message>` on stderr (or `{"error": ..., "message": ...}` JSON if `--json` was passed). Read the message — it usually tells you exactly what's missing.
|
|
57
|
-
|
|
58
|
-
## Triggers
|
|
59
|
-
|
|
60
|
-
Auto-invoke this skill when the user references any of these keywords:
|
|
61
|
-
|
|
62
|
-
"ai", "apps", "attach", "audit", "auth", "automation", "background-job", "bench", "breaking", "broadcast", "build", "cache", "call", "chat", "check", "check-safety", "checkout", "clean", "clients", "commands", "completions", "config", "connect", "connections", "consumers", "containers", "conversation", "conversations", "copilots", "correlation", "cors", "count", "coverage", "current", "dashboard", "db", "dd", "dead-letter", "deep", "delete-conversation", "deploy", "deps", "deps-check", "dev", "diff", "dl", "docker", "doctor", "down", "downgrade", "download", "dr", "ds", "du", "endpoint", "endpoints", "enqueue", "env", "errors", "expire-audit", "export", "files", "fl", "flush", "fmt", "follow", "generate", "graph", "hc", "headers", "health", "heartbeat", "history", "images", "info", "init", "install", "jo", "jobs", "kctl-api"
|
|
63
|
-
|
|
64
|
-
## Command Reference
|
|
65
|
-
|
|
66
|
-
### `kctl-api ai`
|
|
67
|
-
|
|
68
|
-
AI platform — copilots, chat, conversations.
|
|
69
|
-
|
|
70
|
-
| Command | Description |
|
|
71
|
-
|---------|-------------|
|
|
72
|
-
| `ai chat <message> [--copilot] [--conversation_id]` | Send a chat message to an AI copilot via POST /api/v1/ai/chat. |
|
|
73
|
-
| `ai conversation <conversation_id>` | Get conversation details and messages via GET /api/v1/ai/conversations/{id}. |
|
|
74
|
-
| `ai conversations [--page] [--per_page]` | List AI conversations via GET /api/v1/ai/conversations. |
|
|
75
|
-
| `ai copilots` | List available AI copilots via GET /api/v1/ai/copilots. |
|
|
76
|
-
| `ai delete-conversation <conversation_id> [--force]` | Delete an AI conversation via DELETE /api/v1/ai/conversations/{id}. |
|
|
77
|
-
| `ai health` | Check AI service health via GET /api/v1/ai/health. |
|
|
78
|
-
|
|
79
|
-
### `kctl-api apps`
|
|
80
|
-
|
|
81
|
-
App registry — list and inspect monorepo apps.
|
|
82
|
-
|
|
83
|
-
| Command | Description |
|
|
84
|
-
|---------|-------------|
|
|
85
|
-
| `apps deps <name>` | Show dependencies for an app (reads pyproject.toml). |
|
|
86
|
-
| `apps env <name>` | Show environment variables for an app (reads .env.example). |
|
|
87
|
-
| `apps info <name>` | Show details for a specific app from the registry. |
|
|
88
|
-
| `apps list` | List all known apps in the kodemeio-fastapi monorepo. |
|
|
89
|
-
|
|
90
|
-
### `kctl-api auth`
|
|
91
|
-
|
|
92
|
-
Authentication and identity management.
|
|
93
|
-
|
|
94
|
-
| Command | Description |
|
|
95
|
-
|---------|-------------|
|
|
96
|
-
| `auth login [--email] [--password]` | Authenticate with email and password, cache JWT tokens in profile. |
|
|
97
|
-
| `auth logout` | Clear cached tokens from the active profile. |
|
|
98
|
-
| `auth refresh` | Refresh the JWT access token using the refresh token. |
|
|
99
|
-
| `auth token-info [--token]` | Decode and display JWT token claims (without cryptographic verification). |
|
|
100
|
-
| `auth whoami` | Display current authenticated user info. |
|
|
101
|
-
|
|
102
|
-
### `kctl-api automation`
|
|
103
|
-
|
|
104
|
-
Automation templates — list, create, update, delete, run.
|
|
105
|
-
|
|
106
|
-
| Command | Description |
|
|
107
|
-
|---------|-------------|
|
|
108
|
-
| `automation create <name> <trigger_type> [--config_json]` | Create a new automation template via POST. |
|
|
109
|
-
| `automation delete <template_id> [--force]` | Delete an automation template via DELETE. |
|
|
110
|
-
| `automation get <template_id>` | Get automation template details. |
|
|
111
|
-
| `automation list [--page] [--per_page]` | List automation templates. |
|
|
112
|
-
| `automation run <template_id> [--data_json]` | Manually trigger an automation template via POST. |
|
|
113
|
-
| `automation update <template_id> [--name] [--enabled] [--config_json]` | Update an automation template via PATCH. |
|
|
114
|
-
|
|
115
|
-
### `kctl-api build`
|
|
116
|
-
|
|
117
|
-
Docker image builds — dev, prod, all.
|
|
118
|
-
|
|
119
|
-
| Command | Description |
|
|
120
|
-
|---------|-------------|
|
|
121
|
-
| `build all [--dev_mode]` | Build all Docker images via scripts/build all. |
|
|
122
|
-
| `build dev [--app_name]` | Build development Docker image(s) via scripts/build --dev. |
|
|
123
|
-
| `build prod [--app_name]` | Build production Docker image(s) via scripts/build. |
|
|
124
|
-
|
|
125
|
-
### `kctl-api clean`
|
|
126
|
-
|
|
127
|
-
Cleanup — all, cache, build, pycache.
|
|
128
|
-
|
|
129
|
-
| Command | Description |
|
|
130
|
-
|---------|-------------|
|
|
131
|
-
| `clean all [--dry_run] [--force]` | Remove all build artifacts, caches, and __pycache__ directories. |
|
|
132
|
-
| `clean build [--dry_run]` | Remove dist/ and *.egg-info build artifacts. |
|
|
133
|
-
| `clean cache [--dry_run]` | Remove .ruff_cache, .mypy_cache, .pytest_cache directories. |
|
|
134
|
-
| `clean pycache [--dry_run]` | Remove all __pycache__ directories and .pyc/.pyo files. |
|
|
135
|
-
|
|
136
|
-
### `kctl-api commands`
|
|
137
|
-
|
|
138
|
-
Machine-readable command discovery (for AI agents).
|
|
139
|
-
|
|
140
|
-
| Command | Description |
|
|
141
|
-
|---------|-------------|
|
|
142
|
-
| `commands list [--json_flag] [--filter_substr]` | List all leaf commands as 'group verb' strings. |
|
|
143
|
-
| `commands tree [--json_flag]` | Dump the full command tree as JSON. |
|
|
144
|
-
|
|
145
|
-
### `kctl-api completions`
|
|
146
|
-
|
|
147
|
-
Generate or install shell completions.
|
|
148
|
-
|
|
149
|
-
Usage: `kctl-api completions [--shell] [--install]`
|
|
150
|
-
|
|
151
|
-
### `kctl-api config`
|
|
152
|
-
|
|
153
|
-
Manage connection profiles and configuration.
|
|
154
|
-
|
|
155
|
-
| Command | Description |
|
|
156
|
-
|---------|-------------|
|
|
157
|
-
| `config add <name> [--url] [--ai_url] [--api_key] [--database_url] [--redis_url] [--default]` | Add a new connection profile. |
|
|
158
|
-
| `config current` | Show active profile name and connection status. |
|
|
159
|
-
| `config init` | Interactive setup wizard: prompt for URL, email, password; login to get JWT; save profile. |
|
|
160
|
-
| `config migrate` | Migrate from old flat format to service-scoped YAML. |
|
|
161
|
-
| `config profiles` | List all connection profiles. |
|
|
162
|
-
| `config remove <name> [--force]` | Delete a connection profile. |
|
|
163
|
-
| `config set <key> <value>` | Set a config value on the active profile. |
|
|
164
|
-
| `config show` | Show full configuration with masked secrets. |
|
|
165
|
-
| `config test` | Test current profile connectivity (GET /api/v1/health). |
|
|
166
|
-
| `config use <name>` | Switch the default profile. |
|
|
167
|
-
|
|
168
|
-
### `kctl-api dashboard`
|
|
169
|
-
|
|
170
|
-
Dashboard — overview, live monitoring.
|
|
171
|
-
|
|
172
|
-
| Command | Description |
|
|
173
|
-
|---------|-------------|
|
|
174
|
-
| `dashboard live` | Live dashboard with auto-refresh (not yet implemented). |
|
|
175
|
-
| `dashboard overview` | Show a combined overview: health + jobs + recent activity. |
|
|
176
|
-
|
|
177
|
-
### `kctl-api db`
|
|
178
|
-
|
|
179
|
-
Database management — tables, migrations, queries, shell.
|
|
180
|
-
|
|
181
|
-
| Command | Description |
|
|
182
|
-
|---------|-------------|
|
|
183
|
-
| `db check-safety` | Analyze pending Alembic migrations for destructive operations. |
|
|
184
|
-
| `db connections` | Show active database connections. |
|
|
185
|
-
| `db count <table>` | Count rows in a table via direct async query. |
|
|
186
|
-
| `db downgrade [--revision] [--force]` | Downgrade database to a previous migration revision. |
|
|
187
|
-
| `db generate <message>` | Generate a new Alembic migration via scripts/db generate. |
|
|
188
|
-
| `db history` | Show Alembic migration history via scripts/db history. |
|
|
189
|
-
| `db migrate` | Run Alembic upgrade head via scripts/db migrate. |
|
|
190
|
-
| `db query <sql> [--force]` | Execute a raw SQL query via async engine. |
|
|
191
|
-
| `db reset [--force] [--skip_seed]` | Drop + recreate + migrate + seed the database. |
|
|
192
|
-
| `db seed [--app_name] [--force]` | Seed the database with test/dev data via scripts/db seed. |
|
|
193
|
-
| `db shell` | Open an interactive psql shell to the configured database. |
|
|
194
|
-
| `db size` | Show database size per table. |
|
|
195
|
-
| `db slow-queries [--min_ms] [--limit]` | Show slow queries from pg_stat_statements (requires pg_stat_statements extension). |
|
|
196
|
-
| `db tables` | List database tables via direct async query. |
|
|
197
|
-
|
|
198
|
-
### `kctl-api dd`
|
|
199
|
-
|
|
200
|
-
Alias: dev down
|
|
201
|
-
|
|
202
|
-
### `kctl-api deploy`
|
|
203
|
-
|
|
204
|
-
Deployment management — status, logs, restart, rollback.
|
|
205
|
-
|
|
206
|
-
| Command | Description |
|
|
207
|
-
|---------|-------------|
|
|
208
|
-
| `deploy list` | List all deployments (will use Dokploy API). |
|
|
209
|
-
| `deploy logs <app_name> [--tail] [--follow] [--compose_id] [--service] [--dokploy_profile]` | View deployment logs via kctl-dokploy or local docker compose. |
|
|
210
|
-
| `deploy restart <app_name>` | Restart a deployed app (will use Dokploy API). |
|
|
211
|
-
| `deploy rollback <app_name> [--revision]` | Rollback a deployment to a previous revision (will use Dokploy API). |
|
|
212
|
-
| `deploy status [--app_name]` | Show deployment status (will use Dokploy API). |
|
|
213
|
-
|
|
214
|
-
### `kctl-api deps`
|
|
215
|
-
|
|
216
|
-
Dependency management — audit, outdated, licenses, graph, size.
|
|
217
|
-
|
|
218
|
-
| Command | Description |
|
|
219
|
-
|---------|-------------|
|
|
220
|
-
| `deps audit [--fix]` | Run security audit via uv or pip-audit. |
|
|
221
|
-
| `deps graph` | Show the dependency graph via uv tree. |
|
|
222
|
-
| `deps licenses [--allow]` | Generate a license report for all installed packages. |
|
|
223
|
-
| `deps outdated` | Show outdated packages across all workspace members. |
|
|
224
|
-
| `deps size [--top]` | Show installed package sizes. |
|
|
225
|
-
|
|
226
|
-
### `kctl-api dev`
|
|
227
|
-
|
|
228
|
-
Development environment — up, down, rebuild, logs.
|
|
229
|
-
|
|
230
|
-
| Command | Description |
|
|
231
|
-
|---------|-------------|
|
|
232
|
-
| `dev attach <service>` | Attach to a running container's shell. |
|
|
233
|
-
| `dev down` | Stop the development stack. |
|
|
234
|
-
| `dev logs [--service] [--follow] [--tail]` | View docker compose logs. |
|
|
235
|
-
| `dev rebuild [--service]` | Rebuild and restart docker compose services. |
|
|
236
|
-
| `dev up [--build] [--odoo_mm] [--plane_mm] [--all_services]` | Start the development stack via scripts/dev. |
|
|
237
|
-
|
|
238
|
-
### `kctl-api dl`
|
|
239
|
-
|
|
240
|
-
Alias: deploy logs <app>
|
|
241
|
-
|
|
242
|
-
Usage: `kctl-api dl [--app_name]`
|
|
243
|
-
|
|
244
|
-
### `kctl-api docker`
|
|
245
|
-
|
|
246
|
-
Docker management — images, containers, network, volumes, system.
|
|
247
|
-
|
|
248
|
-
| Command | Description |
|
|
249
|
-
|---------|-------------|
|
|
250
|
-
| `docker containers [--all_containers]` | List running (or all) Docker containers. |
|
|
251
|
-
| `docker images` | List Docker images for the project. |
|
|
252
|
-
| `docker network` | List Docker networks and show which containers are attached. |
|
|
253
|
-
| `docker system` | Show Docker system disk usage and resource summary. |
|
|
254
|
-
| `docker volumes` | List Docker volumes used by the project. |
|
|
255
|
-
|
|
256
|
-
### `kctl-api doctor`
|
|
257
|
-
|
|
258
|
-
Environment validation — check, fix, report.
|
|
259
|
-
|
|
260
|
-
| Command | Description |
|
|
261
|
-
|---------|-------------|
|
|
262
|
-
| `doctor check` | Check Python, uv, Docker, PostgreSQL, Redis, and .env configuration. |
|
|
263
|
-
| `doctor fix` | Auto-fix common environment issues. |
|
|
264
|
-
| `doctor report` | Generate a full diagnostic report. |
|
|
265
|
-
|
|
266
|
-
### `kctl-api dr`
|
|
267
|
-
|
|
268
|
-
Alias: dev rebuild
|
|
269
|
-
|
|
270
|
-
### `kctl-api ds`
|
|
271
|
-
|
|
272
|
-
Alias: deploy status
|
|
273
|
-
|
|
274
|
-
### `kctl-api du`
|
|
275
|
-
|
|
276
|
-
Alias: dev up
|
|
277
|
-
|
|
278
|
-
### `kctl-api env`
|
|
279
|
-
|
|
280
|
-
Environment management — validate, diff, template, sync.
|
|
281
|
-
|
|
282
|
-
| Command | Description |
|
|
283
|
-
|---------|-------------|
|
|
284
|
-
| `env diff [--file_a] [--file_b]` | Diff two .env files, or .env vs .env.example if no args given. |
|
|
285
|
-
| `env sync [--dry_run]` | Sync .env keys across monorepo apps — add missing keys from root .env.example. |
|
|
286
|
-
| `env template [--source] [--output] [--force]` | Generate .env.example from .env by stripping values. |
|
|
287
|
-
| `env validate [--env_file]` | Validate .env against .env.example — show missing and extra keys. |
|
|
288
|
-
|
|
289
|
-
### `kctl-api files`
|
|
290
|
-
|
|
291
|
-
File management — upload, download, list, delete.
|
|
292
|
-
|
|
293
|
-
| Command | Description |
|
|
294
|
-
|---------|-------------|
|
|
295
|
-
| `files delete <file_id> [--force]` | Delete a file by ID via DELETE /api/v1/files/{id}. |
|
|
296
|
-
| `files download <file_id> [--output_path]` | Download a file by ID via GET /api/v1/files/{id}/download. |
|
|
297
|
-
| `files info <file_id>` | Get file metadata by ID. |
|
|
298
|
-
| `files list [--page] [--per_page]` | List uploaded files with pagination. |
|
|
299
|
-
| `files stats` | Get file storage statistics via GET /api/v1/files/stats. |
|
|
300
|
-
| `files upload <file_path>` | Upload a file via POST /api/v1/files/upload. |
|
|
301
|
-
|
|
302
|
-
### `kctl-api fl`
|
|
303
|
-
|
|
304
|
-
Alias: files list
|
|
305
|
-
|
|
306
|
-
### `kctl-api fmt`
|
|
307
|
-
|
|
308
|
-
Code formatting — run, check.
|
|
309
|
-
|
|
310
|
-
| Command | Description |
|
|
311
|
-
|---------|-------------|
|
|
312
|
-
| `fmt check` | Check formatting without modifying files (ruff format --check). |
|
|
313
|
-
| `fmt run` | Format code via scripts/fmt. |
|
|
314
|
-
|
|
315
|
-
### `kctl-api hc`
|
|
316
|
-
|
|
317
|
-
Alias: health all
|
|
318
|
-
|
|
319
|
-
### `kctl-api health`
|
|
320
|
-
|
|
321
|
-
Health checks for API services, database, and Redis.
|
|
322
|
-
|
|
323
|
-
| Command | Description |
|
|
324
|
-
|---------|-------------|
|
|
325
|
-
| `health ai [--watch] [--interval]` | Check ai-main health (GET /api/v1/ai/health). |
|
|
326
|
-
| `health all [--watch] [--interval]` | Run all health checks and display aggregated results. |
|
|
327
|
-
| `health api [--watch] [--interval]` | Check api-main health (GET /api/v1/health). |
|
|
328
|
-
| `health db [--watch] [--interval]` | Check database connectivity (async SELECT 1). |
|
|
329
|
-
| `health deep` | Deep health check — DB, Redis, all external service dependencies. |
|
|
330
|
-
| `health deps-check` | Verify external service dependencies are reachable. |
|
|
331
|
-
| `health redis [--watch] [--interval]` | Check Redis connectivity (async PING). |
|
|
332
|
-
|
|
333
|
-
### `kctl-api jo`
|
|
334
|
-
|
|
335
|
-
Alias: jobs overview
|
|
336
|
-
|
|
337
|
-
### `kctl-api jobs`
|
|
338
|
-
|
|
339
|
-
Background job management — overview, status, enqueue.
|
|
340
|
-
|
|
341
|
-
| Command | Description |
|
|
342
|
-
|---------|-------------|
|
|
343
|
-
| `jobs enqueue <function> [--data_json]` | Enqueue a new background job (admin-only) via POST /api/v1/jobs/enqueue. |
|
|
344
|
-
| `jobs get <job_id>` | Get detailed job information via GET /api/v1/jobs/{id}. |
|
|
345
|
-
| `jobs overview` | Show job queue overview (GET /api/v1/jobs/queues/overview). |
|
|
346
|
-
| `jobs status <job_id>` | Get status of a specific job via GET /api/v1/jobs/{id}. |
|
|
347
|
-
|
|
348
|
-
### `kctl-api lint`
|
|
349
|
-
|
|
350
|
-
Linting — check, fix, strict.
|
|
351
|
-
|
|
352
|
-
| Command | Description |
|
|
353
|
-
|---------|-------------|
|
|
354
|
-
| `lint check` | Run ruff check + mypy via scripts/lint. |
|
|
355
|
-
| `lint fix` | Run ruff check --fix to auto-fix lint issues. |
|
|
356
|
-
| `lint strict` | Run mypy in strict mode. |
|
|
357
|
-
|
|
358
|
-
### `kctl-api logs`
|
|
359
|
-
|
|
360
|
-
Log viewer — follow, errors, search, tail.
|
|
361
|
-
|
|
362
|
-
| Command | Description |
|
|
363
|
-
|---------|-------------|
|
|
364
|
-
| `logs correlation <request_id> [--service] [--tail_lines]` | Trace a request across services by correlation/request ID. |
|
|
365
|
-
| `logs errors [--service] [--tail]` | Show only error-level log lines from services. |
|
|
366
|
-
| `logs follow [--service] [--tail]` | Follow service logs in real time. |
|
|
367
|
-
| `logs search <pattern> [--service] [--tail]` | Search service logs for a pattern. |
|
|
368
|
-
| `logs structured [--service] [--tail_lines] [--level] [--event]` | Parse and display JSON (structured) log lines from services. |
|
|
369
|
-
| `logs tail [--service] [--lines]` | Show the last N lines of service logs. |
|
|
370
|
-
|
|
371
|
-
### `kctl-api marketplace`
|
|
372
|
-
|
|
373
|
-
Extension marketplace — browse, install, publish.
|
|
374
|
-
|
|
375
|
-
| Command | Description |
|
|
376
|
-
|---------|-------------|
|
|
377
|
-
| `marketplace get <extension_id>` | Get extension details. |
|
|
378
|
-
| `marketplace install <extension_id>` | Install a marketplace extension via POST. |
|
|
379
|
-
| `marketplace list [--page] [--per_page] [--category]` | List marketplace extensions. |
|
|
380
|
-
| `marketplace publish <manifest_path>` | Publish a new extension via POST /api/v1/marketplace/extensions. |
|
|
381
|
-
| `marketplace review <extension_id> <rating> [--comment]` | Submit a review for an extension via POST. |
|
|
382
|
-
| `marketplace search <query> [--page] [--per_page]` | Search marketplace extensions by name or description. |
|
|
383
|
-
| `marketplace uninstall <extension_id> [--force]` | Uninstall a marketplace extension via DELETE. |
|
|
384
|
-
| `marketplace versions <extension_id>` | List available versions for an extension via GET. |
|
|
385
|
-
|
|
386
|
-
### `kctl-api monitor`
|
|
387
|
-
|
|
388
|
-
Production monitoring — live, metrics, uptime.
|
|
389
|
-
|
|
390
|
-
| Command | Description |
|
|
391
|
-
|---------|-------------|
|
|
392
|
-
| `monitor live [--interval]` | Live dashboard — API health, DB, Redis, container status refreshed every N seconds. |
|
|
393
|
-
| `monitor metrics` | Fetch metrics from the API (Prometheus endpoint if available). |
|
|
394
|
-
| `monitor uptime [--duration] [--interval]` | Monitor API uptime — single check or continuous with SLA tracking. |
|
|
395
|
-
|
|
396
|
-
### `kctl-api notifications`
|
|
397
|
-
|
|
398
|
-
Send notifications — Mattermost, Telegram, broadcast.
|
|
399
|
-
|
|
400
|
-
| Command | Description |
|
|
401
|
-
|---------|-------------|
|
|
402
|
-
| `notifications broadcast <message> [--channel_type]` | Broadcast a message to all notification channels via POST /api/v1/notifications/broadcast. |
|
|
403
|
-
| `notifications mattermost <message> [--channel]` | Send a Mattermost notification via POST /api/v1/notifications/mattermost. |
|
|
404
|
-
| `notifications telegram <message> [--chat_id]` | Send a Telegram notification via POST /api/v1/notifications/telegram. |
|
|
405
|
-
| `notifications test [--channel_type]` | Send a test notification to verify configuration. |
|
|
406
|
-
|
|
407
|
-
### `kctl-api odoo`
|
|
408
|
-
|
|
409
|
-
Odoo proxy — search-read, call, create, write (admin-only).
|
|
410
|
-
|
|
411
|
-
| Command | Description |
|
|
412
|
-
|---------|-------------|
|
|
413
|
-
| `odoo call <model> <method> [--args_json] [--kwargs_json]` | Call an Odoo model method via POST /api/v1/odoo/call (admin-only). |
|
|
414
|
-
| `odoo create <model> <values_json>` | Create an Odoo record via POST /api/v1/odoo/create (admin-only). |
|
|
415
|
-
| `odoo search-read <model> [--domain] [--fields] [--limit]` | Search and read Odoo records via POST /api/v1/odoo/search-read (admin-only). |
|
|
416
|
-
| `odoo write <model> <record_id> <values_json>` | Update an Odoo record via POST /api/v1/odoo/write (admin-only). |
|
|
417
|
-
|
|
418
|
-
### `kctl-api openapi`
|
|
419
|
-
|
|
420
|
-
OpenAPI spec — export, validate, diff, breaking changes.
|
|
421
|
-
|
|
422
|
-
| Command | Description |
|
|
423
|
-
|---------|-------------|
|
|
424
|
-
| `openapi breaking [--base]` | Detect breaking changes — removed endpoints, changed types, removed fields. |
|
|
425
|
-
| `openapi clients` | Show information about generating client SDKs from the OpenAPI spec. |
|
|
426
|
-
| `openapi diff [--base]` | Diff OpenAPI spec between current state and a git ref. |
|
|
427
|
-
| `openapi export [--fmt] [--output]` | Fetch /openapi.json from running API and export as JSON or YAML. |
|
|
428
|
-
| `openapi validate` | Check spec completeness — missing descriptions, examples, error schemas. |
|
|
429
|
-
|
|
430
|
-
### `kctl-api perf`
|
|
431
|
-
|
|
432
|
-
Performance — bench, profile, latency, endpoints.
|
|
433
|
-
|
|
434
|
-
| Command | Description |
|
|
435
|
-
|---------|-------------|
|
|
436
|
-
| `perf bench <endpoint> [--rps] [--duration] [--method]` | Load test an endpoint — target RPS for a duration. |
|
|
437
|
-
| `perf endpoints [--samples] [--tag]` | Measure response times for all GET endpoints from the OpenAPI spec. |
|
|
438
|
-
| `perf latency [--endpoint] [--samples]` | Show latency percentiles for an endpoint. |
|
|
439
|
-
| `perf profile <endpoint> [--samples] [--method]` | Profile endpoint execution — timing breakdown over N samples. |
|
|
440
|
-
|
|
441
|
-
### `kctl-api rate-limit`
|
|
442
|
-
|
|
443
|
-
Rate limit — tiers, test, status, simulate.
|
|
444
|
-
|
|
445
|
-
| Command | Description |
|
|
446
|
-
|---------|-------------|
|
|
447
|
-
| `rate-limit simulate <tier>` | Show expected rate limit behavior for a tier. |
|
|
448
|
-
| `rate-limit status` | Inspect Redis rate limit keys (rl: prefix). |
|
|
449
|
-
| `rate-limit test <endpoint> [--tier] [--count]` | Send sequential requests to test rate limit behavior. |
|
|
450
|
-
| `rate-limit tiers` | Show tier rate limit configuration (requests per minute). |
|
|
451
|
-
|
|
452
|
-
### `kctl-api realtime`
|
|
453
|
-
|
|
454
|
-
Real-time features — presence, heartbeat, subscribe.
|
|
455
|
-
|
|
456
|
-
| Command | Description |
|
|
457
|
-
|---------|-------------|
|
|
458
|
-
| `realtime heartbeat [--scope]` | Send a heartbeat ping via POST /api/v1/realtime/presence/{scope}/heartbeat. |
|
|
459
|
-
| `realtime presence [--scope]` | Get online users for a scope via GET /api/v1/realtime/presence/{scope}. |
|
|
460
|
-
| `realtime subscribe <channel>` | Subscribe to a real-time SSE channel via GET /api/v1/realtime/sse/{channel}. |
|
|
461
|
-
|
|
462
|
-
### `kctl-api redis`
|
|
463
|
-
|
|
464
|
-
Redis management — info, keys, get, delete, stats.
|
|
465
|
-
|
|
466
|
-
| Command | Description |
|
|
467
|
-
|---------|-------------|
|
|
468
|
-
| `redis delete <key> [--force]` | Delete a Redis key. |
|
|
469
|
-
| `redis expire-audit [--limit]` | Find keys without TTL (potential memory leaks). |
|
|
470
|
-
| `redis flush [--force]` | Flush the current Redis database (FLUSHDB). |
|
|
471
|
-
| `redis get <key>` | Get a Redis key value. |
|
|
472
|
-
| `redis info` | Show Redis server info via async PING + INFO. |
|
|
473
|
-
| `redis keys [--pattern] [--limit]` | List Redis keys matching a pattern via async SCAN. |
|
|
474
|
-
| `redis keys-by-prefix [--limit]` | Group Redis keys by prefix (up to first colon). |
|
|
475
|
-
| `redis memory` | Show memory usage per key prefix. |
|
|
476
|
-
| `redis monitor [--duration]` | Real-time Redis MONITOR — show commands as they execute. |
|
|
477
|
-
| `redis pubsub` | Show active Pub/Sub channels and subscriber counts. |
|
|
478
|
-
| `redis stats` | Show Redis memory and key statistics. |
|
|
479
|
-
|
|
480
|
-
### `kctl-api routes`
|
|
481
|
-
|
|
482
|
-
Endpoint introspection — list, auth, middleware, unprotected.
|
|
483
|
-
|
|
484
|
-
| Command | Description |
|
|
485
|
-
|---------|-------------|
|
|
486
|
-
| `routes auth` | Group endpoints by authentication requirement. |
|
|
487
|
-
| `routes graph` | Show route count per tag/module/router. |
|
|
488
|
-
| `routes list` | List all API endpoints with methods, paths, and auth status. |
|
|
489
|
-
| `routes middleware <path>` | Describe the middleware chain for a specific endpoint path. |
|
|
490
|
-
| `routes unprotected` | Find endpoints without authentication requirements. |
|
|
491
|
-
|
|
492
|
-
### `kctl-api saas`
|
|
493
|
-
|
|
494
|
-
SaaS tenant management — create, status, plans.
|
|
495
|
-
|
|
496
|
-
| Command | Description |
|
|
497
|
-
|---------|-------------|
|
|
498
|
-
| `saas create <name> [--plan]` | Create a new SaaS tenant via POST /api/v1/saas/tenants. |
|
|
499
|
-
| `saas list [--page] [--per_page]` | List SaaS tenants via GET /api/v1/saas/tenants. |
|
|
500
|
-
| `saas select-plan <tenant_id> <plan>` | Change tenant plan via POST /api/v1/saas/tenants/{slug}/select-plan. |
|
|
501
|
-
| `saas status <tenant_id>` | Get tenant provisioning status via GET /api/v1/saas/tenants/{slug}/status. |
|
|
502
|
-
|
|
503
|
-
### `kctl-api scaffold`
|
|
504
|
-
|
|
505
|
-
Scaffold — new app, endpoint, model, webhook.
|
|
506
|
-
|
|
507
|
-
| Command | Description |
|
|
508
|
-
|---------|-------------|
|
|
509
|
-
| `scaffold app <name> [--app_type] [--port]` | Scaffold a new deployable app via scripts/new-app. |
|
|
510
|
-
| `scaffold background-job <name> [--app_name]` | Scaffold an ARQ background job boilerplate. |
|
|
511
|
-
| `scaffold endpoint <app_name> <name>` | Scaffold a new API endpoint in an existing app. |
|
|
512
|
-
| `scaffold middleware <name> [--app_name]` | Scaffold a Starlette/FastAPI middleware boilerplate. |
|
|
513
|
-
| `scaffold migration <message> [--autogenerate]` | Generate an Alembic migration file. |
|
|
514
|
-
| `scaffold model <name> [--table]` | Scaffold a new SQLAlchemy model with Alembic migration. |
|
|
515
|
-
| `scaffold service <name> [--app_name]` | Scaffold a service class boilerplate file. |
|
|
516
|
-
| `scaffold webhook <name> [--port]` | Scaffold a new standalone webhook receiver app. |
|
|
517
|
-
|
|
518
|
-
### `kctl-api security`
|
|
519
|
-
|
|
520
|
-
Security — audit, secrets, CORS, headers, deps.
|
|
521
|
-
|
|
522
|
-
| Command | Description |
|
|
523
|
-
|---------|-------------|
|
|
524
|
-
| `security audit` | Run a combined security report: deps, secrets, and CORS. |
|
|
525
|
-
| `security cors` | Audit CORS configuration in the codebase. |
|
|
526
|
-
| `security deps` | Scan dependencies for known vulnerabilities (alias for: kctl-api deps audit). |
|
|
527
|
-
| `security headers [--url]` | Check security headers on a URL. |
|
|
528
|
-
| `security secrets [--path]` | Scan source code for potential secrets and credentials. |
|
|
529
|
-
|
|
530
|
-
### `kctl-api self-update`
|
|
531
|
-
|
|
532
|
-
Check for updates and upgrade kctl-api.
|
|
533
|
-
|
|
534
|
-
### `kctl-api services`
|
|
535
|
-
|
|
536
|
-
Docker Compose services — list, status, restart, logs.
|
|
537
|
-
|
|
538
|
-
| Command | Description |
|
|
539
|
-
|---------|-------------|
|
|
540
|
-
| `services down [--volumes]` | Stop and remove docker compose services. |
|
|
541
|
-
| `services list` | List all docker compose services and their status. |
|
|
542
|
-
| `services logs <service> [--follow] [--tail]` | View logs for a docker compose service. |
|
|
543
|
-
| `services restart <service>` | Restart a docker compose service. |
|
|
544
|
-
| `services status <service>` | Show status of a specific docker compose service. |
|
|
545
|
-
| `services up [--service] [--build] [--detach]` | Start docker compose services. |
|
|
546
|
-
|
|
547
|
-
### `kctl-api shell`
|
|
548
|
-
|
|
549
|
-
Interactive Python REPL with API context.
|
|
550
|
-
|
|
551
|
-
| Command | Description |
|
|
552
|
-
|---------|-------------|
|
|
553
|
-
| `shell api` | Start a Python REPL with an httpx client pre-loaded for API calls. |
|
|
554
|
-
| `shell db` | Start a Python REPL with an async SQLAlchemy DB session pre-loaded. |
|
|
555
|
-
| `shell redis` | Start a Python REPL with a Redis async client pre-loaded. |
|
|
556
|
-
| `shell start` | Start an interactive Python REPL with pre-loaded API client and helpers. |
|
|
557
|
-
|
|
558
|
-
### `kctl-api skill`
|
|
559
|
-
|
|
560
|
-
Claude Code skill management.
|
|
561
|
-
|
|
562
|
-
| Command | Description |
|
|
563
|
-
|---------|-------------|
|
|
564
|
-
| `skill generate [--output] [--install]` | Auto-generate SKILL.md from CLI command registry. |
|
|
565
|
-
|
|
566
|
-
### `kctl-api streams`
|
|
567
|
-
|
|
568
|
-
Redis Streams — list, read, trim, dead-letter.
|
|
569
|
-
|
|
570
|
-
| Command | Description |
|
|
571
|
-
|---------|-------------|
|
|
572
|
-
| `streams consumers <stream_name> <group>` | List consumers in a consumer group via XINFO CONSUMERS. |
|
|
573
|
-
| `streams dead-letter [--stream_name] [--count]` | Read messages from the dead-letter stream. |
|
|
574
|
-
| `streams list` | List all Redis Streams via SCAN for stream-type keys. |
|
|
575
|
-
| `streams read <stream_name> [--count] [--start]` | Read messages from a Redis Stream via XRANGE. |
|
|
576
|
-
| `streams replay <source_stream> <target_stream> [--count] [--force]` | Replay messages from one stream to another via XRANGE + XADD. |
|
|
577
|
-
| `streams trim <stream_name> [--maxlen] [--force]` | Trim a Redis Stream to a maximum length via XTRIM. |
|
|
578
|
-
|
|
579
|
-
### `kctl-api stripe`
|
|
580
|
-
|
|
581
|
-
Stripe integration — checkout, portal, webhooks.
|
|
582
|
-
|
|
583
|
-
| Command | Description |
|
|
584
|
-
|---------|-------------|
|
|
585
|
-
| `stripe checkout <price_id> [--success_url] [--cancel_url]` | Create a Stripe checkout session via POST /api/v1/stripe/checkout. |
|
|
586
|
-
| `stripe portal` | Create a Stripe customer portal session via POST /api/v1/stripe/portal. |
|
|
587
|
-
| `stripe webhook-status` | Check Stripe webhook endpoint status via GET /api/v1/stripe/webhook-status. |
|
|
588
|
-
|
|
589
|
-
### `kctl-api tenant-ai`
|
|
590
|
-
|
|
591
|
-
Tenant AI — chat, stream, history, usage.
|
|
592
|
-
|
|
593
|
-
| Command | Description |
|
|
594
|
-
|---------|-------------|
|
|
595
|
-
| `tenant-ai chat <message> [--tenant_id]` | Send a chat message to the tenant AI via POST /api/v1/tenant-ai/chat. |
|
|
596
|
-
| `tenant-ai history [--tenant_id] [--page] [--per_page]` | List tenant AI conversation history via GET /api/v1/tenant-ai/history. |
|
|
597
|
-
| `tenant-ai stream <message> [--tenant_id]` | Stream a chat response from the tenant AI via POST /api/v1/tenant-ai/chat/stream. |
|
|
598
|
-
| `tenant-ai usage [--tenant_id]` | Get tenant AI usage statistics via GET /api/v1/tenant-ai/usage. |
|
|
599
|
-
|
|
600
|
-
### `kctl-api test`
|
|
601
|
-
|
|
602
|
-
Test runner — run, coverage, watch.
|
|
603
|
-
|
|
604
|
-
| Command | Description |
|
|
605
|
-
|---------|-------------|
|
|
606
|
-
| `test coverage [--app_name]` | Run tests with coverage report via scripts/test --cov. |
|
|
607
|
-
| `test run [--app_name] [--verbose] [--marker] [--keyword]` | Run tests via scripts/test. |
|
|
608
|
-
| `test watch [--app_name]` | Run tests in watch mode (requires pytest-watch). |
|
|
609
|
-
|
|
610
|
-
### `kctl-api tr`
|
|
611
|
-
|
|
612
|
-
Alias: test run all
|
|
613
|
-
|
|
614
|
-
### `kctl-api tui`
|
|
615
|
-
|
|
616
|
-
Launch the interactive TUI.
|
|
617
|
-
|
|
618
|
-
Usage: `kctl-api tui [--profile]`
|
|
619
|
-
|
|
620
|
-
### `kctl-api ul`
|
|
621
|
-
|
|
622
|
-
Alias: users list
|
|
623
|
-
|
|
624
|
-
### `kctl-api users`
|
|
625
|
-
|
|
626
|
-
User management — list, create, update, delete, roles, tiers.
|
|
627
|
-
|
|
628
|
-
| Command | Description |
|
|
629
|
-
|---------|-------------|
|
|
630
|
-
| `users create <email> <name> [--password]` | Create a new user via POST /api/v1/auth/register. |
|
|
631
|
-
| `users delete <identifier> [--force]` | Soft-delete a user via DELETE /api/v1/users/{id}. |
|
|
632
|
-
| `users get <identifier>` | Get detailed user information by ID or email. |
|
|
633
|
-
| `users list [--page] [--per_page] [--search]` | List users with pagination and optional search. |
|
|
634
|
-
| `users set-role <identifier> <role>` | Set user role via PATCH /api/v1/users/{id}. |
|
|
635
|
-
| `users set-tier <identifier> <tier>` | Set user tier via PATCH /api/v1/users/{id}. |
|
|
636
|
-
| `users update <identifier> [--name] [--email]` | Update user fields via PATCH /api/v1/users/{id}. |
|
|
637
|
-
|
|
638
|
-
### `kctl-api webhooks`
|
|
639
|
-
|
|
640
|
-
Webhook management — recent, replay, verify.
|
|
641
|
-
|
|
642
|
-
| Command | Description |
|
|
643
|
-
|---------|-------------|
|
|
644
|
-
| `webhooks recent [--limit] [--source]` | List recent webhook deliveries (requires webhook audit API — not yet available). |
|
|
645
|
-
| `webhooks replay <webhook_id>` | Replay a webhook delivery (requires webhook audit API — not yet available). |
|
|
646
|
-
| `webhooks verify <source>` | Verify webhook signature configuration (requires webhook audit API — not yet available). |
|
|
647
|
-
|
|
648
|
-
### `kctl-api workflows`
|
|
649
|
-
|
|
650
|
-
Workflow management — start, status, list.
|
|
651
|
-
|
|
652
|
-
| Command | Description |
|
|
653
|
-
|---------|-------------|
|
|
654
|
-
| `workflows list [--page] [--per_page]` | List workflow runs via GET /api/v1/workflows. |
|
|
655
|
-
| `workflows start <workflow_name> [--data_json]` | Start a new workflow run via POST /api/v1/workflows/start. |
|
|
656
|
-
| `workflows status <run_id>` | Check workflow run status via GET /api/v1/workflows/{run_id}. |
|
|
657
|
-
|
|
658
|
-
### `kctl-api ws`
|
|
659
|
-
|
|
660
|
-
WebSocket testing — connect, send, listen, load-test.
|
|
661
|
-
|
|
662
|
-
| Command | Description |
|
|
663
|
-
|---------|-------------|
|
|
664
|
-
| `ws connect <endpoint> [--token]` | Open a WebSocket connection and show the handshake. |
|
|
665
|
-
| `ws listen <endpoint> [--duration] [--token]` | Listen for incoming WebSocket messages for a duration. |
|
|
666
|
-
| `ws load-test <endpoint> [--connections] [--duration] [--token]` | Concurrent WebSocket connection load test. |
|
|
667
|
-
| `ws send <endpoint> <message> [--token] [--timeout]` | Send a message over WebSocket and show the response. |
|
|
668
|
-
|
|
669
|
-
## Configuration
|
|
670
|
-
|
|
671
|
-
Shared config: `~/.config/kodemeio/config.yaml`
|
|
672
|
-
|
|
673
|
-
```bash
|
|
674
|
-
kctl-api config init # Interactive setup
|
|
675
|
-
kctl-api config show # Show current config
|
|
676
|
-
kctl-api config profiles # List profiles
|
|
677
|
-
kctl-api config current # Show active profile
|
|
678
|
-
kctl-api config validate # Verify config
|
|
679
|
-
```
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"""Skill generation for Claude Code integration."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
from typing import Annotated
|
|
7
|
-
|
|
8
|
-
import typer
|
|
9
|
-
|
|
10
|
-
from kctl_api.core.callbacks import AppContext
|
|
11
|
-
|
|
12
|
-
app = typer.Typer(help="Claude Code skill management.")
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@app.command()
|
|
16
|
-
def generate(
|
|
17
|
-
ctx: typer.Context,
|
|
18
|
-
output: Annotated[str, typer.Option("--output", "-o", help="Output directory")] = "",
|
|
19
|
-
install: Annotated[bool, typer.Option("--install", help="Install to ~/.claude/skills/")] = False,
|
|
20
|
-
) -> None:
|
|
21
|
-
"""Auto-generate SKILL.md from CLI command registry."""
|
|
22
|
-
actx: AppContext = ctx.obj
|
|
23
|
-
out = actx.output
|
|
24
|
-
from kctl_lib.skill_generator import generate_skill
|
|
25
|
-
|
|
26
|
-
from kctl_api.cli import app as cli_app
|
|
27
|
-
|
|
28
|
-
skill_name = "api-admin"
|
|
29
|
-
description = "FastAPI platform management via kctl-api CLI"
|
|
30
|
-
|
|
31
|
-
# Canonical in-repo skill dir — source of SKILL.extra.md regardless
|
|
32
|
-
# of where output goes. Without this, --install writes to
|
|
33
|
-
# ~/.claude/skills/ and the handwritten runbook vanishes.
|
|
34
|
-
cli_root = Path(__file__).resolve().parents[3]
|
|
35
|
-
source_dir = cli_root / "skills" / skill_name
|
|
36
|
-
|
|
37
|
-
# Determine output directory
|
|
38
|
-
if output:
|
|
39
|
-
output_dir = Path(output)
|
|
40
|
-
elif install:
|
|
41
|
-
output_dir = Path.home() / ".claude" / "skills" / skill_name
|
|
42
|
-
else:
|
|
43
|
-
output_dir = source_dir
|
|
44
|
-
|
|
45
|
-
# Extra content always lives at the in-repo location.
|
|
46
|
-
extra = source_dir / "SKILL.extra.md"
|
|
47
|
-
|
|
48
|
-
generate_skill(
|
|
49
|
-
cli_app,
|
|
50
|
-
"kctl-api",
|
|
51
|
-
skill_name,
|
|
52
|
-
description,
|
|
53
|
-
output_dir=output_dir,
|
|
54
|
-
extra_file=extra if extra.exists() else None,
|
|
55
|
-
)
|
|
56
|
-
out.success(f"Generated {output_dir / 'SKILL.md'}")
|
|
57
|
-
if install:
|
|
58
|
-
out.success(f"Installed to ~/.claude/skills/{skill_name}/")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|