vibetuner 2.26.6__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.

Potentially problematic release.


This version of vibetuner might be problematic. Click here for more details.

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