vibetuner 2.32.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 (85) hide show
  1. vibetuner-2.32.0/PKG-INFO +244 -0
  2. vibetuner-2.32.0/README.md +172 -0
  3. vibetuner-2.32.0/pyproject.toml +96 -0
  4. vibetuner-2.32.0/src/vibetuner/__init__.py +2 -0
  5. vibetuner-2.32.0/src/vibetuner/__main__.py +4 -0
  6. vibetuner-2.32.0/src/vibetuner/cli/__init__.py +124 -0
  7. vibetuner-2.32.0/src/vibetuner/cli/run.py +160 -0
  8. vibetuner-2.32.0/src/vibetuner/cli/scaffold.py +239 -0
  9. vibetuner-2.32.0/src/vibetuner/config.py +157 -0
  10. vibetuner-2.32.0/src/vibetuner/context.py +28 -0
  11. vibetuner-2.32.0/src/vibetuner/frontend/AGENTS.md +187 -0
  12. vibetuner-2.32.0/src/vibetuner/frontend/CLAUDE.md +187 -0
  13. vibetuner-2.32.0/src/vibetuner/frontend/__init__.py +122 -0
  14. vibetuner-2.32.0/src/vibetuner/frontend/deps.py +41 -0
  15. vibetuner-2.32.0/src/vibetuner/frontend/email.py +45 -0
  16. vibetuner-2.32.0/src/vibetuner/frontend/hotreload.py +13 -0
  17. vibetuner-2.32.0/src/vibetuner/frontend/lifespan.py +37 -0
  18. vibetuner-2.32.0/src/vibetuner/frontend/middleware.py +147 -0
  19. vibetuner-2.32.0/src/vibetuner/frontend/oauth.py +196 -0
  20. vibetuner-2.32.0/src/vibetuner/frontend/routes/__init__.py +12 -0
  21. vibetuner-2.32.0/src/vibetuner/frontend/routes/auth.py +156 -0
  22. vibetuner-2.32.0/src/vibetuner/frontend/routes/debug.py +424 -0
  23. vibetuner-2.32.0/src/vibetuner/frontend/routes/health.py +37 -0
  24. vibetuner-2.32.0/src/vibetuner/frontend/routes/language.py +43 -0
  25. vibetuner-2.32.0/src/vibetuner/frontend/routes/meta.py +55 -0
  26. vibetuner-2.32.0/src/vibetuner/frontend/routes/user.py +94 -0
  27. vibetuner-2.32.0/src/vibetuner/frontend/templates.py +221 -0
  28. vibetuner-2.32.0/src/vibetuner/logging.py +87 -0
  29. vibetuner-2.32.0/src/vibetuner/models/AGENTS.md +244 -0
  30. vibetuner-2.32.0/src/vibetuner/models/CLAUDE.md +244 -0
  31. vibetuner-2.32.0/src/vibetuner/models/__init__.py +14 -0
  32. vibetuner-2.32.0/src/vibetuner/models/blob.py +89 -0
  33. vibetuner-2.32.0/src/vibetuner/models/email_verification.py +84 -0
  34. vibetuner-2.32.0/src/vibetuner/models/mixins.py +76 -0
  35. vibetuner-2.32.0/src/vibetuner/models/oauth.py +57 -0
  36. vibetuner-2.32.0/src/vibetuner/models/registry.py +15 -0
  37. vibetuner-2.32.0/src/vibetuner/models/types.py +16 -0
  38. vibetuner-2.32.0/src/vibetuner/models/user.py +91 -0
  39. vibetuner-2.32.0/src/vibetuner/mongo.py +33 -0
  40. vibetuner-2.32.0/src/vibetuner/paths.py +253 -0
  41. vibetuner-2.32.0/src/vibetuner/services/AGENTS.md +132 -0
  42. vibetuner-2.32.0/src/vibetuner/services/CLAUDE.md +132 -0
  43. vibetuner-2.32.0/src/vibetuner/services/__init__.py +0 -0
  44. vibetuner-2.32.0/src/vibetuner/services/blob.py +161 -0
  45. vibetuner-2.32.0/src/vibetuner/services/email.py +49 -0
  46. vibetuner-2.32.0/src/vibetuner/services/s3_storage.py +454 -0
  47. vibetuner-2.32.0/src/vibetuner/tasks/AGENTS.md +98 -0
  48. vibetuner-2.32.0/src/vibetuner/tasks/CLAUDE.md +98 -0
  49. vibetuner-2.32.0/src/vibetuner/tasks/__init__.py +0 -0
  50. vibetuner-2.32.0/src/vibetuner/tasks/lifespan.py +28 -0
  51. vibetuner-2.32.0/src/vibetuner/tasks/worker.py +12 -0
  52. vibetuner-2.32.0/src/vibetuner/templates/email/AGENTS.md +48 -0
  53. vibetuner-2.32.0/src/vibetuner/templates/email/CLAUDE.md +48 -0
  54. vibetuner-2.32.0/src/vibetuner/templates/email/magic_link.html.jinja +17 -0
  55. vibetuner-2.32.0/src/vibetuner/templates/email/magic_link.txt.jinja +5 -0
  56. vibetuner-2.32.0/src/vibetuner/templates/frontend/AGENTS.md +74 -0
  57. vibetuner-2.32.0/src/vibetuner/templates/frontend/CLAUDE.md +74 -0
  58. vibetuner-2.32.0/src/vibetuner/templates/frontend/base/favicons.html.jinja +1 -0
  59. vibetuner-2.32.0/src/vibetuner/templates/frontend/base/footer.html.jinja +3 -0
  60. vibetuner-2.32.0/src/vibetuner/templates/frontend/base/header.html.jinja +0 -0
  61. vibetuner-2.32.0/src/vibetuner/templates/frontend/base/opengraph.html.jinja +7 -0
  62. vibetuner-2.32.0/src/vibetuner/templates/frontend/base/skeleton.html.jinja +45 -0
  63. vibetuner-2.32.0/src/vibetuner/templates/frontend/debug/collections.html.jinja +105 -0
  64. vibetuner-2.32.0/src/vibetuner/templates/frontend/debug/components/debug_nav.html.jinja +55 -0
  65. vibetuner-2.32.0/src/vibetuner/templates/frontend/debug/index.html.jinja +85 -0
  66. vibetuner-2.32.0/src/vibetuner/templates/frontend/debug/info.html.jinja +258 -0
  67. vibetuner-2.32.0/src/vibetuner/templates/frontend/debug/users.html.jinja +139 -0
  68. vibetuner-2.32.0/src/vibetuner/templates/frontend/debug/version.html.jinja +55 -0
  69. vibetuner-2.32.0/src/vibetuner/templates/frontend/email/magic_link.txt.jinja +5 -0
  70. vibetuner-2.32.0/src/vibetuner/templates/frontend/email_sent.html.jinja +83 -0
  71. vibetuner-2.32.0/src/vibetuner/templates/frontend/index.html.jinja +20 -0
  72. vibetuner-2.32.0/src/vibetuner/templates/frontend/lang/select.html.jinja +4 -0
  73. vibetuner-2.32.0/src/vibetuner/templates/frontend/login.html.jinja +89 -0
  74. vibetuner-2.32.0/src/vibetuner/templates/frontend/meta/browserconfig.xml.jinja +10 -0
  75. vibetuner-2.32.0/src/vibetuner/templates/frontend/meta/robots.txt.jinja +3 -0
  76. vibetuner-2.32.0/src/vibetuner/templates/frontend/meta/site.webmanifest.jinja +7 -0
  77. vibetuner-2.32.0/src/vibetuner/templates/frontend/meta/sitemap.xml.jinja +6 -0
  78. vibetuner-2.32.0/src/vibetuner/templates/frontend/user/edit.html.jinja +86 -0
  79. vibetuner-2.32.0/src/vibetuner/templates/frontend/user/profile.html.jinja +157 -0
  80. vibetuner-2.32.0/src/vibetuner/templates/markdown/.placeholder +0 -0
  81. vibetuner-2.32.0/src/vibetuner/templates/markdown/AGENTS.md +29 -0
  82. vibetuner-2.32.0/src/vibetuner/templates/markdown/CLAUDE.md +29 -0
  83. vibetuner-2.32.0/src/vibetuner/templates.py +146 -0
  84. vibetuner-2.32.0/src/vibetuner/time.py +57 -0
  85. vibetuner-2.32.0/src/vibetuner/versioning.py +12 -0
@@ -0,0 +1,244 @@
1
+ Metadata-Version: 2.3
2
+ Name: vibetuner
3
+ Version: 2.32.0
4
+ Summary: Core Python framework and blessed dependencies for production-ready FastAPI + MongoDB + HTMX projects
5
+ Keywords: fastapi,mongodb,htmx,web-framework,scaffolding,oauth,background-jobs
6
+ Author: All Tuner Labs, S.L.
7
+ License: MIT
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Framework :: FastAPI
17
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
18
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
19
+ Requires-Dist: aioboto3>=15.5.0
20
+ Requires-Dist: arel>=0.4.0
21
+ Requires-Dist: asyncer>=0.0.10
22
+ Requires-Dist: authlib>=1.6.5
23
+ Requires-Dist: beanie[zstd]>=2.0.1
24
+ Requires-Dist: click>=8.3.1
25
+ Requires-Dist: copier>=9.11.0,<9.11.1
26
+ Requires-Dist: email-validator>=2.3.0
27
+ Requires-Dist: fastapi[standard-no-fastapi-cloud-cli]>=0.122.0
28
+ Requires-Dist: granian[pname]>=2.6.0
29
+ Requires-Dist: httpx[http2]>=0.28.1
30
+ Requires-Dist: itsdangerous>=2.2.0
31
+ Requires-Dist: loguru>=0.7.3
32
+ Requires-Dist: pydantic[email]>=2.12.4
33
+ Requires-Dist: pydantic-extra-types[pycountry]>=2.10.6
34
+ Requires-Dist: pydantic-settings>=2.12.0
35
+ Requires-Dist: pyyaml>=6.0.3
36
+ Requires-Dist: redis[hiredis]>=7.1.0
37
+ Requires-Dist: rich>=14.2.0
38
+ Requires-Dist: sse-starlette>=3.0.3
39
+ Requires-Dist: starlette-babel>=1.0.3
40
+ Requires-Dist: starlette-htmx>=0.1.1
41
+ Requires-Dist: streaq[web]<6.0.0
42
+ Requires-Dist: typer-slim[standard]>=0.20.0
43
+ Requires-Dist: babel>=2.17.0 ; extra == 'dev'
44
+ Requires-Dist: cloudflare>=4.3.1 ; extra == 'dev'
45
+ Requires-Dist: djlint>=1.36.4 ; extra == 'dev'
46
+ Requires-Dist: dunamai>=1.25.0 ; extra == 'dev'
47
+ Requires-Dist: gh-bin>=2.83.1 ; extra == 'dev'
48
+ Requires-Dist: granian[pname,reload]>=2.6.0 ; extra == 'dev'
49
+ Requires-Dist: just-bin>=1.43.1 ; extra == 'dev'
50
+ Requires-Dist: prek>=0.2.19 ; extra == 'dev'
51
+ Requires-Dist: pysemver>=0.5.0 ; extra == 'dev'
52
+ Requires-Dist: ruff>=0.14.6 ; extra == 'dev'
53
+ Requires-Dist: rumdl>=0.0.182 ; extra == 'dev'
54
+ Requires-Dist: semver>=3.0.4 ; extra == 'dev'
55
+ Requires-Dist: taplo>=0.9.3 ; extra == 'dev'
56
+ Requires-Dist: ty>=0.0.1a28 ; extra == 'dev'
57
+ Requires-Dist: types-aioboto3[s3,ses]>=15.5.0 ; extra == 'dev'
58
+ Requires-Dist: types-authlib>=1.6.5.20251005 ; extra == 'dev'
59
+ Requires-Dist: types-pyyaml>=6.0.12.20250915 ; extra == 'dev'
60
+ Requires-Dist: uv-bump>=0.3.1 ; extra == 'dev'
61
+ Requires-Dist: pytest>=9.0.1 ; extra == 'test'
62
+ Requires-Dist: pytest-asyncio>=1.3.0 ; extra == 'test'
63
+ Requires-Python: >=3.11
64
+ Project-URL: Changelog, https://github.com/alltuner/vibetuner/blob/main/CHANGELOG.md
65
+ Project-URL: Documentation, https://vibetuner.alltuner.com/
66
+ Project-URL: Homepage, https://vibetuner.alltuner.com/
67
+ Project-URL: Issues, https://github.com/alltuner/vibetuner/issues
68
+ Project-URL: Repository, https://github.com/alltuner/vibetuner
69
+ Provides-Extra: dev
70
+ Provides-Extra: test
71
+ Description-Content-Type: text/markdown
72
+
73
+ # vibetuner
74
+
75
+ Core Python framework and blessed dependencies for Vibetuner projects
76
+
77
+ This package provides the complete Python framework and curated dependency set for building modern
78
+ web applications with Vibetuner. It includes everything from FastAPI and MongoDB integration to
79
+ authentication, background jobs, and CLI tools.
80
+
81
+ ## What is Vibetuner?
82
+
83
+ Vibetuner is a production-ready scaffolding tool for FastAPI + MongoDB + HTMX web applications.
84
+ This package (`vibetuner`) is the Python component that provides:
85
+
86
+ - Complete web application framework built on FastAPI
87
+ - MongoDB integration with Beanie ODM
88
+ - OAuth and magic link authentication out of the box
89
+ - Background job processing with Redis + Streaq
90
+ - CLI framework with Typer
91
+ - Email services, blob storage, and more
92
+
93
+ **This package is designed to be used within projects generated by the Vibetuner scaffolding
94
+ tool.** For standalone use, you'll need to set up the project structure manually.
95
+
96
+ ## Installation
97
+
98
+ ```bash
99
+ # In a Vibetuner-generated project (automatic)
100
+ uv sync
101
+
102
+ # Add to an existing project
103
+ uv add vibetuner
104
+
105
+ # With development dependencies
106
+ uv add vibetuner[dev]
107
+ ```
108
+
109
+ ## Quick Start
110
+
111
+ The recommended way to use Vibetuner is via the scaffolding tool:
112
+
113
+ ```bash
114
+ # Create a new project with all the framework code
115
+ uvx vibetuner scaffold new my-project
116
+ cd my-project
117
+ just dev
118
+ ```
119
+
120
+ This will generate a complete project with:
121
+
122
+ - Pre-configured FastAPI application
123
+ - Authentication system (OAuth + magic links)
124
+ - MongoDB models and configuration
125
+ - Frontend templates and asset pipeline
126
+ - Docker setup for development and production
127
+ - CLI commands and background job infrastructure
128
+
129
+ ## What's Included
130
+
131
+ ### Core Framework (`src/vibetuner/`)
132
+
133
+ - **`frontend/`**: FastAPI app, routes, middleware, auth
134
+ - **`models/`**: User, OAuth, email verification, blob storage models
135
+ - **`services/`**: Email (SES), blob storage (S3)
136
+ - **`tasks/`**: Background job infrastructure
137
+ - **`cli/`**: CLI framework with scaffold, run commands
138
+ - **`config.py`**: Pydantic settings management
139
+ - **`mongo.py`**: MongoDB/Beanie setup
140
+ - **`logging.py`**: Structured logging configuration
141
+
142
+ ### Blessed Dependencies
143
+
144
+ - **FastAPI** (0.121+): Modern, fast web framework
145
+ - **Beanie**: Async MongoDB ODM with Pydantic
146
+ - **Authlib**: OAuth 1.0/2.0 client
147
+ - **Granian**: High-performance ASGI server
148
+ - **Redis** + **Streaq**: Background task processing
149
+ - **Typer**: CLI framework
150
+ - **Rich**: Beautiful terminal output
151
+ - **Loguru**: Structured logging
152
+ - **Pydantic**: Data validation and settings
153
+
154
+ See [pyproject.toml](./pyproject.toml) for the complete dependency list.
155
+
156
+ ## CLI Tools
157
+
158
+ When installed, provides the `vibetuner` command:
159
+
160
+ ```bash
161
+ # Create new project from template
162
+ vibetuner scaffold new my-project
163
+ vibetuner scaffold new my-project --defaults
164
+
165
+ # Update existing project
166
+ vibetuner scaffold update
167
+
168
+ # Run development server (in generated projects)
169
+ vibetuner run dev frontend
170
+ vibetuner run dev worker
171
+
172
+ # Run production server (in generated projects)
173
+ vibetuner run prod frontend
174
+ vibetuner run prod worker
175
+ ```
176
+
177
+ ## Development Dependencies
178
+
179
+ The `[dev]` extra includes all tools needed for development:
180
+
181
+ - **Ruff**: Fast linting and formatting
182
+ - **Babel**: i18n message extraction
183
+ - **pre-commit**: Git hooks (prek is a fast pre-commit drop-in replacement)
184
+ - **Type stubs**: For aioboto3, authlib, PyYAML
185
+ - And more...
186
+
187
+ ## Usage in Generated Projects
188
+
189
+ In a Vibetuner-generated project, import from `vibetuner`:
190
+
191
+ ```python
192
+ # Use core models
193
+ from vibetuner.models import UserModel, OAuthAccountModel
194
+
195
+ # Use services
196
+ from vibetuner.services.email import send_email
197
+
198
+ # Use configuration
199
+ from vibetuner.config import settings
200
+
201
+ # Extend core routes
202
+ from vibetuner.frontend import app
203
+
204
+ # Add your routes
205
+ @app.get("/api/hello")
206
+ async def hello():
207
+ return {"message": "Hello World"}
208
+ ```
209
+
210
+ ## Documentation
211
+
212
+ For complete documentation, guides, and examples, see the main Vibetuner repository:
213
+
214
+ **📖 [Vibetuner Documentation](https://vibetuner.alltuner.com/)**
215
+
216
+ ## Package Ecosystem
217
+
218
+ Vibetuner consists of three packages that work together:
219
+
220
+ 1. **vibetuner** (this package): Python framework and dependencies
221
+ 2. **[@alltuner/vibetuner](https://www.npmjs.com/package/@alltuner/vibetuner)**: JavaScript/CSS build dependencies
222
+ 3. **Scaffolding template**: Copier template for project generation
223
+
224
+ All three are version-locked and tested together to ensure compatibility.
225
+
226
+ ## Contributing
227
+
228
+ Contributions welcome! See the main repository for contribution guidelines:
229
+
230
+ **🤝 [Contributing to Vibetuner](https://github.com/alltuner/vibetuner/blob/main/CONTRIBUTING.md)**
231
+
232
+ ## License
233
+
234
+ MIT License - Copyright (c) 2025 All Tuner Labs, S.L.
235
+
236
+ See [LICENSE](https://github.com/alltuner/vibetuner/blob/main/LICENSE) for details.
237
+
238
+ ## Links
239
+
240
+ - **Main Repository**: <https://github.com/alltuner/vibetuner>
241
+ - **Documentation**: <https://vibetuner.alltuner.com/>
242
+ - **Issues**: <https://github.com/alltuner/vibetuner/issues>
243
+ - **PyPI**: <https://pypi.org/project/vibetuner/>
244
+ - **npm Package**: <https://www.npmjs.com/package/@alltuner/vibetuner>
@@ -0,0 +1,172 @@
1
+ # vibetuner
2
+
3
+ Core Python framework and blessed dependencies for Vibetuner projects
4
+
5
+ This package provides the complete Python framework and curated dependency set for building modern
6
+ web applications with Vibetuner. It includes everything from FastAPI and MongoDB integration to
7
+ authentication, background jobs, and CLI tools.
8
+
9
+ ## What is Vibetuner?
10
+
11
+ Vibetuner is a production-ready scaffolding tool for FastAPI + MongoDB + HTMX web applications.
12
+ This package (`vibetuner`) is the Python component that provides:
13
+
14
+ - Complete web application framework built on FastAPI
15
+ - MongoDB integration with Beanie ODM
16
+ - OAuth and magic link authentication out of the box
17
+ - Background job processing with Redis + Streaq
18
+ - CLI framework with Typer
19
+ - Email services, blob storage, and more
20
+
21
+ **This package is designed to be used within projects generated by the Vibetuner scaffolding
22
+ tool.** For standalone use, you'll need to set up the project structure manually.
23
+
24
+ ## Installation
25
+
26
+ ```bash
27
+ # In a Vibetuner-generated project (automatic)
28
+ uv sync
29
+
30
+ # Add to an existing project
31
+ uv add vibetuner
32
+
33
+ # With development dependencies
34
+ uv add vibetuner[dev]
35
+ ```
36
+
37
+ ## Quick Start
38
+
39
+ The recommended way to use Vibetuner is via the scaffolding tool:
40
+
41
+ ```bash
42
+ # Create a new project with all the framework code
43
+ uvx vibetuner scaffold new my-project
44
+ cd my-project
45
+ just dev
46
+ ```
47
+
48
+ This will generate a complete project with:
49
+
50
+ - Pre-configured FastAPI application
51
+ - Authentication system (OAuth + magic links)
52
+ - MongoDB models and configuration
53
+ - Frontend templates and asset pipeline
54
+ - Docker setup for development and production
55
+ - CLI commands and background job infrastructure
56
+
57
+ ## What's Included
58
+
59
+ ### Core Framework (`src/vibetuner/`)
60
+
61
+ - **`frontend/`**: FastAPI app, routes, middleware, auth
62
+ - **`models/`**: User, OAuth, email verification, blob storage models
63
+ - **`services/`**: Email (SES), blob storage (S3)
64
+ - **`tasks/`**: Background job infrastructure
65
+ - **`cli/`**: CLI framework with scaffold, run commands
66
+ - **`config.py`**: Pydantic settings management
67
+ - **`mongo.py`**: MongoDB/Beanie setup
68
+ - **`logging.py`**: Structured logging configuration
69
+
70
+ ### Blessed Dependencies
71
+
72
+ - **FastAPI** (0.121+): Modern, fast web framework
73
+ - **Beanie**: Async MongoDB ODM with Pydantic
74
+ - **Authlib**: OAuth 1.0/2.0 client
75
+ - **Granian**: High-performance ASGI server
76
+ - **Redis** + **Streaq**: Background task processing
77
+ - **Typer**: CLI framework
78
+ - **Rich**: Beautiful terminal output
79
+ - **Loguru**: Structured logging
80
+ - **Pydantic**: Data validation and settings
81
+
82
+ See [pyproject.toml](./pyproject.toml) for the complete dependency list.
83
+
84
+ ## CLI Tools
85
+
86
+ When installed, provides the `vibetuner` command:
87
+
88
+ ```bash
89
+ # Create new project from template
90
+ vibetuner scaffold new my-project
91
+ vibetuner scaffold new my-project --defaults
92
+
93
+ # Update existing project
94
+ vibetuner scaffold update
95
+
96
+ # Run development server (in generated projects)
97
+ vibetuner run dev frontend
98
+ vibetuner run dev worker
99
+
100
+ # Run production server (in generated projects)
101
+ vibetuner run prod frontend
102
+ vibetuner run prod worker
103
+ ```
104
+
105
+ ## Development Dependencies
106
+
107
+ The `[dev]` extra includes all tools needed for development:
108
+
109
+ - **Ruff**: Fast linting and formatting
110
+ - **Babel**: i18n message extraction
111
+ - **pre-commit**: Git hooks (prek is a fast pre-commit drop-in replacement)
112
+ - **Type stubs**: For aioboto3, authlib, PyYAML
113
+ - And more...
114
+
115
+ ## Usage in Generated Projects
116
+
117
+ In a Vibetuner-generated project, import from `vibetuner`:
118
+
119
+ ```python
120
+ # Use core models
121
+ from vibetuner.models import UserModel, OAuthAccountModel
122
+
123
+ # Use services
124
+ from vibetuner.services.email import send_email
125
+
126
+ # Use configuration
127
+ from vibetuner.config import settings
128
+
129
+ # Extend core routes
130
+ from vibetuner.frontend import app
131
+
132
+ # Add your routes
133
+ @app.get("/api/hello")
134
+ async def hello():
135
+ return {"message": "Hello World"}
136
+ ```
137
+
138
+ ## Documentation
139
+
140
+ For complete documentation, guides, and examples, see the main Vibetuner repository:
141
+
142
+ **📖 [Vibetuner Documentation](https://vibetuner.alltuner.com/)**
143
+
144
+ ## Package Ecosystem
145
+
146
+ Vibetuner consists of three packages that work together:
147
+
148
+ 1. **vibetuner** (this package): Python framework and dependencies
149
+ 2. **[@alltuner/vibetuner](https://www.npmjs.com/package/@alltuner/vibetuner)**: JavaScript/CSS build dependencies
150
+ 3. **Scaffolding template**: Copier template for project generation
151
+
152
+ All three are version-locked and tested together to ensure compatibility.
153
+
154
+ ## Contributing
155
+
156
+ Contributions welcome! See the main repository for contribution guidelines:
157
+
158
+ **🤝 [Contributing to Vibetuner](https://github.com/alltuner/vibetuner/blob/main/CONTRIBUTING.md)**
159
+
160
+ ## License
161
+
162
+ MIT License - Copyright (c) 2025 All Tuner Labs, S.L.
163
+
164
+ See [LICENSE](https://github.com/alltuner/vibetuner/blob/main/LICENSE) for details.
165
+
166
+ ## Links
167
+
168
+ - **Main Repository**: <https://github.com/alltuner/vibetuner>
169
+ - **Documentation**: <https://vibetuner.alltuner.com/>
170
+ - **Issues**: <https://github.com/alltuner/vibetuner/issues>
171
+ - **PyPI**: <https://pypi.org/project/vibetuner/>
172
+ - **npm Package**: <https://www.npmjs.com/package/@alltuner/vibetuner>
@@ -0,0 +1,96 @@
1
+ [project]
2
+ name = "vibetuner"
3
+ description = "Core Python framework and blessed dependencies for production-ready FastAPI + MongoDB + HTMX projects"
4
+ version = "2.32.0"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ license = { text = "MIT" }
8
+ authors = [{ name = "All Tuner Labs, S.L." }]
9
+ keywords = ["fastapi", "mongodb", "htmx", "web-framework", "scaffolding", "oauth", "background-jobs"]
10
+ classifiers = [
11
+ "Development Status :: 4 - Beta",
12
+ "Intended Audience :: Developers",
13
+ "License :: OSI Approved :: MIT License",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3.11",
16
+ "Programming Language :: Python :: 3.12",
17
+ "Programming Language :: Python :: 3.13",
18
+ "Programming Language :: Python :: 3.14",
19
+ "Framework :: FastAPI",
20
+ "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
21
+ "Topic :: Software Development :: Libraries :: Application Frameworks",
22
+ ]
23
+ dependencies = [
24
+ # These are the base dependencies of AllTuner's blessed stack
25
+ "aioboto3>=15.5.0",
26
+ "arel>=0.4.0",
27
+ "asyncer>=0.0.10",
28
+ "authlib>=1.6.5",
29
+ "beanie[zstd]>=2.0.1",
30
+ "click>=8.3.1",
31
+ "copier>=9.11.0,<9.11.1",
32
+ "email-validator>=2.3.0",
33
+ "fastapi[standard-no-fastapi-cloud-cli]>=0.122.0",
34
+ "granian[pname]>=2.6.0",
35
+ "httpx[http2]>=0.28.1",
36
+ "itsdangerous>=2.2.0",
37
+ "loguru>=0.7.3",
38
+ "pydantic[email]>=2.12.4",
39
+ "pydantic-extra-types[pycountry]>=2.10.6",
40
+ "pydantic-settings>=2.12.0",
41
+ "pyyaml>=6.0.3",
42
+ "redis[hiredis]>=7.1.0",
43
+ "rich>=14.2.0",
44
+ "sse-starlette>=3.0.3",
45
+ "starlette-babel>=1.0.3",
46
+ "starlette-htmx>=0.1.1",
47
+ "streaq[web]<6.0.0",
48
+ "typer-slim[standard]>=0.20.0",
49
+ ]
50
+
51
+ [project.scripts]
52
+ vibetuner = "vibetuner.cli:app"
53
+
54
+ [project.urls]
55
+ Homepage = "https://vibetuner.alltuner.com/"
56
+ Documentation = "https://vibetuner.alltuner.com/"
57
+ Repository = "https://github.com/alltuner/vibetuner"
58
+ Issues = "https://github.com/alltuner/vibetuner/issues"
59
+ Changelog = "https://github.com/alltuner/vibetuner/blob/main/CHANGELOG.md"
60
+
61
+ [project.optional-dependencies]
62
+ dev = [
63
+ # These are the development dependencies of AllTuner's blessed stack
64
+ "babel>=2.17.0",
65
+ "cloudflare>=4.3.1",
66
+ "djlint>=1.36.4",
67
+ "dunamai>=1.25.0",
68
+ "gh-bin>=2.83.1",
69
+ "granian[pname,reload]>=2.6.0",
70
+ "just-bin>=1.43.1",
71
+ "prek>=0.2.19",
72
+ "pysemver>=0.5.0",
73
+ "ruff>=0.14.6",
74
+ "rumdl>=0.0.182",
75
+ "semver>=3.0.4",
76
+ "taplo>=0.9.3",
77
+ "ty>=0.0.1a28",
78
+ "types-aioboto3[s3,ses]>=15.5.0",
79
+ "types-authlib>=1.6.5.20251005",
80
+ "types-pyyaml>=6.0.12.20250915",
81
+ "uv-bump>=0.3.1",
82
+ ]
83
+ test = [
84
+ # Testing dependencies
85
+ "pytest>=9.0.1",
86
+ "pytest-asyncio>=1.3.0",
87
+ ]
88
+
89
+ [build-system]
90
+ requires = ["uv_build>=0.9,<0.10"]
91
+ build-backend = "uv_build"
92
+
93
+ [tool.uv.build-backend]
94
+ # Exclude development documentation files from the built package
95
+ # These files are for repository contributors, not end users
96
+ wheel-exclude = ["**/AGENTS.md", "**/CLAUDE.md"]
@@ -0,0 +1,2 @@
1
+ # Your code goes here (add your code between this line and the EOF comment)
2
+ # End of file
@@ -0,0 +1,4 @@
1
+ from .cli import app
2
+
3
+
4
+ app()
@@ -0,0 +1,124 @@
1
+ # ABOUTME: Core CLI setup with AsyncTyper wrapper and base configuration
2
+ # ABOUTME: Provides main CLI entry point and logging configuration
3
+ import importlib.metadata
4
+ import inspect
5
+ from functools import partial, wraps
6
+ from importlib import import_module
7
+
8
+ import asyncer
9
+ import typer
10
+ from rich.console import Console
11
+ from rich.table import Table
12
+
13
+ from vibetuner.cli.run import run_app
14
+ from vibetuner.cli.scaffold import scaffold_app
15
+ from vibetuner.logging import LogLevel, logger, setup_logging
16
+
17
+
18
+ console = Console()
19
+
20
+
21
+ class AsyncTyper(typer.Typer):
22
+ def __init__(self, *args, **kwargs):
23
+ kwargs.setdefault("no_args_is_help", True)
24
+ super().__init__(*args, **kwargs)
25
+
26
+ @staticmethod
27
+ def maybe_run_async(decorator, f):
28
+ if inspect.iscoroutinefunction(f):
29
+
30
+ @wraps(f)
31
+ def runner(*args, **kwargs):
32
+ return asyncer.runnify(f)(*args, **kwargs)
33
+
34
+ decorator(runner)
35
+ else:
36
+ decorator(f)
37
+ return f
38
+
39
+ def callback(self, *args, **kwargs):
40
+ decorator = super().callback(*args, **kwargs)
41
+ return partial(self.maybe_run_async, decorator)
42
+
43
+ def command(self, *args, **kwargs):
44
+ decorator = super().command(*args, **kwargs)
45
+ return partial(self.maybe_run_async, decorator)
46
+
47
+
48
+ def _get_app_help():
49
+ try:
50
+ from vibetuner.config import settings
51
+
52
+ return f"{settings.project.project_name.title()} CLI"
53
+ except (RuntimeError, ImportError):
54
+ return "Vibetuner CLI"
55
+
56
+
57
+ app = AsyncTyper(help=_get_app_help())
58
+
59
+ LOG_LEVEL_OPTION = typer.Option(
60
+ LogLevel.INFO,
61
+ "--log-level",
62
+ "-l",
63
+ case_sensitive=False,
64
+ help="Set the logging level",
65
+ )
66
+
67
+
68
+ @app.callback()
69
+ def callback(log_level: LogLevel | None = LOG_LEVEL_OPTION) -> None:
70
+ """Initialize logging and other global settings."""
71
+ setup_logging(level=log_level)
72
+
73
+
74
+ @app.command()
75
+ def version(
76
+ show_app: bool = typer.Option(
77
+ False,
78
+ "--app",
79
+ "-a",
80
+ help="Show app settings version even if not in a project directory",
81
+ ),
82
+ ) -> None:
83
+ """Show version information."""
84
+ try:
85
+ # Get vibetuner package version
86
+ vibetuner_version = importlib.metadata.version("vibetuner")
87
+ except importlib.metadata.PackageNotFoundError:
88
+ vibetuner_version = "unknown"
89
+
90
+ # Create table for nice display
91
+ table = Table(title="Version Information")
92
+ table.add_column("Component", style="cyan", no_wrap=True)
93
+ table.add_column("Version", style="green", no_wrap=True)
94
+
95
+ # Always show vibetuner package version
96
+ table.add_row("vibetuner package", vibetuner_version)
97
+
98
+ # Show app version if requested or if in a project
99
+ try:
100
+ from vibetuner.config import CoreConfiguration
101
+
102
+ settings = CoreConfiguration()
103
+ table.add_row(f"{settings.project.project_name} settings", settings.version)
104
+ except Exception:
105
+ if show_app:
106
+ table.add_row("app settings", "not in project directory")
107
+ # else: don't show app version if not in project and not requested
108
+
109
+ console.print(table)
110
+
111
+
112
+ app.add_typer(run_app, name="run")
113
+ app.add_typer(scaffold_app, name="scaffold")
114
+
115
+ try:
116
+ import_module("app.cli")
117
+ except ModuleNotFoundError:
118
+ # Silent pass for missing app.cli module (expected in some projects)
119
+ pass
120
+ except ImportError as e:
121
+ # Log warning for any import error (including syntax errors, missing dependencies, etc.)
122
+ logger.warning(
123
+ f"Failed to import app.cli: {e}. User CLI commands will not be available."
124
+ )