simple-module-cli 0.0.45__tar.gz → 0.0.47__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 (218) hide show
  1. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/PKG-INFO +1 -1
  2. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/pyproject.toml +1 -1
  3. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/_add_install.py +36 -3
  4. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/_lint_tooling.py +2 -3
  5. simple_module_cli-0.0.47/simple_module_cli/_project_cli_check.py +84 -0
  6. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/cli.py +55 -23
  7. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/module_cmd.py +2 -0
  8. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/new.py +79 -31
  9. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/scaffolding.py +5 -4
  10. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-cli/SKILL.md +11 -5
  11. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-conventions/SKILL.md +1 -1
  12. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-creating/SKILL.md +8 -2
  13. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/docker/host-flat.Dockerfile +4 -1
  14. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/docker/host.Dockerfile +4 -1
  15. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/Makefile +4 -2
  16. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/client_app/pages/Landing.tsx +3 -3
  17. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/pyproject.toml.tpl +2 -1
  18. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/README.md.tpl +7 -0
  19. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/workspace/Makefile +7 -4
  20. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/workspace/README.md.tpl +4 -2
  21. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/workspace/pyproject.toml.tpl +13 -2
  22. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_add_cmd.py +12 -1
  23. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_add_workspace_member.py +35 -5
  24. simple_module_cli-0.0.47/tests/test_cli_app_install_flow.py +64 -0
  25. simple_module_cli-0.0.47/tests/test_cli_module_pages_keyed.py +57 -0
  26. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_new_migration_bootstrap.py +3 -2
  27. simple_module_cli-0.0.47/tests/test_cli_new_quiet_install.py +128 -0
  28. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_new_scaffold_layout.py +13 -1
  29. simple_module_cli-0.0.47/tests/test_cli_project_cli_check.py +108 -0
  30. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_module_cmd_verify.py +2 -2
  31. simple_module_cli-0.0.47/tests/test_scaffolded_host_admin_overview.py +38 -0
  32. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/.gitignore +0 -0
  33. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/LICENSE +0 -0
  34. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/README.md +0 -0
  35. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/__init__.py +0 -0
  36. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/_add_sources.py +0 -0
  37. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/_app_project_manifests.py +0 -0
  38. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/_env.py +0 -0
  39. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/_local_env.py +0 -0
  40. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/_module_build.py +0 -0
  41. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/_module_host.py +0 -0
  42. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/_templating.py +0 -0
  43. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/_version_check.py +0 -0
  44. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/add_cmd.py +0 -0
  45. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/app_project.py +0 -0
  46. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/case.py +0 -0
  47. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/catalog.py +0 -0
  48. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/docker_assets.py +0 -0
  49. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/docker_cmd.py +0 -0
  50. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/framework_repo.py +0 -0
  51. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/git_source.py +0 -0
  52. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/git_versions.py +0 -0
  53. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/migration_recipes/mail_settings.py +0 -0
  54. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/migration_recipes/users_tokens.py +0 -0
  55. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/migrations_cmd.py +0 -0
  56. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/openapi_cmd.py +0 -0
  57. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/openapi_types.py +0 -0
  58. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/package_update.py +0 -0
  59. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/package_update_deps.py +0 -0
  60. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/package_update_npm.py +0 -0
  61. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/pins.py +0 -0
  62. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/plugins.py +0 -0
  63. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/pypi.py +0 -0
  64. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/pyproject_edit.py +0 -0
  65. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/recipes.py +0 -0
  66. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/requirements.py +0 -0
  67. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/README.md +0 -0
  68. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-database/SKILL.md +0 -0
  69. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-doctor/SKILL.md +0 -0
  70. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-inertia-pages/SKILL.md +0 -0
  71. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-locales/SKILL.md +0 -0
  72. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-migrations/SKILL.md +0 -0
  73. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-page-perf/SKILL.md +0 -0
  74. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-page-perf/scripts/page_audit/__main__.py +0 -0
  75. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-page-perf/scripts/page_audit/audit_browser.py +0 -0
  76. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-page-perf/scripts/page_audit/audit_crawl.py +0 -0
  77. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-page-perf/scripts/page_audit/audit_report.py +0 -0
  78. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-page-perf/scripts/page_audit/audit_server.py +0 -0
  79. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-registries/SKILL.md +0 -0
  80. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills/simple-module-testing/SKILL.md +0 -0
  81. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/skills_cmd.py +0 -0
  82. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/docker/Makefile.snippet +0 -0
  83. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/docker/compose-base-postgres.yml.tpl +0 -0
  84. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/docker/compose-base-sqlite.yml.tpl +0 -0
  85. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/docker/compose-tasks-postgres.yml.tpl +0 -0
  86. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/docker/compose-tasks-sqlite.yml.tpl +0 -0
  87. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/docker/compose-worker.yml.tpl +0 -0
  88. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/docker/dockerignore +0 -0
  89. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/docker/worker.Dockerfile.tpl +0 -0
  90. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/.env.example +0 -0
  91. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/.gitignore +0 -0
  92. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/README.md.tpl +0 -0
  93. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/_optional/background_tasks/Makefile.snippet +0 -0
  94. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/_optional/background_tasks/run_worker.py +0 -0
  95. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/alembic.ini +0 -0
  96. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/client_app/app.tsx +0 -0
  97. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/client_app/main.tsx +0 -0
  98. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/client_app/module-assets.ts +0 -0
  99. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/client_app/package.json.tpl +0 -0
  100. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/client_app/pages/Error.tsx +0 -0
  101. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/client_app/pages.ts +0 -0
  102. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/client_app/styles.css +0 -0
  103. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/client_app/tsconfig.json +0 -0
  104. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/client_app/vite.config.ts +0 -0
  105. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/client_app/vite.dev-url.ts +0 -0
  106. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/main.py +0 -0
  107. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/migrations/env.py +0 -0
  108. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/migrations/script.py.mako +0 -0
  109. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/migrations/versions/.gitkeep +0 -0
  110. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/routes.py +0 -0
  111. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/host/templates/index.html +0 -0
  112. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/.github/workflows/ci.yml +0 -0
  113. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/.github/workflows/publish.yml.tpl +0 -0
  114. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/.gitignore +0 -0
  115. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/__init__.py +0 -0
  116. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/contracts/__init__.py.tpl +0 -0
  117. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/contracts/schemas.py.tpl +0 -0
  118. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/core/__init__.py +0 -0
  119. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/core/constants.py.tpl +0 -0
  120. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/core/services.py.tpl +0 -0
  121. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/core/settings.py.tpl +0 -0
  122. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/locales/en.json.tpl +0 -0
  123. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/models.py.tpl +0 -0
  124. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/module.py.tpl +0 -0
  125. {simple_module_cli-0.0.45/simple_module_cli/templates/module/_optional/framework_repo → simple_module_cli-0.0.47/simple_module_cli/templates/module}/__PACKAGE__/pages/Browse.tsx.tpl +0 -0
  126. {simple_module_cli-0.0.45/simple_module_cli/templates/module/_optional/framework_repo → simple_module_cli-0.0.47/simple_module_cli/templates/module}/__PACKAGE__/pages/Create.tsx.tpl +0 -0
  127. {simple_module_cli-0.0.45/simple_module_cli/templates/module/_optional/framework_repo → simple_module_cli-0.0.47/simple_module_cli/templates/module}/__PACKAGE__/pages/Edit.tsx.tpl +0 -0
  128. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/pages/api.generated.ts.tpl +0 -0
  129. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/pages/api.ts.tpl +0 -0
  130. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/py.typed +0 -0
  131. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/web/__init__.py +0 -0
  132. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/web/deps.py.tpl +0 -0
  133. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/web/endpoints/__init__.py +0 -0
  134. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/web/endpoints/api.py.tpl +0 -0
  135. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/web/endpoints/views.py.tpl +0 -0
  136. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/__PACKAGE__/web/service.py.tpl +0 -0
  137. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/_optional/framework_repo/LICENSE +0 -0
  138. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/_optional/framework_repo/README.md.tpl +0 -0
  139. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/_optional/framework_repo/pyproject.toml.tpl +0 -0
  140. {simple_module_cli-0.0.45/simple_module_cli/templates/module → simple_module_cli-0.0.47/simple_module_cli/templates/module/_optional/standalone}/__PACKAGE__/pages/Browse.tsx.tpl +0 -0
  141. {simple_module_cli-0.0.45/simple_module_cli/templates/module → simple_module_cli-0.0.47/simple_module_cli/templates/module/_optional/standalone}/__PACKAGE__/pages/Create.tsx.tpl +0 -0
  142. {simple_module_cli-0.0.45/simple_module_cli/templates/module → simple_module_cli-0.0.47/simple_module_cli/templates/module/_optional/standalone}/__PACKAGE__/pages/Edit.tsx.tpl +0 -0
  143. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/_optional/standalone/package.json.tpl +0 -0
  144. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/_optional/standalone/tsconfig.json.tpl +0 -0
  145. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/package.json.tpl +0 -0
  146. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/pyproject.toml.tpl +0 -0
  147. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/tests/conftest.py +0 -0
  148. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/tests/core/contracts/test___PACKAGE___schemas.py.tpl +0 -0
  149. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/tests/core/module/test___PACKAGE___module.py.tpl +0 -0
  150. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/tests/web/crud/test___PACKAGE___crud.py.tpl +0 -0
  151. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/module/tsconfig.json.tpl +0 -0
  152. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/workspace/.env.example +0 -0
  153. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/workspace/.gitignore +0 -0
  154. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/templates/workspace/package.json.tpl +0 -0
  155. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/update_cmd.py +0 -0
  156. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/uv_workspace.py +0 -0
  157. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/simple_module_cli/wizard.py +0 -0
  158. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/conftest.py +0 -0
  159. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_build_packaging.py +0 -0
  160. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_case.py +0 -0
  161. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_add_spec_parse.py +0 -0
  162. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_alembic_ini.py +0 -0
  163. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_asset_prerequisites.py +0 -0
  164. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_catalog.py +0 -0
  165. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_catalog_depends_on.py +0 -0
  166. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_docker_assets.py +0 -0
  167. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_docker_persistence_secrets.py +0 -0
  168. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_docker_workers.py +0 -0
  169. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_gen_types_scaffold.py +0 -0
  170. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_git_scan.py +0 -0
  171. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_new.py +0 -0
  172. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_new_dest_tolerance.py +0 -0
  173. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_new_git_module.py +0 -0
  174. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_new_regressions.py +0 -0
  175. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_openapi_export.py +0 -0
  176. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_openapi_gen_types.py +0 -0
  177. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_package_update.py +0 -0
  178. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_package_update_groups.py +0 -0
  179. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_package_update_npm.py +0 -0
  180. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_package_update_pins.py +0 -0
  181. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_package_update_release_order.py +0 -0
  182. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_package_update_workspace_excludes.py +0 -0
  183. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_prepare_data_migrations.py +0 -0
  184. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_prepare_data_postgres.py +0 -0
  185. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_pyproject_edit.py +0 -0
  186. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_recipes.py +0 -0
  187. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_scaffold_vite8.py +0 -0
  188. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_skill_links.py +0 -0
  189. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_skill_page_audit.py +0 -0
  190. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_update_release_policy.py +0 -0
  191. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_update_sources.py +0 -0
  192. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_version_check.py +0 -0
  193. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_vite_port_env.py +0 -0
  194. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_wizard.py +0 -0
  195. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_cli_wizard_git.py +0 -0
  196. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_create_module_ci_skip.py +0 -0
  197. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_env_helper.py +0 -0
  198. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_framework_repo_wiring.py +0 -0
  199. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_module_cmd_build.py +0 -0
  200. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_module_cmd_e2e.py +0 -0
  201. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_module_css_assets.py +0 -0
  202. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_module_css_build.py +0 -0
  203. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_module_css_subdir_sources.py +0 -0
  204. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_module_npm_aliases.py +0 -0
  205. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_module_pages_manifest.py +0 -0
  206. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_no_framework_deps.py +0 -0
  207. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_plugin_discovery.py +0 -0
  208. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_scaffold_app_tsx_spa_links.py +0 -0
  209. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_scaffold_lint_tooling.py +0 -0
  210. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_scaffold_rollback.py +0 -0
  211. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_scaffolded_host_setup_wizard.py +0 -0
  212. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_scaffolding_area_layout.py +0 -0
  213. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_scaffolding_framework_repo.py +0 -0
  214. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_scaffolding_host.py +0 -0
  215. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_scaffolding_module.py +0 -0
  216. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_scaffolding_module_js.py +0 -0
  217. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_skills_cmd.py +0 -0
  218. {simple_module_cli-0.0.45 → simple_module_cli-0.0.47}/tests/test_template_requires_framework.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: simple_module_cli
3
- Version: 0.0.45
3
+ Version: 0.0.47
4
4
  Summary: Standalone scaffolder for the SimpleModule framework — `smpy new`, `smpy create-module`, plugin host.
5
5
  Project-URL: Homepage, https://github.com/antosubash/simple_module_python
6
6
  Project-URL: Repository, https://github.com/antosubash/simple_module_python
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "simple_module_cli"
3
- version = "0.0.45"
3
+ version = "0.0.47"
4
4
  description = "Standalone scaffolder for the SimpleModule framework — `smpy new`, `smpy create-module`, plugin host."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -2,14 +2,19 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ import re
5
6
  import subprocess
6
7
  from collections.abc import Callable
7
8
  from pathlib import Path
8
9
 
9
10
  import typer
10
11
 
12
+ from simple_module_cli.uv_workspace import find_workspace_root, is_workspace_member
13
+
11
14
  ExecRunner = Callable[[list[str], Path], int]
12
15
 
16
+ _DIST_PREFIX = re.compile(r"^simple[-_]module[-_]", re.IGNORECASE)
17
+
13
18
 
14
19
  _ENTRYPOINT_CHECK = (
15
20
  "import sys\n"
@@ -28,6 +33,24 @@ def _default_exec_runner(cmd: list[str], cwd: Path) -> int:
28
33
  return subprocess.run(cmd, cwd=cwd, check=False).returncode
29
34
 
30
35
 
36
+ def _sync_command(project_dir: Path) -> tuple[list[str], Path]:
37
+ """How to sync after editing ``project_dir``'s pyproject.
38
+
39
+ A host inside an app workspace shares one venv with the root's dev tools
40
+ and every module member. ``uv sync`` from ``host/`` would sync the host
41
+ alone and uninstall the rest (GH #916), so sync the workspace from its
42
+ root, as ``make install`` does.
43
+ """
44
+ root = find_workspace_root(project_dir)
45
+ if (
46
+ root is not None
47
+ and root != project_dir.resolve()
48
+ and is_workspace_member(project_dir, project_dir)
49
+ ):
50
+ return ["uv", "sync", "--all-packages"], root
51
+ return ["uv", "sync"], project_dir
52
+
53
+
31
54
  def _fail(message: str) -> typer.Exit:
32
55
  typer.echo(f"ERROR: {message}", err=True)
33
56
  return typer.Exit(code=1)
@@ -40,8 +63,12 @@ def post_install(
40
63
  exec_runner: ExecRunner,
41
64
  ) -> None:
42
65
  """uv sync → gen-pages → sync-js-deps → entry-point check → reminders."""
43
- if exec_runner(["uv", "sync"], project_dir) != 0:
44
- raise _fail("`uv sync` failed — pyproject was written; fix and re-run `uv sync`.")
66
+ sync_cmd, sync_dir = _sync_command(project_dir)
67
+ if exec_runner(sync_cmd, sync_dir) != 0:
68
+ shown = " ".join(sync_cmd)
69
+ raise _fail(
70
+ f"`{shown}` failed — pyproject was written; fix and re-run `{shown}` from {sync_dir}."
71
+ )
45
72
  if (project_dir / "client_app").is_dir():
46
73
  exec_runner(["uv", "run", "smpy", "host", "gen-pages"], project_dir)
47
74
  exec_runner(["uv", "run", "smpy", "host", "sync-js-deps"], project_dir)
@@ -53,7 +80,13 @@ def post_install(
53
80
  "entry point — it is not a SimpleModule module."
54
81
  )
55
82
  for dist in models_dists:
83
+ # The same message `smpy create-module`'s next steps suggest (GH #931).
84
+ slug = _DIST_PREFIX.sub("", dist)
56
85
  typer.echo(
57
86
  f"{dist} ships database models — generate and apply the migration:\n"
58
- f' make migration msg="add {dist}"\n make migrate'
87
+ f' make migration msg="add {slug}"\n make migrate'
59
88
  )
89
+ # Only `pyproject.toml` changed, which the dev reloader does not watch; and a
90
+ # reload still logs the new module as not importable in that process (GH #915,
91
+ # #931), so only a restart serves it.
92
+ typer.echo("If `make dev` is running, restart it: modules are discovered at start-up.")
@@ -2,11 +2,10 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- # ty is pre-1.0 and renames rules between releases (0.0.100 renamed
6
- # ``unresolved-attribute``, which the scaffold's ``[tool.ty.rules]`` names), so
5
+ # ty is pre-1.0 and renames rules between releases, so
7
6
  # new apps get the range this repo is tested on, not the newest ty.
8
7
  # ``test_scaffold_lint_tooling.py`` fails once ``uv.lock`` moves past it.
9
- TY_REQUIREMENT = "ty>=0.0.90,<0.0.100"
8
+ TY_REQUIREMENT = "ty>=0.0.100,<0.0.101"
10
9
 
11
10
  # Apps turn ty's ``invalid-assignment`` off, so this ignore would be reported as
12
11
  # unused there; only a module inside the framework repo, which checks the rule,
@@ -0,0 +1,84 @@
1
+ """Notice when ``smpy`` is not the CLI of the app it runs in (GH #929).
2
+
3
+ ``uv run smpy`` falls through to whatever ``smpy`` is on ``PATH`` once the
4
+ project venv lost ``simple_module_cli`` (a plain ``uv sync`` used to drop it).
5
+ That is often an older ``uv tool install``-ed copy, which then scaffolds modules
6
+ pinned to its own version inside a newer app, or fails with errors that make no
7
+ sense inside the project. Reading the app's pins is cheap and local.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ import re
13
+ import sys
14
+ import tomllib
15
+ from collections.abc import Iterator
16
+ from pathlib import Path
17
+
18
+ import typer
19
+
20
+ from simple_module_cli.pins import PLACEHOLDER_VERSION
21
+
22
+ _FRAMEWORK_PIN = re.compile(r"^\s*simple[-_]module[-_][a-z0-9_-]+\s*==\s*([^\s;,\[]+)", re.I)
23
+
24
+ # Commands that legitimately run a CLI of another version than the app's:
25
+ # `new` makes an app, `update`/`package-update` change its pins.
26
+ _EXEMPT_COMMANDS = frozenset({"new", "update", "package-update"})
27
+
28
+
29
+ def _requirements(doc: dict) -> Iterator[str]:
30
+ project = doc.get("project", {})
31
+ yield from project.get("dependencies", [])
32
+ for extra in project.get("optional-dependencies", {}).values():
33
+ yield from extra
34
+ for group in doc.get("dependency-groups", {}).values():
35
+ yield from group
36
+
37
+
38
+ def _pinned_version(pyproject: Path) -> str | None:
39
+ try:
40
+ doc = tomllib.loads(pyproject.read_text(encoding="utf-8"))
41
+ except (OSError, tomllib.TOMLDecodeError):
42
+ return None
43
+ for requirement in _requirements(doc):
44
+ match = _FRAMEWORK_PIN.match(requirement) if isinstance(requirement, str) else None
45
+ if match:
46
+ return match.group(1)
47
+ return None
48
+
49
+
50
+ def app_framework_pin(start: Path) -> tuple[Path, str] | None:
51
+ """``(project root, version)`` of the nearest project pinning the framework with ``==``.
52
+
53
+ A ``smpy new`` app pins every ``simple_module_*`` package to one version, in
54
+ the root ``pyproject.toml`` and (workspace mode) ``host/pyproject.toml``.
55
+ Range requirements, such as this repository's own, are not pins.
56
+ """
57
+ current = start.resolve()
58
+ for candidate in (current, *current.parents):
59
+ for pyproject in (candidate / "pyproject.toml", candidate / "host" / "pyproject.toml"):
60
+ version = _pinned_version(pyproject) if pyproject.is_file() else None
61
+ if version is not None:
62
+ return candidate, version
63
+ return None
64
+
65
+
66
+ def running_cli() -> str:
67
+ """Where the running ``smpy`` lives, for messages."""
68
+ return str(Path(sys.argv[0]).resolve()) if sys.argv and sys.argv[0] else sys.executable
69
+
70
+
71
+ def warn_if_not_the_apps_cli(command: str | None, current: str, start: Path) -> None:
72
+ """One stderr warning when the project pins another framework version than this CLI's."""
73
+ if command in _EXEMPT_COMMANDS or current == PLACEHOLDER_VERSION:
74
+ return
75
+ found = app_framework_pin(start)
76
+ if found is None or found[1] == current:
77
+ return
78
+ root, pinned = found
79
+ typer.echo(
80
+ f"WARNING: this project ({root}) pins the framework to {pinned}, but this smpy is "
81
+ f"{current} ({running_cli()}).\n"
82
+ " Use the project's own CLI: `uv sync --all-packages`, then `uv run smpy ...`.",
83
+ err=True,
84
+ )
@@ -20,6 +20,11 @@ from typing import Annotated
20
20
 
21
21
  import typer
22
22
 
23
+ from simple_module_cli._project_cli_check import (
24
+ app_framework_pin,
25
+ running_cli,
26
+ warn_if_not_the_apps_cli,
27
+ )
23
28
  from simple_module_cli.add_cmd import add_module, run_add
24
29
  from simple_module_cli.case import to_kebab_case
25
30
  from simple_module_cli.docker_cmd import docker_app
@@ -42,6 +47,12 @@ app = typer.Typer(
42
47
  add_completion=False,
43
48
  )
44
49
 
50
+
51
+ @app.callback()
52
+ def _check_project_cli(ctx: typer.Context) -> None:
53
+ warn_if_not_the_apps_cli(ctx.invoked_subcommand, resolve_framework_version(), Path.cwd())
54
+
55
+
45
56
  app.command("new")(new_project)
46
57
  app.command("add")(add_module)
47
58
  app.command("update")(update_modules)
@@ -60,9 +71,16 @@ def doctor() -> None:
60
71
  from simple_module_core.__main__ import main as run_doctor
61
72
  except ImportError:
62
73
  # The CLI installs on its own (to scaffold); doctor needs a project's framework.
63
- typer.echo(
64
- "ERROR: smpy doctor needs simple_module_core; run it inside a project.", err=True
65
- )
74
+ if app_framework_pin(Path.cwd()) is None:
75
+ message = "smpy doctor needs simple_module_core; run it inside a project."
76
+ else:
77
+ # Inside an app, this is a global smpy outside the app's venv (GH #929).
78
+ message = (
79
+ f"this smpy ({running_cli()}) is not installed in this project's venv, "
80
+ "so it cannot see the app's modules. Run `uv sync --all-packages`, "
81
+ "then `uv run smpy doctor`."
82
+ )
83
+ typer.echo(f"ERROR: {message}", err=True)
66
84
  raise typer.Exit(1) from None
67
85
 
68
86
  raise typer.Exit(run_doctor())
@@ -126,25 +144,36 @@ def create_host(
126
144
  typer.echo(" python main.py")
127
145
 
128
146
 
129
- def _echo_workspace_hint(target: Path) -> None:
130
- """Tell the user how to wire a workspace-member module into the host (GH #442)."""
147
+ def _app_add_command(target: Path) -> str | None:
148
+ """``smpy add …`` wiring a module into its app's host, or None outside an app (GH #442)."""
131
149
  root = find_workspace_root(target.parent)
132
150
  if root is None:
133
- return
151
+ return None
134
152
  host = root / "host"
135
153
  if not (host / "pyproject.toml").is_file() or not is_workspace_member(host, target):
136
- return
154
+ return None
137
155
  rel = os.path.relpath(target.resolve(), host.resolve())
138
156
  if not rel.startswith("."):
139
157
  rel = f"./{rel}" # parse_add_spec reads a bare "a/b" as a PyPI requirement
140
- host_arg = os.path.relpath(host.resolve(), Path.cwd())
141
- if host_arg.startswith(".."):
142
- host_arg = str(host.resolve())
143
- typer.echo(
144
- f"\nThis module is a uv workspace member. Wire it into the host with:\n"
145
- f" smpy add {rel} --path {host_arg}"
146
- " # adds it as { workspace = true }"
147
- )
158
+ # The steps are printed "from the app root", so name the host relative to it.
159
+ host_arg = host.resolve().relative_to(root.resolve()).as_posix()
160
+ # `uv run`: after `uvx … smpy new`, `smpy` itself is not on PATH (GH #931).
161
+ return f"uv run smpy add {rel} --path {host_arg}"
162
+
163
+
164
+ def _echo_app_next_steps(add_command: str, slug: str) -> None:
165
+ """The module lives in an app's workspace: wire it in with the app's own commands.
166
+
167
+ Never ``uv sync`` inside the module: that syncs the module alone and
168
+ uninstalls the rest of the app from the shared venv (GH #916).
169
+ """
170
+ typer.echo("\nNext steps (from the app root):")
171
+ typer.echo(f" {add_command} # adds it as {{ workspace = true }}")
172
+ typer.echo(" make install # links its pages (npm) and generates its i18n keys")
173
+ typer.echo(f' make migration msg="add {slug}"')
174
+ typer.echo(" make migrate")
175
+ typer.echo(" make test")
176
+ typer.echo("Then restart `make dev`: modules are discovered at start-up, not on reload.")
148
177
 
149
178
 
150
179
  @app.command("create-module")
@@ -193,14 +222,17 @@ def create_module(
193
222
  "Skipped .github/ workflows: this module is inside an existing repo, "
194
223
  "where nested workflows never run. Use --standalone to emit them."
195
224
  )
196
- _echo_workspace_hint(target)
197
- typer.echo("\nNext steps:")
198
- typer.echo(f" cd {target}")
199
- typer.echo(" uv sync --extra dev")
200
- typer.echo(" uv run pytest")
201
- typer.echo(" npm install")
202
- typer.echo(" npm run typecheck")
203
- typer.echo(" uv run smpy module verify")
225
+ add_command = _app_add_command(target)
226
+ if add_command is not None:
227
+ _echo_app_next_steps(add_command, slug)
228
+ else:
229
+ typer.echo("\nNext steps:")
230
+ typer.echo(f" cd {target}")
231
+ typer.echo(" uv sync --extra dev")
232
+ typer.echo(" uv run pytest")
233
+ typer.echo(" npm install")
234
+ typer.echo(" npm run typecheck")
235
+ typer.echo(" uv run smpy module verify")
204
236
  typer.echo(
205
237
  "\nThe pages ship sample API types (pages/api.generated.ts). Once the host serves "
206
238
  "the module, refresh them after any endpoint change:\n"
@@ -50,6 +50,8 @@ def run_verify(info: ModuleInfo, *, fresh: bool = False, runner=subprocess.run)
50
50
  ],
51
51
  host,
52
52
  ),
53
+ # Keyed pages read `keys.<module>`, which only the host's gen-i18n adds (GH #918).
54
+ ("gen-i18n", [uv, "run", "python", "-m", "simple_module_hosting", "gen-i18n"], host),
53
55
  ("frontend build (tsc + vite)", [npm, "run", "build"], client_app),
54
56
  )
55
57
  for label, cmd, cwd in steps:
@@ -4,6 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  import shutil
6
6
  import subprocess
7
+ from collections.abc import Sequence
7
8
  from enum import StrEnum
8
9
  from pathlib import Path
9
10
  from typing import Annotated
@@ -174,61 +175,108 @@ def new_project(
174
175
  rel = path.relative_to(target) if path.is_relative_to(target) else path
175
176
  typer.echo(f" {rel}")
176
177
  typer.echo("\nGenerated secrets were written to .env (gitignored), not .env.example.")
177
- typer.echo("\nNext steps:")
178
- typer.echo(f" cd {target}")
178
+ manual_setup = ["make install", 'make migration msg="initial schema"', "make migrate"]
179
179
  if no_install:
180
- typer.echo(" uv sync")
181
- typer.echo(" npm install")
182
- typer.echo(' make migration msg="initial schema"')
183
- typer.echo(" make migrate")
184
- typer.echo(" make dev")
185
- typer.echo(" make docker-up # or run the full stack in containers")
186
- if "background_tasks" in resolved:
187
- typer.echo(" docker compose up -d redis worker beat # background jobs")
180
+ _echo_next_steps(target, manual_setup, resolved)
188
181
  return
189
182
 
190
- typer.echo("Installing dependencies...")
191
- for cmd in (["uv", "sync"], ["npm", "install"]):
183
+ typer.echo("\nInstalling dependencies...")
184
+ # What `make install` runs: a workspace syncs every member, not just the root.
185
+ uv_sync = ["uv", "sync"] if flat else ["uv", "sync", "--all-packages"]
186
+ for cmd in (uv_sync, ["npm", "install"]):
192
187
  if shutil.which(cmd[0]) is None:
193
188
  typer.echo(
194
189
  f"WARNING: '{cmd[0]}' not found on PATH; skipping `{' '.join(cmd)}`. "
195
190
  "Install it and finish setup manually.",
196
191
  err=True,
197
192
  )
193
+ _echo_next_steps(target, manual_setup, resolved)
198
194
  return
199
- result = subprocess.run(cmd, cwd=target, check=False)
200
- if result.returncode != 0:
201
- typer.echo(
202
- f"WARNING: {' '.join(cmd)} failed (exit {result.returncode}); "
203
- "finish setup manually.",
204
- err=True,
205
- )
195
+ run = _sync_retrying_with_refresh if cmd is uv_sync else _run_quietly
196
+ if not run(cmd, target):
197
+ _echo_next_steps(target, manual_setup, resolved)
198
+ if cmd is uv_sync:
199
+ typer.echo(
200
+ f"`{' '.join(cmd)}` was already retried with --refresh. If uv still cannot "
201
+ "find this release's packages, PyPI may not list them yet: wait a few "
202
+ "minutes, then run `make install`."
203
+ )
206
204
  return
207
205
 
208
206
  alembic = _alembic_argv(target, host_dir)
209
- _bootstrap_initial_migration(target, host_dir, alembic)
207
+ typer.echo("Creating the database...")
208
+ if not _bootstrap_initial_migration(target, host_dir, alembic):
209
+ _echo_next_steps(target, manual_setup[1:], resolved)
210
+ return
210
211
  # `heads` (plural) applies every per-module branch head; `head` (singular)
211
212
  # errors once a second module ships its own migration branch label.
212
- subprocess.run([*alembic, "upgrade", "heads"], cwd=target, check=False)
213
- typer.echo("\nSetup complete. Run `make dev` in the new directory.")
214
- typer.echo("To run the full stack in containers instead: make docker-up")
213
+ if not _run_quietly([*alembic, "upgrade", "heads"], target):
214
+ # The revision exists now; regenerating it would create a duplicate.
215
+ _echo_next_steps(target, manual_setup[2:], resolved)
216
+ return
217
+ typer.echo("\nSetup complete.")
218
+ _echo_next_steps(target, [], resolved)
219
+
220
+
221
+ def _sync_retrying_with_refresh(cmd: list[str], cwd: Path) -> bool:
222
+ """``uv sync``, retried once with ``--refresh`` when it fails (GH #932).
223
+
224
+ The pins are this CLI's own version, so they are published; right after a
225
+ release uv's cached index may still predate them.
226
+ """
227
+ if _run_quietly(cmd, cwd, report=False):
228
+ return True
229
+ typer.echo("uv's cached PyPI index may predate this release; retrying with --refresh...")
230
+ return _run_quietly([*cmd, "--refresh"], cwd)
231
+
232
+
233
+ def _run_quietly(cmd: list[str], cwd: Path, *, report: bool = True) -> bool:
234
+ """Run a setup step, showing its output only when it fails (GH #917).
235
+
236
+ ``report=False`` keeps a failure silent, for a caller that retries.
237
+ """
238
+ try:
239
+ result = subprocess.run(
240
+ cmd, cwd=cwd, check=False, capture_output=True, text=True, errors="replace"
241
+ )
242
+ except OSError as exc: # the executable is missing
243
+ if report:
244
+ typer.echo(
245
+ f"WARNING: {' '.join(cmd)} could not run ({exc}); finish setup manually.", err=True
246
+ )
247
+ return False
248
+ if result.returncode == 0:
249
+ return True
250
+ if not report:
251
+ return False
252
+ typer.echo(f"{result.stdout}{result.stderr}", err=True)
253
+ typer.echo(
254
+ f"WARNING: {' '.join(cmd)} failed (exit {result.returncode}); finish setup manually.",
255
+ err=True,
256
+ )
257
+ return False
258
+
259
+
260
+ def _echo_next_steps(target: Path, setup: list[str], resolved: Sequence[str]) -> None:
261
+ typer.echo("\nNext steps:")
262
+ typer.echo(f" cd {target}")
263
+ for step in [*setup, "make dev"]:
264
+ typer.echo(f" {step}")
265
+ typer.echo(" make docker-up # or run the full stack in containers")
215
266
  if "background_tasks" in resolved:
216
- typer.echo("For background jobs, also run: docker compose up -d redis worker beat")
267
+ typer.echo(" docker compose up -d redis worker beat # background jobs")
217
268
 
218
269
 
219
- def _bootstrap_initial_migration(target: Path, host_dir: Path, alembic: list[str]) -> None:
270
+ def _bootstrap_initial_migration(target: Path, host_dir: Path, alembic: list[str]) -> bool:
220
271
  """Autogenerate the baseline migration if the scaffold ships none.
221
272
 
222
273
  Without a real revision, ``alembic upgrade head`` is a silent no-op
223
274
  against an empty schema — the bundled modules' tables never exist.
224
275
 
225
276
  Runs from ``target`` (the project root) — see :func:`_alembic_argv`.
277
+ Returns False when the autogenerate failed.
226
278
  """
227
279
  versions_dir = host_dir / "migrations" / "versions"
228
280
  if any(p.name != "__init__.py" for p in versions_dir.glob("*.py")):
229
- return
230
- subprocess.run(
231
- [*alembic, "revision", "--autogenerate", "-m", "initial schema"],
232
- cwd=target,
233
- check=False,
234
- )
281
+ return True
282
+ return _run_quietly([*alembic, "revision", "--autogenerate", "-m", "initial schema"], target)
@@ -220,13 +220,14 @@ def create_module(
220
220
  simple_module_python monorepo itself (``make new-module``): it overlays
221
221
  ``_optional/framework_repo/`` (a workspace-sourced ``pyproject.toml`` with
222
222
  the metadata ``scripts/check_metadata.py`` requires, a LICENSE and README
223
- that pass ``check_readmes.py``, and i18n-keyed pages) and implies no
224
- ``.github/``. Wiring into the repo's own pyproject files is
225
- :mod:`simple_module_cli.framework_repo`'s job.
223
+ that pass ``check_readmes.py``) and implies no ``.github/``. Wiring into
224
+ the repo's own pyproject files is :mod:`simple_module_cli.framework_repo`'s job.
226
225
 
227
226
  ``standalone=True`` additionally overlays ``_optional/standalone/`` (npm
228
227
  devDependencies + a tsconfig that resolves ``@simple-module-py/ui`` from the
229
- repo's own ``node_modules``) so the module type-checks outside a workspace.
228
+ repo's own ``node_modules``) so the module type-checks outside a workspace,
229
+ and pages with literal English: the base pages use ``t(keys.<package>.…)``
230
+ (GH #918), and a module repo has no host whose ``gen-i18n`` adds its keys.
230
231
  """
231
232
  dest = Path(dest)
232
233
  existed_before = dest.exists()
@@ -15,7 +15,7 @@ The `smpy` command is provided by `simple_module_cli` (installed as a dep of `si
15
15
  |---|---|
16
16
  | `smpy new <name>` | Greenfield: scaffold a complete app (host + selected modules) in one shot, with an interactive wizard for DB / tenancy / module preset |
17
17
  | `smpy create-host <name>` | You want just a bare host project; you'll add modules later by `pip install`-ing them |
18
- | `smpy create-module <name>` | You're authoring a publishable module package (separate repo, distributed via PyPI) |
18
+ | `smpy create-module <name>` | You're adding a module to a `smpy new` app (`--dest modules/<name>`), or authoring a publishable module package in its own repo |
19
19
  | `smpy package-update` | Bump every `simple_module_*` / `simple-module-*` dependency, optional extra and dependency group to its latest non-yanked PyPI release, and `@simple-module-py/*` npm pins to the same core version (workspace/path/git/URL sources are left untouched) |
20
20
  | `smpy migrations prepare <upgrade-id> --head <label>@head` | Write the host-side revision for a framework data upgrade that boot or `make doctor` reported (`mail.settings_namespace_v1`, `users.hashed_bearer_tokens_v1`); it never applies it — run your migrate step afterwards |
21
21
  | `smpy doctor` | Run the module diagnostics (`SM0xx`, including `SM033` data-compatibility findings) against this host's database |
@@ -90,13 +90,15 @@ smpy create-host MyApp --dest ./apps/myapp # custom destination
90
90
 
91
91
  ## `smpy create-module <name>` — module package
92
92
 
93
- For module authors publishing to PyPI. Scaffolds a standalone repo containing one module.
93
+ Scaffolds one module package: inside a `smpy new` app, or as a standalone repo to publish to PyPI.
94
94
 
95
95
  ```bash
96
- smpy create-module orders # writes ./simple_module_orders/
97
- smpy create-module orders --dest ./packages/orders
96
+ smpy create-module orders --dest modules/orders # inside an app: a workspace member
97
+ smpy create-module orders # writes ./simple_module_orders/
98
98
  ```
99
99
 
100
+ Inside an app the printed next steps are the app's: `uv run smpy add ../modules/orders --path host` (which syncs the whole workspace and itself says to restart a running `make dev`), `make install` (links the module's pages into the npm workspace and generates its i18n keys), `make migration msg="add orders"`, `make migrate`, `make test`, then restart `make dev`. Never run `uv sync` inside the module directory there: it syncs the module alone and uninstalls the rest of the app from the shared venv. Outside an app it prints the standalone flow (`uv sync --extra dev`, `uv run pytest`, `smpy module verify`).
101
+
100
102
  The result is a complete package: `pyproject.toml` with the entry point declared, `module.py` with `ModuleBase`/`ModuleMeta` skeleton, `models.py`, `contracts/`, `web/endpoints/{api,views}.py`, `pages/`, `locales/en.json`, `core/{constants,settings,services}.py`, `web/{deps,service}.py`, plus nested `tests/<area>/<feature>/test_<module>_*.py` wired up with `simple_module_test` fixtures.
101
103
 
102
104
  `<name>` accepts any case — `orders`, `Orders`, `ORDERS`, `blog_posts` all work. The CLI lowercases it for the directory and PascalCases it for `ModuleMeta.name`.
@@ -193,6 +195,7 @@ smpy settings import-from-env
193
195
  Bootstraps the first admin user, or rotates an existing admin's password.
194
196
 
195
197
  ```bash
198
+ smpy users create-admin -e admin@example.com # prompts for the password
196
199
  smpy users create-admin -e admin@example.com -p hunter2
197
200
  smpy users create-admin -e admin@example.com -p new-password --force # rotate
198
201
  smpy users create-admin -e admin@example.com -p hunter2 --full-name "Admin"
@@ -213,7 +216,10 @@ Don't bake `--password` literals into a script you commit; use a secrets store a
213
216
  - **Ran `smpy new` inside an existing project.** The default `--dest ./<name>` creates a sibling directory. If the directory already exists and is non-empty, the command errors out — pass `--dest` explicitly to disambiguate.
214
217
  - **Ran `smpy host gen-pages` from outside the host directory.** Defaults to `./client_app`; pass `--host-dir` from elsewhere.
215
218
  - **Forgot `smpy host sync-js-deps` after `pip install`-ing a module with pages.** Vite resolves module imports against `client_app/node_modules`; the new module's JS deps won't land until you sync.
216
- - **Used `smpy create-module` to add a module to an existing host.** That command is for **publishable** packages, intended to live in their own repo. To add a module to an existing host: install it (`pip install simple_module_<name>` or add to `pyproject.toml` and `uv sync`), then autogenerate a migration. See **simple-module-creating** + **simple-module-migrations**.
219
+ - **Ran `uv sync` inside a module of a `smpy new` app.** That syncs the module's own project and uninstalls the app's other packages from the shared venv. Run `make install` (`uv sync --all-packages`) at the app root instead; a plain `uv sync` at the root also works, since the root depends on the host.
220
+ - **`uv run smpy` warns that the app uses another framework version, or `smpy doctor` says this smpy is not installed in the project's venv.** A global `smpy` is answering; run `uv sync --all-packages` so the app's own CLI is installed, then `uv run smpy …`.
221
+ - **Editing `locales/*.json` doesn't reload `make dev`** in an app made before 0.0.47: add `--reload-include '*locales/*.json'` to the `uvicorn` line of `dev-api`.
222
+ - **A module added while `make dev` runs logs "installed but … cannot be imported in this process".** The reload keeps the import path the server started with; restart `make dev`.
217
223
  - **Calling `smpy create-admin` before migrations have run.** The users tables don't exist yet; the command will error. Run `alembic upgrade head` first (or use `smpy new` which does it for you when `--no-install` isn't set).
218
224
  - **Expecting `--with products` (or `keycloak` / `audit_log`) to work on `smpy new`.** Those modules exist in the monorepo but aren't scaffolder-catalog keys, so `smpy new --with products` errors. Either scaffold without them and `pip install simple_module_products` into the host afterward, or use `smpy create-host --with Products` (which doesn't validate against the catalog).
219
225
  - **Port 5050 already taken when starting a scaffolded app.** Set `SM_VITE_DEV_URL` in the project `.env` (e.g. `http://localhost:5310`) — the scaffolded `vite.config.ts` derives the dev server's port and origin from that same value, so it's the only knob to turn.
@@ -114,7 +114,7 @@ Locale-related diagnostics: SM013 (missing file), SM014 (missing keys vs default
114
114
 
115
115
  ### 9. Don't re-enable the silenced ty rules
116
116
 
117
- Projects using the `ty` type checker should globally suppress `unresolved-attribute`, `unsupported-operator`, `unknown-argument`, `no-matching-overload`, `invalid-argument-type`, and `invalid-assignment` in `pyproject.toml`. SQLModel runtime-instruments fields as SQLAlchemy attributes, so the type checker can't see what's there (and `model_config = ConfigDict(...)` clashes with ty's internal `SQLModelConfig` type, which `invalid-assignment` covers). Real bugs surface in tests. Line-level suppressions use ty's rule names, `# ty: ignore[<rule>]`; a mypy-style `# type: ignore[arg-type]` silences nothing under ty.
117
+ Projects using `ty` 0.0.100 should globally suppress `missing-attribute`, `missing-union-attribute`, `unsupported-operator`, `unknown-argument`, `no-matching-overload`, `invalid-argument-type`, and `invalid-assignment` in `pyproject.toml`. SQLModel runtime-instruments fields as SQLAlchemy attributes, so the type checker can't see what's there (and `model_config = ConfigDict(...)` clashes with ty's internal `SQLModelConfig` type, which `invalid-assignment` covers). Real bugs surface in tests. Line-level suppressions use ty's rule names, `# ty: ignore[<rule>]`; a mypy-style `# type: ignore[arg-type]` silences nothing under ty.
118
118
 
119
119
  ### 10. Declare external asset origins with `register_csp_sources`
120
120
 
@@ -27,11 +27,17 @@ make migrate
27
27
  same `create_module` as `smpy create-module`, so both produce the same tree
28
28
  below (permissions, menu item with `label_key`, `core/constants.py`, CRUD sample,
29
29
  `locales/en.json`); the in-repo variant adds workspace-sourced `pyproject.toml`
30
- metadata, `LICENSE`, and i18n-keyed pages. For a **standalone publishable
30
+ metadata and a `LICENSE`. The pages read their text from `locales/en.json`
31
+ through `t(keys.<module>.…)`; the host's `make gen-i18n` (also run by
32
+ `make install` and each dev boot) adds the module to `keys`. A `--standalone`
33
+ module repo gets pages with literal English instead, since it has no host to
34
+ generate `keys`. For a **standalone publishable
31
35
  package** (its own repo, with CI + PyPI `publish.yml`), use
32
36
  `smpy create-module orders`; pass `--standalone` to force the `.github/`
33
37
  workflows, then `uv sync` (or `pip install -e ./orders`) to install it into the
34
- host.
38
+ host. Inside a `smpy new` app, `smpy create-module orders --dest modules/orders`
39
+ makes a workspace member and prints the app's steps (`smpy add … --path host`,
40
+ `make install`, `make migration`); don't run `uv sync` inside the module there.
35
41
 
36
42
  ## What scaffolding produces
37
43
 
@@ -32,8 +32,11 @@ RUN --mount=type=cache,target=/root/.cache/uv \
32
32
  # Flat mode keeps the frontend's own package.json under client_app/.
33
33
  RUN cd client_app && if [ -f package-lock.json ]; then npm ci; else npm install; fi
34
34
 
35
- # Page manifest + generated module imports, then the production bundle.
35
+ # Page manifest + generated module imports, the app's i18n keys (module pages
36
+ # read `keys.<module>`, which the published @simple-module-py/i18n lacks), then
37
+ # the production bundle.
36
38
  RUN uv run python -m simple_module_hosting gen-pages --host-dir=client_app
39
+ RUN uv run python -m simple_module_hosting gen-i18n
37
40
  RUN cd client_app && npm run build
38
41
 
39
42
  # node_modules never ships in the runtime image.
@@ -36,8 +36,11 @@ COPY . .
36
36
  RUN --mount=type=cache,target=/root/.cache/uv \
37
37
  uv sync --all-packages --no-dev
38
38
 
39
- # Page manifest + generated module imports, then the production bundle.
39
+ # Page manifest + generated module imports, the app's i18n keys (module pages
40
+ # read `keys.<module>`, which the published @simple-module-py/i18n lacks), then
41
+ # the production bundle.
40
42
  RUN cd host && uv run python -m simple_module_hosting gen-pages --host-dir=client_app
43
+ RUN cd host && uv run python -m simple_module_hosting gen-i18n
41
44
  RUN npm run build
42
45
 
43
46
  # Re-sync so hatch force-include picks up freshly built module static/dist.
@@ -18,12 +18,14 @@ dev: gen-pages
18
18
  $(MAKE) -j2 dev-api dev-ui
19
19
 
20
20
  dev-api:
21
- uv run uvicorn main:app --reload --port $(API_PORT)
21
+ uv run uvicorn main:app --reload --reload-include '*locales/*.json' --port $(API_PORT)
22
22
 
23
23
  dev-ui:
24
24
  cd client_app && npm run dev
25
25
 
26
- build:
26
+ # Module pages read `keys.<module>` (gen-i18n); a bundle built without them
27
+ # crashes those pages at runtime, and tsc does not catch it.
28
+ build: gen-pages gen-i18n
27
29
  cd client_app && npm run build
28
30
 
29
31
  # Testing