kctl-react 0.6.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.
Files changed (122) hide show
  1. kctl_react-0.6.2/.gitignore +8 -0
  2. kctl_react-0.6.2/PKG-INFO +17 -0
  3. kctl_react-0.6.2/README.md +253 -0
  4. kctl_react-0.6.2/e2e/.gitignore +3 -0
  5. kctl_react-0.6.2/e2e/README.md +28 -0
  6. kctl_react-0.6.2/e2e/fixtures/auth.ts +15 -0
  7. kctl_react-0.6.2/e2e/package.json +15 -0
  8. kctl_react-0.6.2/e2e/playwright.config.ts +15 -0
  9. kctl_react-0.6.2/e2e/tests/smoke/connectivity.spec.ts +14 -0
  10. kctl_react-0.6.2/pyproject.toml +45 -0
  11. kctl_react-0.6.2/skills/react-dev/SKILL.md +288 -0
  12. kctl_react-0.6.2/src/kctl_react/__init__.py +3 -0
  13. kctl_react-0.6.2/src/kctl_react/__main__.py +5 -0
  14. kctl_react-0.6.2/src/kctl_react/cli.py +201 -0
  15. kctl_react-0.6.2/src/kctl_react/commands/__init__.py +0 -0
  16. kctl_react-0.6.2/src/kctl_react/commands/a11y.py +78 -0
  17. kctl_react-0.6.2/src/kctl_react/commands/affected.py +170 -0
  18. kctl_react-0.6.2/src/kctl_react/commands/apps.py +353 -0
  19. kctl_react-0.6.2/src/kctl_react/commands/build.py +376 -0
  20. kctl_react-0.6.2/src/kctl_react/commands/bundle_cmd.py +217 -0
  21. kctl_react-0.6.2/src/kctl_react/commands/cap.py +1465 -0
  22. kctl_react-0.6.2/src/kctl_react/commands/clean.py +76 -0
  23. kctl_react-0.6.2/src/kctl_react/commands/codegen.py +491 -0
  24. kctl_react-0.6.2/src/kctl_react/commands/compliance.py +587 -0
  25. kctl_react-0.6.2/src/kctl_react/commands/config_cmd.py +368 -0
  26. kctl_react-0.6.2/src/kctl_react/commands/dashboard.py +163 -0
  27. kctl_react-0.6.2/src/kctl_react/commands/deploy.py +318 -0
  28. kctl_react-0.6.2/src/kctl_react/commands/deps.py +792 -0
  29. kctl_react-0.6.2/src/kctl_react/commands/dev.py +96 -0
  30. kctl_react-0.6.2/src/kctl_react/commands/docker_cmd.py +73 -0
  31. kctl_react-0.6.2/src/kctl_react/commands/doctor.py +170 -0
  32. kctl_react-0.6.2/src/kctl_react/commands/e2e.py +343 -0
  33. kctl_react-0.6.2/src/kctl_react/commands/env.py +155 -0
  34. kctl_react-0.6.2/src/kctl_react/commands/i18n.py +310 -0
  35. kctl_react-0.6.2/src/kctl_react/commands/lint.py +306 -0
  36. kctl_react-0.6.2/src/kctl_react/commands/maintenance.py +308 -0
  37. kctl_react-0.6.2/src/kctl_react/commands/monitor_cmd.py +50 -0
  38. kctl_react-0.6.2/src/kctl_react/commands/observe.py +34 -0
  39. kctl_react-0.6.2/src/kctl_react/commands/packages.py +129 -0
  40. kctl_react-0.6.2/src/kctl_react/commands/perf.py +762 -0
  41. kctl_react-0.6.2/src/kctl_react/commands/pipeline.py +289 -0
  42. kctl_react-0.6.2/src/kctl_react/commands/pwa.py +193 -0
  43. kctl_react-0.6.2/src/kctl_react/commands/scaffold.py +323 -0
  44. kctl_react-0.6.2/src/kctl_react/commands/security.py +660 -0
  45. kctl_react-0.6.2/src/kctl_react/commands/skill_cmd.py +54 -0
  46. kctl_react-0.6.2/src/kctl_react/commands/state.py +254 -0
  47. kctl_react-0.6.2/src/kctl_react/commands/test_cmd.py +418 -0
  48. kctl_react-0.6.2/src/kctl_react/commands/ui_audit.py +889 -0
  49. kctl_react-0.6.2/src/kctl_react/core/__init__.py +0 -0
  50. kctl_react-0.6.2/src/kctl_react/core/analyzers.py +200 -0
  51. kctl_react-0.6.2/src/kctl_react/core/callbacks.py +70 -0
  52. kctl_react-0.6.2/src/kctl_react/core/compliance/__init__.py +3 -0
  53. kctl_react-0.6.2/src/kctl_react/core/compliance/api_check/__init__.py +3 -0
  54. kctl_react-0.6.2/src/kctl_react/core/compliance/api_check/checks/__init__.py +18 -0
  55. kctl_react-0.6.2/src/kctl_react/core/compliance/api_check/checks/endpoints.py +53 -0
  56. kctl_react-0.6.2/src/kctl_react/core/compliance/api_check/checks/envelope.py +44 -0
  57. kctl_react-0.6.2/src/kctl_react/core/compliance/api_check/checks/naming.py +60 -0
  58. kctl_react-0.6.2/src/kctl_react/core/compliance/api_check/checks/params.py +44 -0
  59. kctl_react-0.6.2/src/kctl_react/core/compliance/api_check/checks/requests.py +57 -0
  60. kctl_react-0.6.2/src/kctl_react/core/compliance/api_check/checks/types.py +55 -0
  61. kctl_react-0.6.2/src/kctl_react/core/compliance/api_check/hooks.py +133 -0
  62. kctl_react-0.6.2/src/kctl_react/core/compliance/api_check/matcher.py +55 -0
  63. kctl_react-0.6.2/src/kctl_react/core/compliance/api_check/schema.py +151 -0
  64. kctl_react-0.6.2/src/kctl_react/core/compliance/api_health/__init__.py +35 -0
  65. kctl_react-0.6.2/src/kctl_react/core/compliance/api_health/checks/__init__.py +9 -0
  66. kctl_react-0.6.2/src/kctl_react/core/compliance/api_health/checks/auth.py +72 -0
  67. kctl_react-0.6.2/src/kctl_react/core/compliance/api_health/checks/reachable.py +44 -0
  68. kctl_react-0.6.2/src/kctl_react/core/compliance/api_health/checks/response.py +55 -0
  69. kctl_react-0.6.2/src/kctl_react/core/compliance/api_health/checks/timing.py +38 -0
  70. kctl_react-0.6.2/src/kctl_react/core/compliance/api_health/client.py +99 -0
  71. kctl_react-0.6.2/src/kctl_react/core/compliance/api_health/sampler.py +16 -0
  72. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/__init__.py +47 -0
  73. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/api.py +101 -0
  74. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/codegen.py +94 -0
  75. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/darkmode.py +57 -0
  76. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/errors.py +68 -0
  77. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/features.py +66 -0
  78. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/i18n_check.py +105 -0
  79. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/imports.py +86 -0
  80. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/navigation.py +62 -0
  81. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/practices.py +122 -0
  82. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/providers.py +85 -0
  83. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/pwa.py +101 -0
  84. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/responsive.py +47 -0
  85. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/scripts.py +85 -0
  86. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/shadcn.py +51 -0
  87. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/structure.py +76 -0
  88. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/testing.py +83 -0
  89. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/theme.py +92 -0
  90. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/ui_standard.py +185 -0
  91. kctl_react-0.6.2/src/kctl_react/core/compliance/checks/vite.py +83 -0
  92. kctl_react-0.6.2/src/kctl_react/core/compliance/engine.py +87 -0
  93. kctl_react-0.6.2/src/kctl_react/core/compliance/exceptions_map.py +15 -0
  94. kctl_react-0.6.2/src/kctl_react/core/compliance/fixes/__init__.py +33 -0
  95. kctl_react-0.6.2/src/kctl_react/core/compliance/fixes/codegen_fix.py +28 -0
  96. kctl_react-0.6.2/src/kctl_react/core/compliance/fixes/i18n_fix.py +61 -0
  97. kctl_react-0.6.2/src/kctl_react/core/compliance/fixes/imports_fix.py +36 -0
  98. kctl_react-0.6.2/src/kctl_react/core/compliance/fixes/structure_fix.py +20 -0
  99. kctl_react-0.6.2/src/kctl_react/core/compliance/fixes/theme_fix.py +29 -0
  100. kctl_react-0.6.2/src/kctl_react/core/compliance/models.py +106 -0
  101. kctl_react-0.6.2/src/kctl_react/core/config.py +201 -0
  102. kctl_react-0.6.2/src/kctl_react/core/discovery.py +185 -0
  103. kctl_react-0.6.2/src/kctl_react/core/exceptions.py +17 -0
  104. kctl_react-0.6.2/src/kctl_react/core/git.py +146 -0
  105. kctl_react-0.6.2/src/kctl_react/core/history.py +121 -0
  106. kctl_react-0.6.2/src/kctl_react/core/output.py +5 -0
  107. kctl_react-0.6.2/src/kctl_react/core/plugins.py +13 -0
  108. kctl_react-0.6.2/src/kctl_react/core/runner.py +34 -0
  109. kctl_react-0.6.2/src/kctl_react/py.typed +0 -0
  110. kctl_react-0.6.2/tests/__init__.py +0 -0
  111. kctl_react-0.6.2/tests/conftest.py +299 -0
  112. kctl_react-0.6.2/tests/test_analyzers.py +182 -0
  113. kctl_react-0.6.2/tests/test_api_check.py +652 -0
  114. kctl_react-0.6.2/tests/test_api_health.py +409 -0
  115. kctl_react-0.6.2/tests/test_cap.py +469 -0
  116. kctl_react-0.6.2/tests/test_commands.py +1342 -0
  117. kctl_react-0.6.2/tests/test_compliance.py +1210 -0
  118. kctl_react-0.6.2/tests/test_config.py +156 -0
  119. kctl_react-0.6.2/tests/test_exceptions.py +58 -0
  120. kctl_react-0.6.2/tests/test_output.py +77 -0
  121. kctl_react-0.6.2/tests/test_pipeline.py +142 -0
  122. kctl_react-0.6.2/tests/test_runner.py +40 -0
@@ -0,0 +1,8 @@
1
+ __pycache__/
2
+ *.pyc
3
+ .venv/
4
+ *.egg-info/
5
+ dist/
6
+ .pytest_cache/
7
+ .mypy_cache/
8
+ .ruff_cache/
@@ -0,0 +1,17 @@
1
+ Metadata-Version: 2.4
2
+ Name: kctl-react
3
+ Version: 0.6.2
4
+ Summary: Kodemeio React CLI — manage the kodemeio-react monorepo
5
+ Requires-Python: >=3.12
6
+ Requires-Dist: httpx>=0.28.0
7
+ Requires-Dist: kctl-lib>=0.8.0
8
+ Requires-Dist: pydantic>=2.10.0
9
+ Requires-Dist: pyyaml>=6.0.2
10
+ Requires-Dist: rich>=13.9.0
11
+ Requires-Dist: typer>=0.15.0
12
+ Provides-Extra: dev
13
+ Requires-Dist: mypy>=1.14.0; extra == 'dev'
14
+ Requires-Dist: pytest-httpx>=0.35.0; extra == 'dev'
15
+ Requires-Dist: pytest>=8.3.0; extra == 'dev'
16
+ Requires-Dist: ruff>=0.9.0; extra == 'dev'
17
+ Requires-Dist: types-pyyaml>=6.0.0; extra == 'dev'
@@ -0,0 +1,253 @@
1
+ # kctl-react
2
+
3
+ Kodemeio React Monorepo CLI — manage 11 Vite PWAs + 14 shared packages.
4
+
5
+ Part of the kctl-\* CLI ecosystem (alongside kctl-ak, kctl-odoo, kctl-pg, etc.), built with Python + Typer + Rich.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ cd cli && uv tool install .
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ ```bash
16
+ kctl-react dashboard # Full monorepo overview
17
+ kctl-react apps list # List all 11 apps
18
+ kctl-react doctor # Comprehensive health check
19
+ kctl-react info # Quick project info
20
+ ```
21
+
22
+ ## Command Groups
23
+
24
+ | Group | Key Subcommands | Purpose |
25
+ | ------------- | ------------------------------------------------------------------------- | ---------------------------------------- |
26
+ | `apps` | `list`, `ports`, `status`, `health --watch`, `info`, `dashboard`, `doctor`, `clean` | App inventory, health & routing |
27
+ | `dev` | `start`, `logs`, `list` | Dev server management |
28
+ | `build` | `[app] --analyze`, `size`, `compare`, `history`, `chunks`, `bundle` | Production builds + bundle analysis |
29
+ | `test` | `[app] --coverage --watch`, `count`, `summary`, `coverage`, `naming`, `threshold`, `snapshots` | Vitest testing |
30
+ | `lint` | `[app] --fix`, `format --check`, `strict-check`, `tsconfig-audit`, `conventions` | ESLint + TypeScript + Prettier |
31
+ | `codegen` | `[app]`, `status`, `diff`, `endpoints`, `verify`, `drift`, `schema-health` | OpenAPI type generation |
32
+ | `deps` | `outdated`, `audit`, `graph`, `list`, `why`, `duplicates`, `size`, `upgrade`, `stack`, `health` | Dependency management |
33
+ | `env` | `show`, `diff`, `validate` | .env management |
34
+ | `scaffold` | `page`, `hook`, `form`, `test`, `component` | Code scaffolding |
35
+ | `deploy` | `build`, `status`, `logs`, `down --force`, `images`, `ps`, `readiness` | Docker Compose deployment |
36
+ | `packages` | `list`, `consumers`, `size` | Shared package inspection |
37
+ | `clean` | `[app] --all` | Clean build artifacts |
38
+ | `pwa` | `status`, `cache-list`, `cache-clear`, `manifest-validate`, `offline-report`, `sw-info` | PWA / service worker management |
39
+ | `e2e` | `test`, `list`, `report`, `discover`, `install`, `screenshots` | Playwright E2E testing |
40
+ | `perf` | `lighthouse`, `history`, `pwa`, `bundle`, `vitals`, `images`, `fonts` | Performance & Core Web Vitals |
41
+ | `security` | `audit`, `scan`, `secrets`, `headers`, `licenses`, `report` | Security & license scanning |
42
+ | `a11y` | `audit`, `report`, `violations` | Accessibility audits (axe-core) |
43
+ | `i18n` | `coverage`, `missing`, `unused`, `sort`, `diff`, `validate`, `interpolation`, `sync-stub` | i18n key management |
44
+ | `state` | `query-keys`, `consistency`, `hooks-audit`, `invalidation-map` | TanStack Query state analysis |
45
+ | `bundle` | `budget`, `duplicates`, `treeshake`, `compare`, `impact` | Bundle budget & tree-shaking |
46
+ | `ui` | `audit`, `compliance`, `anti-patterns`, `components`, `theme-check`, `add`, `diff`, `search`, `docs`, `preset` | shadcn/ui component audit |
47
+ | `observe` | `sentry`, `errors`, `uptime` | Error tracking & uptime observability |
48
+ | `monitor` | `health`, `ssl` | HTTP health + SSL certificate checks |
49
+ | `affected` | `[default]`, `test`, `build`, `lint` | Turborepo affected graph queries |
50
+ | `pipeline` | `gate`, `affected-gate`, `release` | CI/CD pipeline gates |
51
+ | `cap` | `status`, `doctor`, `init`, `add`, `sync`, `run`, `open`, `build`, `dev`, `devices` | Capacitor native mobile |
52
+ | `docker` | `ps`, `logs`, `restart`, `image-size` | Docker container management |
53
+ | `maintenance` | `health-report`, `cleanup`, `dr-status`, `count-test-files`, `deps-sync` | Repo maintenance & DR checks |
54
+ | `compliance` | `audit`, `fix`, `prompt`, `api-check`, `api-health` | Compliance policy enforcement |
55
+ | `doctor` | `check` | Comprehensive health check |
56
+ | `dashboard` | `show --watch --interval` | Monorepo overview |
57
+ | `config` | `init`, `add`, `use`, `show`, `set`, `validate`, `remove`, `profiles`, `current` | Profile management |
58
+ | `skill` | `generate` | Auto-generate SKILL.md from CLI |
59
+ | `info` | | Quick project summary |
60
+
61
+ ## Monorepo Architecture
62
+
63
+ kctl-react manages a **Turborepo monorepo** with Vite PWAs, shared packages, and Docker-based deployments:
64
+
65
+ ```
66
+ kodemeio-react/
67
+ ├── apps/ # 11 Vite PWA apps (+ optional Next.js)
68
+ │ ├── sfa/ # Sales Force Automation
69
+ │ ├── hrms/ # Human Resource Management
70
+ │ ├── iam/ # Identity & Access Management
71
+ │ ├── fin/ # Finance & Accounting
72
+ │ ├── inv/ # Inventory & Warehouse
73
+ │ ├── crm/ # Customer Relationship Management
74
+ │ ├── ops/ # Operations Management
75
+ │ ├── procurement/ # Procurement & Purchasing
76
+ │ ├── pos/ # Point of Sale
77
+ │ ├── dashboard/ # Executive Dashboard
78
+ │ └── portal/ # Customer/Vendor Portal
79
+ ├── packages/ # 14 shared packages
80
+ │ ├── ui/ # shadcn/ui component library
81
+ │ ├── api-client/ # Generated OpenAPI clients
82
+ │ ├── auth/ # Authentik OIDC integration
83
+ │ ├── i18n/ # i18next translations
84
+ │ ├── hooks/ # Shared React hooks
85
+ │ ├── utils/ # Shared utilities
86
+ │ └── ... # Additional domain packages
87
+ ├── turbo.json # Turborepo pipeline config
88
+ ├── pnpm-workspace.yaml # pnpm workspace definition
89
+ └── docker-compose.yml # Multi-app compose (nginx routing)
90
+ ```
91
+
92
+ ### Tech Stack
93
+
94
+ | Layer | Technology |
95
+ |-------|-----------|
96
+ | Bundler | Vite 6 |
97
+ | Framework | React 19 + TypeScript (strict) |
98
+ | Styling | Tailwind CSS v4 |
99
+ | Components | shadcn/ui |
100
+ | Server state | TanStack Query v5 |
101
+ | Forms | react-hook-form + zod |
102
+ | PWA | vite-plugin-pwa (Workbox) |
103
+ | E2E | Playwright |
104
+ | Testing | Vitest |
105
+ | Monorepo | Turborepo + pnpm workspaces |
106
+ | API clients | OpenAPI-generated (never hand-written) |
107
+
108
+ ## 11 PWA Apps Overview
109
+
110
+ Each app is a full Vite PWA with service worker, offline support, and OIDC authentication via Authentik:
111
+
112
+ | App | Domain Pattern | Description |
113
+ |-----|---------------|-------------|
114
+ | `sfa` | sfa.{tenant}.com | Sales Force Automation — orders, pipelines, visits |
115
+ | `hrms` | hrms.{tenant}.com | Human Resources — employees, attendance, payroll |
116
+ | `iam` | iam.{tenant}.com | Identity & Access — roles, users, permissions |
117
+ | `fin` | fin.{tenant}.com | Finance — invoices, payments, journals |
118
+ | `inv` | inv.{tenant}.com | Inventory — stock moves, warehouses, lots |
119
+ | `crm` | crm.{tenant}.com | CRM — leads, opportunities, pipelines |
120
+ | `ops` | ops.{tenant}.com | Operations — projects, tasks, timesheets |
121
+ | `procurement` | proc.{tenant}.com | Procurement — RFQs, purchase orders, vendors |
122
+ | `pos` | pos.{tenant}.com | Point of Sale — sessions, orders, payments |
123
+ | `dashboard` | dash.{tenant}.com | Executive dashboards — KPIs, charts |
124
+ | `portal` | portal.{tenant}.com | Customer/vendor self-service portal |
125
+
126
+ All apps connect to the `kctl-api` FastAPI backend and Odoo 18 via generated API clients.
127
+
128
+ ## Global Options
129
+
130
+ ```bash
131
+ kctl-react [OPTIONS] COMMAND [ARGS]...
132
+ ```
133
+
134
+ | Option | Short | Description |
135
+ |--------|-------|-------------|
136
+ | `--json` | | Machine-readable JSON output (data to stdout, status to stderr) |
137
+ | `--quiet` | `-q` | Suppress info messages |
138
+ | `--profile NAME` | `-p` | Config profile name |
139
+ | `--root PATH` | | Monorepo root override (auto-detects from `turbo.json`) |
140
+ | `--format FORMAT` | `-f` | Output format: `pretty`, `json`, `csv`, `yaml` |
141
+ | `--no-header` | | Omit header row in CSV output |
142
+ | `--version` | `-V` | Show version and exit |
143
+
144
+ ## Shell Completions
145
+
146
+ ```bash
147
+ # Install completions (run once)
148
+ kctl-react --install-completion
149
+
150
+ # Or generate and source manually
151
+ kctl-react --show-completion zsh # zsh
152
+ kctl-react --show-completion bash # bash
153
+ kctl-react --show-completion fish # fish
154
+ ```
155
+
156
+ Completions are generated by Typer and cover all command groups, subcommands, and flags.
157
+
158
+ ## Configuration
159
+
160
+ Shared config at `~/.config/kodemeio/config.yaml` (same file as kctl-ak, kctl-odoo, etc.):
161
+
162
+ ```yaml
163
+ default_profile: default
164
+ profiles:
165
+ default:
166
+ react:
167
+ project_root: /path/to/kodemeio-react
168
+ api_url: https://api.kodeme.io
169
+ mac:
170
+ react:
171
+ project_root: /path/to/kodemeio-react
172
+ api_url: https://api.mandiriagro.com
173
+ ```
174
+
175
+ Auto-detects project root from `turbo.json` when not configured.
176
+
177
+ ### Config Commands
178
+
179
+ ```bash
180
+ kctl-react config init # Initialize config profile
181
+ kctl-react config add --profile mac # Add a new profile
182
+ kctl-react config use mac # Switch active profile
183
+ kctl-react config show # Show current config (secrets masked)
184
+ kctl-react config validate # Validate config file
185
+ kctl-react config profiles # List all profiles
186
+ kctl-react config current # Show active profile name
187
+ ```
188
+
189
+ ## Common Workflows
190
+
191
+ ```bash
192
+ # Daily development
193
+ kctl-react dev start sfa # Start SFA dev server
194
+ kctl-react dev logs sfa # Follow dev server logs
195
+ kctl-react apps health --watch # Watch app health status
196
+
197
+ # Build & test
198
+ kctl-react build sfa --analyze # Build with bundle analyzer
199
+ kctl-react test sfa --coverage # Test with coverage report
200
+ kctl-react lint sfa --fix # Lint + auto-fix
201
+
202
+ # Code generation
203
+ kctl-react codegen sfa # Regenerate OpenAPI types
204
+ kctl-react codegen drift # Detect API drift vs spec
205
+
206
+ # E2E testing
207
+ kctl-react e2e install # Install Playwright + browsers
208
+ kctl-react e2e test --app sfa # Run E2E tests for SFA
209
+ kctl-react e2e screenshots # Screenshot all apps
210
+
211
+ # Performance
212
+ kctl-react perf lighthouse sfa # Lighthouse audit
213
+ kctl-react perf vitals sfa # Core Web Vitals check
214
+
215
+ # Security
216
+ kctl-react security audit # pnpm audit (vulnerabilities)
217
+ kctl-react security secrets # Scan for hardcoded secrets
218
+ kctl-react security licenses # License compliance check
219
+
220
+ # PWA management
221
+ kctl-react pwa status sfa # Service worker status
222
+ kctl-react pwa manifest-validate sfa # Validate PWA manifest
223
+
224
+ # Deployment
225
+ kctl-react deploy build sfa # Build Docker image
226
+ kctl-react deploy status # Show running containers
227
+ kctl-react deploy logs sfa # Container logs
228
+ ```
229
+
230
+ ## Development
231
+
232
+ ```bash
233
+ cd cli
234
+ uv run --extra dev pytest tests/ -v # Run 73 tests
235
+ uv run --extra dev ruff check src/ # Lint
236
+ uv run --extra dev mypy src/ # Type check
237
+ ```
238
+
239
+ ## Architecture
240
+
241
+ Follows the kctl-\* ecosystem pattern:
242
+
243
+ ```
244
+ cli/src/kctl_react/
245
+ ├── core/ # Config, output, callbacks, runner, exceptions
246
+ ├── commands/ # One file per command group (31 groups)
247
+ ├── cli.py # Main Typer app + command registration
248
+ └── py.typed # PEP 561 marker
249
+ ```
250
+
251
+ Each command module registers a Typer sub-app that is mounted in `cli.py`. The `AppContext` dataclass (in `core/callbacks.py`) carries lazy-initialized `Output`, resolved `project_root`, and discovered `apps`/`packages` maps across all commands.
252
+
253
+ Third-party plugins are auto-discovered via `kctl_react.plugins` entry points — external packages can add new command groups without modifying this repo.
@@ -0,0 +1,3 @@
1
+ node_modules/
2
+ playwright-report/
3
+ test-results/
@@ -0,0 +1,28 @@
1
+ # kctl-react E2E Tests
2
+
3
+ Playwright-based E2E tests for kctl-react against the kodemeio-react monorepo.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ pnpm install
9
+ pnpm run install-browsers
10
+ ```
11
+
12
+ ## Run
13
+
14
+ ```bash
15
+ # Point at local monorepo checkout
16
+ export REACT_MONOREPO_PATH=/path/to/kodemeio-react
17
+ pnpm test
18
+
19
+ # Smoke tests only
20
+ pnpm test:smoke
21
+
22
+ # Visible browser
23
+ pnpm test:headed
24
+ ```
25
+
26
+ ## Env Vars
27
+
28
+ - `REACT_MONOREPO_PATH` — Absolute path to the kodemeio-react monorepo checkout
@@ -0,0 +1,15 @@
1
+ import { test as base } from "@playwright/test";
2
+
3
+ export interface AuthFixtures {
4
+ monorepoPath: string;
5
+ }
6
+
7
+ export const test = base.extend<AuthFixtures>({
8
+ monorepoPath: async ({}, use) => {
9
+ const path = process.env.REACT_MONOREPO_PATH;
10
+ if (!path) throw new Error("REACT_MONOREPO_PATH env var required");
11
+ await use(path);
12
+ },
13
+ });
14
+
15
+ export { expect } from "@playwright/test";
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "kctl-react-e2e",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "test": "playwright test",
7
+ "test:smoke": "playwright test --project=smoke",
8
+ "test:headed": "playwright test --headed",
9
+ "install-browsers": "playwright install chromium"
10
+ },
11
+ "devDependencies": {
12
+ "@playwright/test": "^1.48.0",
13
+ "typescript": "^5.5.0"
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ import { defineConfig } from "@playwright/test";
2
+
3
+ export default defineConfig({
4
+ testDir: "./tests",
5
+ timeout: 60_000,
6
+ retries: 1,
7
+ reporter: "list",
8
+ use: {
9
+ baseURL: process.env.REACT_MONOREPO_PATH || ".",
10
+ },
11
+ projects: [
12
+ { name: "smoke", testMatch: /smoke\/.*\.spec\.ts/ },
13
+ { name: "scenarios", testMatch: /scenarios\/.*\.spec\.ts/ },
14
+ ],
15
+ });
@@ -0,0 +1,14 @@
1
+ import { test, expect } from "@playwright/test";
2
+ import { execFileSync } from "node:child_process";
3
+
4
+ test.describe("kctl-react CLI", () => {
5
+ test.skip(!process.env.REACT_MONOREPO_PATH, "REACT_MONOREPO_PATH not set");
6
+
7
+ test("can list apps in monorepo", async () => {
8
+ const output = execFileSync("kctl-react", ["apps", "list"], {
9
+ cwd: process.env.REACT_MONOREPO_PATH,
10
+ encoding: "utf-8",
11
+ });
12
+ expect(output).toContain("sfa");
13
+ });
14
+ });
@@ -0,0 +1,45 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "kctl-react"
7
+ version = "0.6.2"
8
+ description = "Kodemeio React CLI — manage the kodemeio-react monorepo"
9
+ requires-python = ">=3.12"
10
+ dependencies = [
11
+ "kctl-lib>=0.8.0",
12
+ "typer>=0.15.0",
13
+ "rich>=13.9.0",
14
+ "pydantic>=2.10.0",
15
+ "pyyaml>=6.0.2",
16
+ "httpx>=0.28.0",
17
+ ]
18
+
19
+ [project.optional-dependencies]
20
+ dev = [
21
+ "pytest>=8.3.0",
22
+ "pytest-httpx>=0.35.0",
23
+ "ruff>=0.9.0",
24
+ "mypy>=1.14.0",
25
+ "types-PyYAML>=6.0.0",
26
+ ]
27
+
28
+ [project.scripts]
29
+ kctl-react = "kctl_react.cli:app"
30
+
31
+ [tool.uv.sources]
32
+ kctl-lib = { workspace = true }
33
+
34
+ [project.entry-points."kctl_react.plugins"]
35
+
36
+ [tool.hatch.build.targets.wheel]
37
+ packages = ["src/kctl_react"]
38
+
39
+ [tool.ruff]
40
+ target-version = "py312"
41
+ line-length = 120
42
+
43
+ [tool.mypy]
44
+ python_version = "3.12"
45
+ strict = true