vibetuner 2.9.4__py3-none-any.whl → 2.11.0__py3-none-any.whl
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.
- vibetuner/cli/__init__.py +11 -2
- vibetuner/cli/scaffold.py +35 -37
- {vibetuner-2.9.4.dist-info → vibetuner-2.11.0.dist-info}/METADATA +1 -1
- {vibetuner-2.9.4.dist-info → vibetuner-2.11.0.dist-info}/RECORD +6 -6
- {vibetuner-2.9.4.dist-info → vibetuner-2.11.0.dist-info}/WHEEL +0 -0
- {vibetuner-2.9.4.dist-info → vibetuner-2.11.0.dist-info}/entry_points.txt +0 -0
vibetuner/cli/__init__.py
CHANGED
|
@@ -10,7 +10,6 @@ from rich.console import Console
|
|
|
10
10
|
|
|
11
11
|
from vibetuner.cli.run import run_app
|
|
12
12
|
from vibetuner.cli.scaffold import scaffold_app
|
|
13
|
-
from vibetuner.config import settings
|
|
14
13
|
from vibetuner.logging import LogLevel, setup_logging
|
|
15
14
|
|
|
16
15
|
|
|
@@ -44,7 +43,16 @@ class AsyncTyper(typer.Typer):
|
|
|
44
43
|
return partial(self.maybe_run_async, decorator)
|
|
45
44
|
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
def _get_app_help():
|
|
47
|
+
try:
|
|
48
|
+
from vibetuner.config import settings
|
|
49
|
+
|
|
50
|
+
return f"{settings.project.project_name.title()} CLI"
|
|
51
|
+
except (RuntimeError, ImportError):
|
|
52
|
+
return "Vibetuner CLI"
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
app = AsyncTyper(help=_get_app_help())
|
|
48
56
|
|
|
49
57
|
LOG_LEVEL_OPTION = typer.Option(
|
|
50
58
|
LogLevel.INFO,
|
|
@@ -68,3 +76,4 @@ try:
|
|
|
68
76
|
import_module("app.cli")
|
|
69
77
|
except (ImportError, ModuleNotFoundError):
|
|
70
78
|
pass
|
|
79
|
+
# Cache buster
|
vibetuner/cli/scaffold.py
CHANGED
|
@@ -15,16 +15,6 @@ scaffold_app = typer.Typer(
|
|
|
15
15
|
)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
def get_template_path() -> Path:
|
|
19
|
-
"""Get the path to the vibetuner template directory."""
|
|
20
|
-
# This file is at: vibetuner-py/src/vibetuner/cli/scaffold.py
|
|
21
|
-
# Template is at: ./ (root of repo)
|
|
22
|
-
current_file = Path(__file__).resolve()
|
|
23
|
-
# Go up: scaffold.py -> cli -> vibetuner -> src -> vibetuner-py -> repo_root
|
|
24
|
-
template_path = current_file.parent.parent.parent.parent.parent
|
|
25
|
-
return template_path
|
|
26
|
-
|
|
27
|
-
|
|
28
18
|
@scaffold_app.command(name="new")
|
|
29
19
|
def new(
|
|
30
20
|
destination: Annotated[
|
|
@@ -34,14 +24,6 @@ def new(
|
|
|
34
24
|
exists=False,
|
|
35
25
|
),
|
|
36
26
|
],
|
|
37
|
-
template: Annotated[
|
|
38
|
-
str | None,
|
|
39
|
-
typer.Option(
|
|
40
|
-
"--template",
|
|
41
|
-
"-t",
|
|
42
|
-
help="Template source (git URL, local path, or github:user/repo). Defaults to local vibetuner template.",
|
|
43
|
-
),
|
|
44
|
-
] = None,
|
|
45
27
|
defaults: Annotated[
|
|
46
28
|
bool,
|
|
47
29
|
typer.Option(
|
|
@@ -57,6 +39,14 @@ def new(
|
|
|
57
39
|
help="Override template variables in key=value format (can be used multiple times)",
|
|
58
40
|
),
|
|
59
41
|
] = None,
|
|
42
|
+
branch: Annotated[
|
|
43
|
+
str | None,
|
|
44
|
+
typer.Option(
|
|
45
|
+
"--branch",
|
|
46
|
+
"-b",
|
|
47
|
+
help="Use specific branch/tag from the vibetuner template repository",
|
|
48
|
+
),
|
|
49
|
+
] = None,
|
|
60
50
|
) -> None:
|
|
61
51
|
"""Create a new project from the vibetuner template.
|
|
62
52
|
|
|
@@ -71,24 +61,28 @@ def new(
|
|
|
71
61
|
# Override specific values
|
|
72
62
|
vibetuner scaffold new my-project --data project_name="My App" --data python_version="3.13"
|
|
73
63
|
|
|
74
|
-
# Use
|
|
75
|
-
vibetuner scaffold new my-project --
|
|
76
|
-
vibetuner scaffold new my-project --template /path/to/template
|
|
64
|
+
# Use specific branch for testing
|
|
65
|
+
vibetuner scaffold new my-project --branch fix/scaffold-command
|
|
77
66
|
"""
|
|
78
|
-
#
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
67
|
+
# Use the official vibetuner template from GitHub
|
|
68
|
+
template_src = "gh:alltuner/vibetuner"
|
|
69
|
+
vcs_ref = branch or "main" # Use specified branch or default to main
|
|
70
|
+
|
|
71
|
+
if branch:
|
|
72
|
+
console.print(
|
|
73
|
+
f"[dim]Using vibetuner template from GitHub ({branch} branch)[/dim]"
|
|
74
|
+
)
|
|
82
75
|
else:
|
|
83
|
-
|
|
84
|
-
console.print(f"[dim]Using template: {template_src}[/dim]")
|
|
76
|
+
console.print("[dim]Using vibetuner template from GitHub (main branch)[/dim]")
|
|
85
77
|
|
|
86
78
|
# Parse data overrides
|
|
87
79
|
data_dict = {}
|
|
88
80
|
if data:
|
|
89
81
|
for item in data:
|
|
90
82
|
if "=" not in item:
|
|
91
|
-
console.print(
|
|
83
|
+
console.print(
|
|
84
|
+
f"[red]Error: Invalid data format '{item}'. Expected key=value[/red]"
|
|
85
|
+
)
|
|
92
86
|
raise typer.Exit(code=1)
|
|
93
87
|
key, value = item.split("=", 1)
|
|
94
88
|
data_dict[key] = value
|
|
@@ -115,26 +109,27 @@ def new(
|
|
|
115
109
|
defaults=defaults,
|
|
116
110
|
quiet=defaults, # Suppress prompts when using defaults
|
|
117
111
|
unsafe=True, # Allow running post-generation tasks
|
|
112
|
+
vcs_ref=vcs_ref, # Use the specified branch or default to main
|
|
118
113
|
)
|
|
119
114
|
|
|
120
|
-
console.print(
|
|
121
|
-
console.print(
|
|
115
|
+
console.print("\n[green]✓ Project created successfully![/green]")
|
|
116
|
+
console.print("\nNext steps:")
|
|
122
117
|
console.print(f" cd {destination}")
|
|
123
|
-
console.print(
|
|
118
|
+
console.print(" just dev")
|
|
124
119
|
|
|
125
120
|
except Exception as e:
|
|
126
121
|
console.print(f"[red]Error creating project: {e}[/red]")
|
|
127
|
-
raise typer.Exit(code=1)
|
|
122
|
+
raise typer.Exit(code=1) from None
|
|
128
123
|
|
|
129
124
|
|
|
130
125
|
@scaffold_app.command(name="update")
|
|
131
126
|
def update(
|
|
132
127
|
path: Annotated[
|
|
133
|
-
Path,
|
|
128
|
+
Path | None,
|
|
134
129
|
typer.Argument(
|
|
135
130
|
help="Path to the project to update",
|
|
136
131
|
),
|
|
137
|
-
] =
|
|
132
|
+
] = None,
|
|
138
133
|
skip_answered: Annotated[
|
|
139
134
|
bool,
|
|
140
135
|
typer.Option(
|
|
@@ -160,6 +155,9 @@ def update(
|
|
|
160
155
|
# Re-prompt for all questions
|
|
161
156
|
vibetuner scaffold update --no-skip-answered
|
|
162
157
|
"""
|
|
158
|
+
if path is None:
|
|
159
|
+
path = Path.cwd()
|
|
160
|
+
|
|
163
161
|
if not path.exists():
|
|
164
162
|
console.print(f"[red]Error: Directory does not exist: {path}[/red]")
|
|
165
163
|
raise typer.Exit(code=1)
|
|
@@ -168,7 +166,7 @@ def update(
|
|
|
168
166
|
answers_file = path / ".copier-answers.yml"
|
|
169
167
|
if not answers_file.exists():
|
|
170
168
|
console.print(
|
|
171
|
-
|
|
169
|
+
"[red]Error: Not a copier project (missing .copier-answers.yml)[/red]"
|
|
172
170
|
)
|
|
173
171
|
console.print(f"[yellow]Directory: {path}[/yellow]")
|
|
174
172
|
raise typer.Exit(code=1)
|
|
@@ -182,8 +180,8 @@ def update(
|
|
|
182
180
|
unsafe=True, # Allow running post-generation tasks
|
|
183
181
|
)
|
|
184
182
|
|
|
185
|
-
console.print(
|
|
183
|
+
console.print("\n[green]✓ Project updated successfully![/green]")
|
|
186
184
|
|
|
187
185
|
except Exception as e:
|
|
188
186
|
console.print(f"[red]Error updating project: {e}[/red]")
|
|
189
|
-
raise typer.Exit(code=1)
|
|
187
|
+
raise typer.Exit(code=1) from None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: vibetuner
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.11.0
|
|
4
4
|
Summary: Core Python framework and blessed dependencies for production-ready FastAPI + MongoDB + HTMX projects
|
|
5
5
|
Keywords: fastapi,mongodb,htmx,web-framework,scaffolding,oauth,background-jobs
|
|
6
6
|
Author: All Tuner Labs, S.L.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
vibetuner/__init__.py,sha256=rFIVCmxkKTT_g477V8biCw0lgpudyuUabXhYxg189lY,90
|
|
2
2
|
vibetuner/__main__.py,sha256=Ye9oBAgXhcYQ4I4yZli3TIXF5lWQ9yY4tTPs4XnDDUY,29
|
|
3
|
-
vibetuner/cli/__init__.py,sha256=
|
|
3
|
+
vibetuner/cli/__init__.py,sha256=IY2wJ_ErX2PimyYSe5SL_zGrENSWLgW-cXgMRXNC7pE,1992
|
|
4
4
|
vibetuner/cli/run.py,sha256=mHvZypizNfVwdLo7k8SvBO7HPUF4Vka9hjJlECZCGfA,5009
|
|
5
|
-
vibetuner/cli/scaffold.py,sha256=
|
|
5
|
+
vibetuner/cli/scaffold.py,sha256=qADWxx1gYECQ8N6dgvJmlucT6mZ29rxWu3VZhbWmhC0,5710
|
|
6
6
|
vibetuner/config.py,sha256=R3u23RHv5gcVuU27WEo-8MrSZYbqSNbALJJKR3ACaQQ,3714
|
|
7
7
|
vibetuner/context.py,sha256=VdgfX-SFmVwiwKPFID4ElIRnFADTlagqsh9RKXNiLCs,725
|
|
8
8
|
vibetuner/frontend/AGENTS.md,sha256=mds0nTl3RBblTA7EFhC9dxx86mn1FH5ESXNSj_1R1Jk,3253
|
|
@@ -80,7 +80,7 @@ vibetuner/templates/markdown/CLAUDE.md,sha256=jcvoQNazCj-t54s0gr-4_qyxLMP8iPf2ur
|
|
|
80
80
|
vibetuner/templates.py,sha256=xRoMb_oyAI5x4kxfpg56UcLKkT8e9HVn-o3KFAu9ISE,5094
|
|
81
81
|
vibetuner/time.py,sha256=3_DtveCCzI20ocTnAlTh2u7FByUXtINaUoQZO-_uZow,1188
|
|
82
82
|
vibetuner/versioning.py,sha256=UAHGoNsv3QEPAJgHyt_Q8I26SW7ng2FnZlX2-0M6r6U,156
|
|
83
|
-
vibetuner-2.
|
|
84
|
-
vibetuner-2.
|
|
85
|
-
vibetuner-2.
|
|
86
|
-
vibetuner-2.
|
|
83
|
+
vibetuner-2.11.0.dist-info/WHEEL,sha256=5w2T7AS2mz1-rW9CNagNYWRCaB0iQqBMYLwKdlgiR4Q,78
|
|
84
|
+
vibetuner-2.11.0.dist-info/entry_points.txt,sha256=aKIj9YCCXizjYupx9PeWkUJePg3ncHke_LTS5rmCsfs,49
|
|
85
|
+
vibetuner-2.11.0.dist-info/METADATA,sha256=fSFf5ynkVZal1FlfTcC8BRIp3EjnGim7_NkPaElO5GY,8043
|
|
86
|
+
vibetuner-2.11.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|