flint-kit 0.14.0__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 (192) hide show
  1. flint_kit-0.14.0/PKG-INFO +120 -0
  2. flint_kit-0.14.0/README.md +101 -0
  3. flint_kit-0.14.0/pyproject.toml +53 -0
  4. flint_kit-0.14.0/src/flint/__init__.py +3 -0
  5. flint_kit-0.14.0/src/flint/__main__.py +4 -0
  6. flint_kit-0.14.0/src/flint/cli.py +289 -0
  7. flint_kit-0.14.0/src/flint/errors.py +17 -0
  8. flint_kit-0.14.0/src/flint/generator.py +446 -0
  9. flint_kit-0.14.0/src/flint/naming.py +97 -0
  10. flint_kit-0.14.0/src/flint/postgen.py +112 -0
  11. flint_kit-0.14.0/src/flint/prefs.py +110 -0
  12. flint_kit-0.14.0/src/flint/prompts.py +268 -0
  13. flint_kit-0.14.0/src/flint/skills/alembic/content/SKILL.md.jinja +78 -0
  14. flint_kit-0.14.0/src/flint/skills/alembic/content/guides/first-migration.md.jinja +58 -0
  15. flint_kit-0.14.0/src/flint/skills/alembic/content/guides/reading-a-migration.md.jinja +109 -0
  16. flint_kit-0.14.0/src/flint/skills/alembic/content/references/env-and-config.md.jinja +130 -0
  17. flint_kit-0.14.0/src/flint/skills/alembic/content/references/gotchas.md.jinja +100 -0
  18. flint_kit-0.14.0/src/flint/skills/alembic/skill.json +5 -0
  19. flint_kit-0.14.0/src/flint/skills/celery/content/SKILL.md.jinja +83 -0
  20. flint_kit-0.14.0/src/flint/skills/celery/content/guides/add-a-task.md.jinja +92 -0
  21. flint_kit-0.14.0/src/flint/skills/celery/content/references/gotchas.md.jinja +88 -0
  22. flint_kit-0.14.0/src/flint/skills/celery/content/references/tasks-and-results.md.jinja +93 -0
  23. flint_kit-0.14.0/src/flint/skills/celery/skill.json +5 -0
  24. flint_kit-0.14.0/src/flint/skills/fastapi/content/SKILL.md.jinja +54 -0
  25. flint_kit-0.14.0/src/flint/skills/fastapi/content/guides/add-an-endpoint.md.jinja +97 -0
  26. flint_kit-0.14.0/src/flint/skills/fastapi/content/guides/testing.md.jinja +49 -0
  27. flint_kit-0.14.0/src/flint/skills/fastapi/content/references/gotchas.md.jinja +61 -0
  28. flint_kit-0.14.0/src/flint/skills/fastapi/content/references/routing-and-dependencies.md.jinja +85 -0
  29. flint_kit-0.14.0/src/flint/skills/fastapi/skill.json +5 -0
  30. flint_kit-0.14.0/src/flint/skills/flask/content/SKILL.md.jinja +94 -0
  31. flint_kit-0.14.0/src/flint/skills/flask/content/guides/add-a-resource.md.jinja +139 -0
  32. flint_kit-0.14.0/src/flint/skills/flask/content/guides/testing.md.jinja +110 -0
  33. flint_kit-0.14.0/src/flint/skills/flask/content/references/app-factory-and-config.md.jinja +110 -0
  34. flint_kit-0.14.0/src/flint/skills/flask/content/references/gotchas.md.jinja +146 -0
  35. flint_kit-0.14.0/src/flint/skills/flask/content/references/routing-and-blueprints.md.jinja +155 -0
  36. flint_kit-0.14.0/src/flint/skills/flask/skill.json +5 -0
  37. flint_kit-0.14.0/src/flint/skills/flask-migrate/content/SKILL.md.jinja +70 -0
  38. flint_kit-0.14.0/src/flint/skills/flask-migrate/content/guides/first-migration.md.jinja +63 -0
  39. flint_kit-0.14.0/src/flint/skills/flask-migrate/content/references/cli-and-wiring.md.jinja +76 -0
  40. flint_kit-0.14.0/src/flint/skills/flask-migrate/content/references/gotchas.md.jinja +66 -0
  41. flint_kit-0.14.0/src/flint/skills/flask-migrate/skill.json +5 -0
  42. flint_kit-0.14.0/src/flint/skills/flask-sqlalchemy/content/SKILL.md.jinja +84 -0
  43. flint_kit-0.14.0/src/flint/skills/flask-sqlalchemy/content/guides/add-a-model.md.jinja +90 -0
  44. flint_kit-0.14.0/src/flint/skills/flask-sqlalchemy/content/references/db-object-and-wiring.md.jinja +105 -0
  45. flint_kit-0.14.0/src/flint/skills/flask-sqlalchemy/content/references/gotchas.md.jinja +107 -0
  46. flint_kit-0.14.0/src/flint/skills/flask-sqlalchemy/skill.json +5 -0
  47. flint_kit-0.14.0/src/flint/skills/pydantic-settings/content/SKILL.md.jinja +75 -0
  48. flint_kit-0.14.0/src/flint/skills/pydantic-settings/content/guides/add-a-setting.md.jinja +78 -0
  49. flint_kit-0.14.0/src/flint/skills/pydantic-settings/content/references/framework-integration.md.jinja +104 -0
  50. flint_kit-0.14.0/src/flint/skills/pydantic-settings/content/references/settings-and-env.md.jinja +112 -0
  51. flint_kit-0.14.0/src/flint/skills/pydantic-settings/skill.json +5 -0
  52. flint_kit-0.14.0/src/flint/skills/pytest/content/SKILL.md.jinja +102 -0
  53. flint_kit-0.14.0/src/flint/skills/pytest/content/guides/parametrize.md.jinja +77 -0
  54. flint_kit-0.14.0/src/flint/skills/pytest/content/guides/writing-a-good-test.md.jinja +85 -0
  55. flint_kit-0.14.0/src/flint/skills/pytest/content/references/database-isolation.md.jinja +115 -0
  56. flint_kit-0.14.0/src/flint/skills/pytest/content/references/gotchas.md.jinja +113 -0
  57. flint_kit-0.14.0/src/flint/skills/pytest/skill.json +5 -0
  58. flint_kit-0.14.0/src/flint/skills/redis/content/SKILL.md.jinja +76 -0
  59. flint_kit-0.14.0/src/flint/skills/redis/content/guides/add-caching-to-an-endpoint.md.jinja +169 -0
  60. flint_kit-0.14.0/src/flint/skills/redis/content/references/gotchas.md.jinja +54 -0
  61. flint_kit-0.14.0/src/flint/skills/redis/content/references/redis-operations.md.jinja +67 -0
  62. flint_kit-0.14.0/src/flint/skills/redis/skill.json +5 -0
  63. flint_kit-0.14.0/src/flint/skills/sqlalchemy/content/SKILL.md.jinja +101 -0
  64. flint_kit-0.14.0/src/flint/skills/sqlalchemy/content/guides/add-a-model.md.jinja +205 -0
  65. flint_kit-0.14.0/src/flint/skills/sqlalchemy/content/references/gotchas.md.jinja +140 -0
  66. flint_kit-0.14.0/src/flint/skills/sqlalchemy/content/references/sessions-and-queries.md.jinja +153 -0
  67. flint_kit-0.14.0/src/flint/skills/sqlalchemy/skill.json +5 -0
  68. flint_kit-0.14.0/src/flint/skills/sqlmodel/content/SKILL.md.jinja +84 -0
  69. flint_kit-0.14.0/src/flint/skills/sqlmodel/content/guides/add-a-model.md.jinja +131 -0
  70. flint_kit-0.14.0/src/flint/skills/sqlmodel/content/references/gotchas.md.jinja +80 -0
  71. flint_kit-0.14.0/src/flint/skills/sqlmodel/content/references/models-and-sessions.md.jinja +142 -0
  72. flint_kit-0.14.0/src/flint/skills/sqlmodel/skill.json +5 -0
  73. flint_kit-0.14.0/src/flint/skills/taskiq/content/SKILL.md.jinja +72 -0
  74. flint_kit-0.14.0/src/flint/skills/taskiq/content/guides/add-a-task.md.jinja +88 -0
  75. flint_kit-0.14.0/src/flint/skills/taskiq/content/references/broker-and-tasks.md.jinja +121 -0
  76. flint_kit-0.14.0/src/flint/skills/taskiq/content/references/gotchas.md.jinja +100 -0
  77. flint_kit-0.14.0/src/flint/skills/taskiq/skill.json +5 -0
  78. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/README.md +63 -0
  79. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/config/env.jinja +2 -0
  80. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/config/src/{{package_name}}/core/__init__.py.jinja +0 -0
  81. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/config/src/{{package_name}}/core/config.py.jinja +11 -0
  82. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/config/src/{{package_name}}/main.py.jinja +10 -0
  83. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/docker/Dockerfile.jinja +19 -0
  84. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/docker/dockerignore.jinja +8 -0
  85. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/files/AGENTS.md.jinja +58 -0
  86. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/files/README.md.jinja +46 -0
  87. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/files/gitignore.jinja +6 -0
  88. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/files/pyproject.toml.jinja +24 -0
  89. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/files/src/{{package_name}}/__init__.py.jinja +1 -0
  90. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/files/src/{{package_name}}/main.py.jinja +8 -0
  91. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/files/tests/test_main.py.jinja +11 -0
  92. flint_kit-0.14.0/src/flint/templates/fastapi/hello-world/template.json +23 -0
  93. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/README.md +142 -0
  94. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/db-sqlalchemy/src/{{package_name}}/core/db.py.jinja +19 -0
  95. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/db-sqlalchemy/src/{{package_name}}/models.py.jinja +13 -0
  96. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/db-sqlalchemy/src/{{package_name}}/routes/items.py.jinja +41 -0
  97. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/db-sqlalchemy/tests/conftest.py.jinja +44 -0
  98. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/db-sqlalchemy/tests/test_main.py.jinja +29 -0
  99. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/db-sqlmodel/src/{{package_name}}/core/db.py.jinja +20 -0
  100. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/db-sqlmodel/src/{{package_name}}/models.py.jinja +7 -0
  101. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/db-sqlmodel/src/{{package_name}}/routes/items.py.jinja +41 -0
  102. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/db-sqlmodel/tests/conftest.py.jinja +45 -0
  103. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/db-sqlmodel/tests/test_main.py.jinja +29 -0
  104. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/docker/Dockerfile.jinja +19 -0
  105. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/docker/dockerignore.jinja +11 -0
  106. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/AGENTS.md.jinja +124 -0
  107. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/README.md.jinja +150 -0
  108. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/env.jinja +13 -0
  109. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/gitignore.jinja +9 -0
  110. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/pyproject.toml.jinja +56 -0
  111. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/src/{{package_name}}/__init__.py.jinja +1 -0
  112. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/src/{{package_name}}/core/__init__.py.jinja +0 -0
  113. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/src/{{package_name}}/core/config.py.jinja +22 -0
  114. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/src/{{package_name}}/main.py.jinja +61 -0
  115. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/src/{{package_name}}/routes/__init__.py.jinja +0 -0
  116. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/src/{{package_name}}/routes/items.py.jinja +39 -0
  117. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/src/{{package_name}}/schemas.py.jinja +12 -0
  118. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/files/tests/test_main.py.jinja +31 -0
  119. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/migrations-sqlalchemy/alembic/env.py.jinja +50 -0
  120. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/migrations-sqlalchemy/alembic/script.py.mako +27 -0
  121. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/migrations-sqlalchemy/alembic/versions/gitkeep.jinja +0 -0
  122. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/migrations-sqlalchemy/alembic.ini.jinja +37 -0
  123. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/migrations-sqlmodel/alembic/env.py.jinja +51 -0
  124. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/migrations-sqlmodel/alembic/script.py.mako +28 -0
  125. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/migrations-sqlmodel/alembic/versions/gitkeep.jinja +0 -0
  126. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/migrations-sqlmodel/alembic.ini.jinja +37 -0
  127. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/redis/src/{{package_name}}/core/redis.py.jinja +5 -0
  128. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/template.json +91 -0
  129. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/worker-celery/src/{{package_name}}/tasks/__init__.py.jinja +0 -0
  130. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/worker-celery/src/{{package_name}}/tasks/example.py.jinja +6 -0
  131. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/worker-celery/src/{{package_name}}/worker.py.jinja +16 -0
  132. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/worker-taskiq/src/{{package_name}}/tasks/__init__.py.jinja +0 -0
  133. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/worker-taskiq/src/{{package_name}}/tasks/example.py.jinja +6 -0
  134. flint_kit-0.14.0/src/flint/templates/fastapi/rest-api/worker-taskiq/src/{{package_name}}/worker.py.jinja +19 -0
  135. flint_kit-0.14.0/src/flint/templates/fastapi/template.json +7 -0
  136. flint_kit-0.14.0/src/flint/templates/flask/hello-world/README.md +142 -0
  137. flint_kit-0.14.0/src/flint/templates/flask/hello-world/config/env.jinja +2 -0
  138. flint_kit-0.14.0/src/flint/templates/flask/hello-world/config/src/{{package_name}}/core/__init__.py.jinja +0 -0
  139. flint_kit-0.14.0/src/flint/templates/flask/hello-world/config/src/{{package_name}}/core/config.py.jinja +11 -0
  140. flint_kit-0.14.0/src/flint/templates/flask/hello-world/config/src/{{package_name}}/main.py.jinja +12 -0
  141. flint_kit-0.14.0/src/flint/templates/flask/hello-world/docker/Dockerfile.jinja +19 -0
  142. flint_kit-0.14.0/src/flint/templates/flask/hello-world/docker/dockerignore.jinja +8 -0
  143. flint_kit-0.14.0/src/flint/templates/flask/hello-world/files/AGENTS.md.jinja +58 -0
  144. flint_kit-0.14.0/src/flint/templates/flask/hello-world/files/README.md.jinja +46 -0
  145. flint_kit-0.14.0/src/flint/templates/flask/hello-world/files/gitignore.jinja +6 -0
  146. flint_kit-0.14.0/src/flint/templates/flask/hello-world/files/pyproject.toml.jinja +26 -0
  147. flint_kit-0.14.0/src/flint/templates/flask/hello-world/files/src/{{package_name}}/__init__.py.jinja +1 -0
  148. flint_kit-0.14.0/src/flint/templates/flask/hello-world/files/src/{{package_name}}/main.py.jinja +8 -0
  149. flint_kit-0.14.0/src/flint/templates/flask/hello-world/files/tests/test_main.py.jinja +8 -0
  150. flint_kit-0.14.0/src/flint/templates/flask/hello-world/template.json +23 -0
  151. flint_kit-0.14.0/src/flint/templates/flask/rest-api/README.md +343 -0
  152. flint_kit-0.14.0/src/flint/templates/flask/rest-api/db-flask-sqlalchemy/src/{{package_name}}/core/db.py.jinja +32 -0
  153. flint_kit-0.14.0/src/flint/templates/flask/rest-api/db-flask-sqlalchemy/src/{{package_name}}/models.py.jinja +9 -0
  154. flint_kit-0.14.0/src/flint/templates/flask/rest-api/db-flask-sqlalchemy/src/{{package_name}}/routes/items.py.jinja +44 -0
  155. flint_kit-0.14.0/src/flint/templates/flask/rest-api/db-flask-sqlalchemy/tests/conftest.py.jinja +13 -0
  156. flint_kit-0.14.0/src/flint/templates/flask/rest-api/db-flask-sqlalchemy/tests/test_main.py.jinja +24 -0
  157. flint_kit-0.14.0/src/flint/templates/flask/rest-api/db-sqlalchemy/src/{{package_name}}/core/db.py.jinja +52 -0
  158. flint_kit-0.14.0/src/flint/templates/flask/rest-api/db-sqlalchemy/src/{{package_name}}/models.py.jinja +13 -0
  159. flint_kit-0.14.0/src/flint/templates/flask/rest-api/db-sqlalchemy/src/{{package_name}}/routes/items.py.jinja +49 -0
  160. flint_kit-0.14.0/src/flint/templates/flask/rest-api/db-sqlalchemy/tests/conftest.py.jinja +13 -0
  161. flint_kit-0.14.0/src/flint/templates/flask/rest-api/db-sqlalchemy/tests/test_main.py.jinja +24 -0
  162. flint_kit-0.14.0/src/flint/templates/flask/rest-api/docker/Dockerfile.jinja +20 -0
  163. flint_kit-0.14.0/src/flint/templates/flask/rest-api/docker/dockerignore.jinja +12 -0
  164. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/AGENTS.md.jinja +139 -0
  165. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/README.md.jinja +151 -0
  166. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/env.jinja +13 -0
  167. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/gitignore.jinja +10 -0
  168. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/pyproject.toml.jinja +43 -0
  169. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/src/{{package_name}}/__init__.py.jinja +1 -0
  170. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/src/{{package_name}}/core/__init__.py.jinja +0 -0
  171. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/src/{{package_name}}/core/config.py.jinja +22 -0
  172. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/src/{{package_name}}/main.py.jinja +50 -0
  173. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/src/{{package_name}}/routes/__init__.py.jinja +0 -0
  174. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/src/{{package_name}}/routes/items.py.jinja +46 -0
  175. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/src/{{package_name}}/schemas.py.jinja +14 -0
  176. flint_kit-0.14.0/src/flint/templates/flask/rest-api/files/tests/test_main.py.jinja +30 -0
  177. flint_kit-0.14.0/src/flint/templates/flask/rest-api/migrations-flask-sqlalchemy/migrations/README +1 -0
  178. flint_kit-0.14.0/src/flint/templates/flask/rest-api/migrations-flask-sqlalchemy/migrations/alembic.ini +50 -0
  179. flint_kit-0.14.0/src/flint/templates/flask/rest-api/migrations-flask-sqlalchemy/migrations/env.py +113 -0
  180. flint_kit-0.14.0/src/flint/templates/flask/rest-api/migrations-flask-sqlalchemy/migrations/script.py.mako +24 -0
  181. flint_kit-0.14.0/src/flint/templates/flask/rest-api/migrations-flask-sqlalchemy/migrations/versions/gitkeep.jinja +0 -0
  182. flint_kit-0.14.0/src/flint/templates/flask/rest-api/migrations-flask-sqlalchemy/src/{{package_name}}/core/db.py.jinja +39 -0
  183. flint_kit-0.14.0/src/flint/templates/flask/rest-api/migrations-sqlalchemy/alembic/env.py.jinja +44 -0
  184. flint_kit-0.14.0/src/flint/templates/flask/rest-api/migrations-sqlalchemy/alembic/script.py.mako +27 -0
  185. flint_kit-0.14.0/src/flint/templates/flask/rest-api/migrations-sqlalchemy/alembic/versions/gitkeep.jinja +0 -0
  186. flint_kit-0.14.0/src/flint/templates/flask/rest-api/migrations-sqlalchemy/alembic.ini.jinja +37 -0
  187. flint_kit-0.14.0/src/flint/templates/flask/rest-api/redis/src/{{package_name}}/core/redis.py.jinja +5 -0
  188. flint_kit-0.14.0/src/flint/templates/flask/rest-api/template.json +89 -0
  189. flint_kit-0.14.0/src/flint/templates/flask/rest-api/worker-celery/src/{{package_name}}/tasks/__init__.py.jinja +0 -0
  190. flint_kit-0.14.0/src/flint/templates/flask/rest-api/worker-celery/src/{{package_name}}/tasks/example.py.jinja +6 -0
  191. flint_kit-0.14.0/src/flint/templates/flask/rest-api/worker-celery/src/{{package_name}}/worker.py.jinja +16 -0
  192. flint_kit-0.14.0/src/flint/templates/flask/template.json +7 -0
@@ -0,0 +1,120 @@
1
+ Metadata-Version: 2.4
2
+ Name: flint-kit
3
+ Version: 0.14.0
4
+ Summary: Interactive project scaffolding for Python frameworks — create-next-app, for FastAPI, Flask, and friends.
5
+ Keywords: scaffolding,fastapi,cli,project-generator,create-next-app
6
+ Author: abdulazeezoj
7
+ License-Expression: MIT
8
+ Classifier: Environment :: Console
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Topic :: Software Development :: Code Generators
11
+ Requires-Dist: typer>=0.15.1
12
+ Requires-Dist: questionary>=2.1.0
13
+ Requires-Dist: rich>=13.9.4
14
+ Requires-Dist: jinja2>=3.1.4
15
+ Requires-Dist: pydantic>=2.10.3
16
+ Requires-Python: >=3.11
17
+ Project-URL: Repository, https://github.com/abdulazeezoj/flint
18
+ Description-Content-Type: text/markdown
19
+
20
+ # flint
21
+
22
+ [![CI](https://github.com/abdulazeezoj/flint/actions/workflows/ci.yml/badge.svg)](https://github.com/abdulazeezoj/flint/actions/workflows/ci.yml)
23
+ [![Docs](https://github.com/abdulazeezoj/flint/actions/workflows/docs.yml/badge.svg)](https://abdulazeezoj.github.io/flint/)
24
+ [![PyPI](https://img.shields.io/pypi/v/flint-kit)](https://pypi.org/project/flint-kit/)
25
+
26
+ `create-next-app`, for Python. One command, a short interactive wizard,
27
+ and you have a running project — no hand-written boilerplate. Pick a
28
+ richer template and the same wizard wires up a real database,
29
+ migrations, and a background worker too.
30
+
31
+ ```
32
+ uvx --from flint-kit flint
33
+ ```
34
+
35
+ ```
36
+ ? What is your project named? my-api
37
+ ? Which framework? FastAPI
38
+ ? Which template? REST API
39
+ ? Database? PostgreSQL
40
+ ? ORM? SQLModel
41
+ ? Add Alembic migrations? Yes
42
+ ? Background worker? Taskiq
43
+ Using uv to manage dependencies.
44
+ ? Add a Dockerfile? No
45
+ ? Initialize a git repository? Yes
46
+ ? Install dependencies with uv now? Yes
47
+
48
+ Options: database=postgres, orm=sqlmodel, migrations=True, worker=taskiq, broker=redis, redis=True
49
+ Creating my-api/ from fastapi/rest-api...
50
+ ✔ ...
51
+ ✔ Initialized git repository
52
+ ✔ Installed dependencies (uv sync)
53
+
54
+ Success! Created my-api at ./my-api
55
+
56
+ Next steps:
57
+ cd my-api
58
+ uv run alembic upgrade head
59
+ uv run fastapi dev src/my_api/main.py
60
+ uv run taskiq worker my_api.worker:broker --app-dir src # separate process
61
+ ```
62
+
63
+ **📖 Full documentation: [abdulazeezoj.github.io/flint](https://abdulazeezoj.github.io/flint/)**
64
+ — getting started, a full CLI reference, one page per template
65
+ (options, generated layout, gotchas), the `.agents/skills/` catalog,
66
+ remembered preferences, and how to contribute.
67
+
68
+ ## Install
69
+
70
+ ```
71
+ uv tool install flint-kit # persistent `flint` on PATH
72
+ # or run it ephemerally, no install:
73
+ uvx --from flint-kit flint
74
+ ```
75
+
76
+ ## Usage
77
+
78
+ ```
79
+ flint # interactive wizard
80
+ flint new my-api # interactive, name pre-filled
81
+ flint new my-api \
82
+ --framework fastapi --template rest-api \
83
+ -o database=sqlite -o orm=sqlmodel \
84
+ --docker --git --install --yes # fully non-interactive, for scripts/CI
85
+ flint list-templates # what's available, without generating anything
86
+ flint --version
87
+ flint --help
88
+ ```
89
+
90
+ Every prompt has a matching flag, and Flint remembers your last
91
+ choices in `~/.flint/last.json` as the new default next time. See the
92
+ [CLI Reference](https://abdulazeezoj.github.io/flint/cli-reference/)
93
+ and [Remembered Preferences](https://abdulazeezoj.github.io/flint/preferences/)
94
+ docs for the full details.
95
+
96
+ ## What flint ships
97
+
98
+ A project is always generated from a `<framework>/<template>` pair —
99
+ **FastAPI** and **Flask**, each with a **Hello World** and a fuller
100
+ **REST API** template offering real head-start choices (database, ORM,
101
+ migrations, a background worker, Redis). Every generated project also
102
+ gets `.agents/skills/` — deeper, library-specific reference material
103
+ for exactly the stack it uses. See the
104
+ [Templates](https://abdulazeezoj.github.io/flint/project-templates/)
105
+ and [Agent Skills](https://abdulazeezoj.github.io/flint/agent-skills/)
106
+ docs for what each one actually generates.
107
+
108
+ ## Contributing
109
+
110
+ ```
111
+ uv sync
112
+ uv run pytest # also runs coverage — the suite fails under 100%
113
+ uv run flint --help
114
+ ```
115
+
116
+ Adding a framework, template, or skill is a content-only change — no
117
+ code edits needed. See the
118
+ [Contributing](https://abdulazeezoj.github.io/flint/contributing/)
119
+ docs for the full local-setup, template/skill-authoring, and release
120
+ process, or [`CHANGELOG.md`](CHANGELOG.md) for release history.
@@ -0,0 +1,101 @@
1
+ # flint
2
+
3
+ [![CI](https://github.com/abdulazeezoj/flint/actions/workflows/ci.yml/badge.svg)](https://github.com/abdulazeezoj/flint/actions/workflows/ci.yml)
4
+ [![Docs](https://github.com/abdulazeezoj/flint/actions/workflows/docs.yml/badge.svg)](https://abdulazeezoj.github.io/flint/)
5
+ [![PyPI](https://img.shields.io/pypi/v/flint-kit)](https://pypi.org/project/flint-kit/)
6
+
7
+ `create-next-app`, for Python. One command, a short interactive wizard,
8
+ and you have a running project — no hand-written boilerplate. Pick a
9
+ richer template and the same wizard wires up a real database,
10
+ migrations, and a background worker too.
11
+
12
+ ```
13
+ uvx --from flint-kit flint
14
+ ```
15
+
16
+ ```
17
+ ? What is your project named? my-api
18
+ ? Which framework? FastAPI
19
+ ? Which template? REST API
20
+ ? Database? PostgreSQL
21
+ ? ORM? SQLModel
22
+ ? Add Alembic migrations? Yes
23
+ ? Background worker? Taskiq
24
+ Using uv to manage dependencies.
25
+ ? Add a Dockerfile? No
26
+ ? Initialize a git repository? Yes
27
+ ? Install dependencies with uv now? Yes
28
+
29
+ Options: database=postgres, orm=sqlmodel, migrations=True, worker=taskiq, broker=redis, redis=True
30
+ Creating my-api/ from fastapi/rest-api...
31
+ ✔ ...
32
+ ✔ Initialized git repository
33
+ ✔ Installed dependencies (uv sync)
34
+
35
+ Success! Created my-api at ./my-api
36
+
37
+ Next steps:
38
+ cd my-api
39
+ uv run alembic upgrade head
40
+ uv run fastapi dev src/my_api/main.py
41
+ uv run taskiq worker my_api.worker:broker --app-dir src # separate process
42
+ ```
43
+
44
+ **📖 Full documentation: [abdulazeezoj.github.io/flint](https://abdulazeezoj.github.io/flint/)**
45
+ — getting started, a full CLI reference, one page per template
46
+ (options, generated layout, gotchas), the `.agents/skills/` catalog,
47
+ remembered preferences, and how to contribute.
48
+
49
+ ## Install
50
+
51
+ ```
52
+ uv tool install flint-kit # persistent `flint` on PATH
53
+ # or run it ephemerally, no install:
54
+ uvx --from flint-kit flint
55
+ ```
56
+
57
+ ## Usage
58
+
59
+ ```
60
+ flint # interactive wizard
61
+ flint new my-api # interactive, name pre-filled
62
+ flint new my-api \
63
+ --framework fastapi --template rest-api \
64
+ -o database=sqlite -o orm=sqlmodel \
65
+ --docker --git --install --yes # fully non-interactive, for scripts/CI
66
+ flint list-templates # what's available, without generating anything
67
+ flint --version
68
+ flint --help
69
+ ```
70
+
71
+ Every prompt has a matching flag, and Flint remembers your last
72
+ choices in `~/.flint/last.json` as the new default next time. See the
73
+ [CLI Reference](https://abdulazeezoj.github.io/flint/cli-reference/)
74
+ and [Remembered Preferences](https://abdulazeezoj.github.io/flint/preferences/)
75
+ docs for the full details.
76
+
77
+ ## What flint ships
78
+
79
+ A project is always generated from a `<framework>/<template>` pair —
80
+ **FastAPI** and **Flask**, each with a **Hello World** and a fuller
81
+ **REST API** template offering real head-start choices (database, ORM,
82
+ migrations, a background worker, Redis). Every generated project also
83
+ gets `.agents/skills/` — deeper, library-specific reference material
84
+ for exactly the stack it uses. See the
85
+ [Templates](https://abdulazeezoj.github.io/flint/project-templates/)
86
+ and [Agent Skills](https://abdulazeezoj.github.io/flint/agent-skills/)
87
+ docs for what each one actually generates.
88
+
89
+ ## Contributing
90
+
91
+ ```
92
+ uv sync
93
+ uv run pytest # also runs coverage — the suite fails under 100%
94
+ uv run flint --help
95
+ ```
96
+
97
+ Adding a framework, template, or skill is a content-only change — no
98
+ code edits needed. See the
99
+ [Contributing](https://abdulazeezoj.github.io/flint/contributing/)
100
+ docs for the full local-setup, template/skill-authoring, and release
101
+ process, or [`CHANGELOG.md`](CHANGELOG.md) for release history.
@@ -0,0 +1,53 @@
1
+ [project]
2
+ name = "flint-kit"
3
+ version = "0.14.0"
4
+ description = "Interactive project scaffolding for Python frameworks — create-next-app, for FastAPI, Flask, and friends."
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ authors = [
8
+ { name = "abdulazeezoj" }
9
+ ]
10
+ requires-python = ">=3.11"
11
+ dependencies = [
12
+ "typer>=0.15.1",
13
+ "questionary>=2.1.0",
14
+ "rich>=13.9.4",
15
+ "jinja2>=3.1.4",
16
+ "pydantic>=2.10.3",
17
+ ]
18
+ keywords = ["scaffolding", "fastapi", "cli", "project-generator", "create-next-app"]
19
+ classifiers = [
20
+ "Environment :: Console",
21
+ "Intended Audience :: Developers",
22
+ "Topic :: Software Development :: Code Generators",
23
+ ]
24
+
25
+ [project.urls]
26
+ Repository = "https://github.com/abdulazeezoj/flint"
27
+
28
+ [project.scripts]
29
+ flint = "flint.cli:main"
30
+
31
+ [build-system]
32
+ requires = ["uv_build>=0.8.17,<0.9.0"]
33
+ build-backend = "uv_build"
34
+
35
+ [tool.uv.build-backend]
36
+ module-name = "flint"
37
+
38
+ [dependency-groups]
39
+ dev = [
40
+ "pytest>=8.3.4",
41
+ "pytest-cov>=7.1.0",
42
+ ]
43
+ docs = [
44
+ "mkdocs>=1.6.1",
45
+ "mkdocs-material>=9.5.49",
46
+ ]
47
+
48
+ [tool.pytest.ini_options]
49
+ addopts = "--cov=flint --cov-report=term-missing --cov-fail-under=100"
50
+
51
+ [tool.coverage.run]
52
+ branch = true
53
+ source = ["flint"]
@@ -0,0 +1,3 @@
1
+ """Flint — interactive project scaffolding for Python frameworks."""
2
+
3
+ __version__ = "0.14.0"
@@ -0,0 +1,4 @@
1
+ from flint.cli import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
@@ -0,0 +1,289 @@
1
+ """The `flint` command-line app.
2
+
3
+ See PRODUCT_FLOW.md §1 for the entry-point table this implements: bare
4
+ `flint` behaves like `flint new` (an interactive wizard), `flint new
5
+ NAME --flags...` skips prompts for anything a flag already answers, and
6
+ `--yes` / a non-TTY stdin skips prompting entirely.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import sys
12
+ from pathlib import Path
13
+ from typing import Annotated, Optional
14
+
15
+ import typer
16
+ from rich.console import Console
17
+ from rich.table import Table
18
+
19
+ from flint import __version__
20
+ from flint import generator, postgen, prefs, prompts
21
+ from flint.errors import FlintUserError
22
+
23
+ app = typer.Typer(add_completion=False, no_args_is_help=False)
24
+ console = Console()
25
+
26
+
27
+ @app.callback(invoke_without_command=True)
28
+ def root(
29
+ ctx: typer.Context,
30
+ version: Annotated[
31
+ bool, typer.Option("--version", help="Show the version and exit.")
32
+ ] = False,
33
+ ) -> None:
34
+ """Flint — interactive project scaffolding for Python frameworks."""
35
+ if version:
36
+ console.print(f"flint {__version__}")
37
+ raise typer.Exit()
38
+ if ctx.invoked_subcommand is None:
39
+ _run_new(
40
+ name=None,
41
+ framework=None,
42
+ template=None,
43
+ option=[],
44
+ docker=None,
45
+ git=None,
46
+ install=None,
47
+ yes=False,
48
+ force=False,
49
+ remember=True,
50
+ )
51
+
52
+
53
+ @app.command()
54
+ def new(
55
+ name: Annotated[
56
+ Optional[str], typer.Argument(help="Project name, e.g. 'my-api'.")
57
+ ] = None,
58
+ framework: Annotated[
59
+ Optional[str], typer.Option(help="Framework to use, e.g. 'fastapi'.")
60
+ ] = None,
61
+ template: Annotated[
62
+ Optional[str],
63
+ typer.Option(help="Template variant within the framework, e.g. 'hello-world'."),
64
+ ] = None,
65
+ option: Annotated[
66
+ list[str],
67
+ typer.Option(
68
+ "--option",
69
+ "-o",
70
+ help=(
71
+ "Set a template-specific option as key=value (repeatable), "
72
+ "e.g. -o database=postgres -o orm=sqlmodel. See the wizard "
73
+ "or the template's README for available keys."
74
+ ),
75
+ ),
76
+ ] = [], # noqa: B006 - Typer's documented pattern for repeatable options
77
+ docker: Annotated[
78
+ Optional[bool],
79
+ typer.Option("--docker/--no-docker", help="Add a Dockerfile."),
80
+ ] = None,
81
+ git: Annotated[
82
+ Optional[bool],
83
+ typer.Option("--git/--no-git", help="Initialize a git repository."),
84
+ ] = None,
85
+ install: Annotated[
86
+ Optional[bool],
87
+ typer.Option("--install/--no-install", help="Install dependencies with uv."),
88
+ ] = None,
89
+ yes: Annotated[
90
+ bool,
91
+ typer.Option(
92
+ "--yes", "-y", help="Accept defaults for anything not given as a flag."
93
+ ),
94
+ ] = False,
95
+ force: Annotated[
96
+ bool,
97
+ typer.Option(
98
+ "--force", help="Generate even if the target directory already exists."
99
+ ),
100
+ ] = False,
101
+ remember: Annotated[
102
+ bool,
103
+ typer.Option(
104
+ "--remember/--no-remember",
105
+ help=(
106
+ "Remember these choices in ~/.flint/last.json as the "
107
+ "default for next time (framework/template + per-template "
108
+ "options, docker, git, install). Explicit flags/--option "
109
+ "always win regardless."
110
+ ),
111
+ ),
112
+ ] = True,
113
+ ) -> None:
114
+ """Generate a new project."""
115
+ _run_new(
116
+ name=name,
117
+ framework=framework,
118
+ template=template,
119
+ option=option,
120
+ docker=docker,
121
+ git=git,
122
+ install=install,
123
+ yes=yes,
124
+ force=force,
125
+ remember=remember,
126
+ )
127
+
128
+
129
+ @app.command("list-templates")
130
+ def list_templates_cmd() -> None:
131
+ """List available framework/template combinations."""
132
+ table = Table()
133
+ table.add_column("Framework")
134
+ table.add_column("Template")
135
+ table.add_column("Description")
136
+ table.add_column("Docker", justify="center")
137
+
138
+ for framework in generator.list_frameworks():
139
+ framework_label = (
140
+ framework.label if framework.enabled else f"{framework.label} (coming soon)"
141
+ )
142
+ for template in generator.list_templates(framework.id):
143
+ template_label = (
144
+ template.label if template.enabled else f"{template.label} (coming soon)"
145
+ )
146
+ table.add_row(
147
+ framework_label,
148
+ template_label,
149
+ template.description,
150
+ "✓" if template.supports_docker else "—",
151
+ )
152
+
153
+ console.print(table)
154
+ console.print(
155
+ "\nPass a pair with e.g. [bold]flint new my-api --framework fastapi "
156
+ "--template rest-api[/bold]. Templates with their own choices "
157
+ "(database, ORM, ...) take -o key=value — see the wizard or each "
158
+ "template's README for available keys."
159
+ )
160
+
161
+
162
+ def _run_new(
163
+ *,
164
+ name: Optional[str],
165
+ framework: Optional[str],
166
+ template: Optional[str],
167
+ option: list[str],
168
+ docker: Optional[bool],
169
+ git: Optional[bool],
170
+ install: Optional[bool],
171
+ yes: bool,
172
+ force: bool,
173
+ remember: bool,
174
+ ) -> None:
175
+ interactive = sys.stdin.isatty() and not yes
176
+ stored_prefs = prefs.load_prefs() if remember else {}
177
+
178
+ try:
179
+ project_name, slug, package_name = prompts.prompt_project_name(name, interactive)
180
+
181
+ target_dir = Path.cwd() / slug
182
+ if target_dir.exists() and any(target_dir.iterdir()):
183
+ force = prompts.prompt_force_overwrite(slug, force, interactive)
184
+ if not force:
185
+ raise FlintUserError(
186
+ f"Directory '{slug}' already exists and is not empty. "
187
+ "Use --force to generate into it anyway."
188
+ )
189
+
190
+ frameworks = generator.list_frameworks()
191
+ framework_id = prompts.prompt_framework(
192
+ framework,
193
+ frameworks,
194
+ interactive,
195
+ default_id=prefs.get_last_framework(stored_prefs),
196
+ )
197
+
198
+ chosen_framework = generator.get_framework(framework_id)
199
+
200
+ templates = generator.list_templates(framework_id)
201
+ template_id = prompts.prompt_template(
202
+ template,
203
+ templates,
204
+ interactive,
205
+ default_id=prefs.get_last_template(stored_prefs, framework_id),
206
+ )
207
+
208
+ chosen_template = generator.get_template(framework_id, template_id)
209
+ remembered = prefs.get_template_prefs(stored_prefs, chosen_template.full_id)
210
+
211
+ provided_options = prompts.parse_option_flags(option)
212
+ resolved_options = prompts.prompt_template_options(
213
+ chosen_template, provided_options, interactive, last=remembered["options"]
214
+ )
215
+
216
+ docker_requested = prompts.prompt_docker(
217
+ docker, interactive, remembered=remembered["docker"]
218
+ )
219
+ if docker_requested and not chosen_template.supports_docker:
220
+ console.print(
221
+ f"[yellow]![/yellow] {chosen_template.full_id} doesn't support "
222
+ "--docker yet — skipping the Dockerfile."
223
+ )
224
+ docker_requested = False
225
+
226
+ if interactive:
227
+ console.print("Using uv to manage dependencies.")
228
+
229
+ git_init = prompts.prompt_git_init(git, interactive, remembered=remembered["git_init"])
230
+ install_now = prompts.prompt_install(install, interactive, remembered=remembered["install"])
231
+
232
+ answers = generator.Answers(
233
+ project_name=project_name,
234
+ slug=slug,
235
+ package_name=package_name,
236
+ framework=framework_id,
237
+ template=template_id,
238
+ git_init=git_init,
239
+ install=install_now,
240
+ docker=docker_requested,
241
+ options=resolved_options,
242
+ )
243
+ created = generator.render(framework_id, template_id, target_dir, answers, force=force)
244
+
245
+ if remember:
246
+ prefs.save_prefs(
247
+ prefs.record_run(
248
+ stored_prefs,
249
+ framework_id=framework_id,
250
+ template_id=template_id,
251
+ full_id=chosen_template.full_id,
252
+ options=resolved_options,
253
+ docker=docker_requested,
254
+ git_init=git_init,
255
+ install=install_now,
256
+ )
257
+ )
258
+
259
+ git_ok = postgen.git_init(target_dir) if git_init else False
260
+ installed_ok = postgen.install_dependencies(target_dir) if install_now else False
261
+
262
+ postgen.print_summary(
263
+ project_name=project_name,
264
+ slug=slug,
265
+ template_full_id=chosen_template.full_id,
266
+ target_dir=target_dir,
267
+ created=created,
268
+ git_ok=git_ok,
269
+ installed_ok=installed_ok,
270
+ installed_requested=install_now,
271
+ run_command=chosen_framework.run_command.format(package_name=package_name),
272
+ options=resolved_options,
273
+ )
274
+ except FlintUserError as exc:
275
+ console.print(f"[red]Error:[/red] {exc}")
276
+ raise typer.Exit(1) from None
277
+ except typer.Exit:
278
+ raise
279
+ except Exception as exc: # noqa: BLE001 - top-level safety net, see errors.py
280
+ console.print(f"[red]Unexpected error:[/red] {exc}")
281
+ raise typer.Exit(2) from None
282
+
283
+
284
+ def main() -> None:
285
+ app()
286
+
287
+
288
+ if __name__ == "__main__":
289
+ main()
@@ -0,0 +1,17 @@
1
+ """Flint's error hierarchy.
2
+
3
+ `FlintUserError` maps to exit code 1 (the user did something we can
4
+ explain, e.g. an existing directory or an invalid name). Anything else
5
+ bubbles up and is treated as exit code 2 (unexpected/internal error), per
6
+ PRODUCT_FLOW.md §5.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+
12
+ class FlintError(Exception):
13
+ """Base class for all Flint-raised errors."""
14
+
15
+
16
+ class FlintUserError(FlintError):
17
+ """An error caused by user input/environment, not a Flint bug."""