quickscale-cli 0.60.0__tar.gz → 0.61.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: quickscale-cli
3
- Version: 0.60.0
3
+ Version: 0.61.0
4
4
  Summary: Command-line interface for QuickScale Django project generator
5
5
  Home-page: https://github.com/Experto-AI/quickscale
6
6
  License: Apache-2.0
@@ -19,7 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Requires-Dist: click (>=8.1.0,<9.0.0)
22
- Requires-Dist: quickscale-core (>=0.60.0,<0.61.0)
22
+ Requires-Dist: quickscale-core (>=0.61.0,<0.62.0)
23
23
  Project-URL: Documentation, https://github.com/Experto-AI/quickscale/tree/main/docs
24
24
  Project-URL: Repository, https://github.com/Experto-AI/quickscale
25
25
  Description-Content-Type: text/markdown
@@ -144,6 +144,11 @@ See [competitive_analysis.md](./docs/overview/competitive_analysis.md) for detai
144
144
  # Create your first project
145
145
  quickscale init myapp
146
146
  cd myapp
147
+
148
+ # Or choose a specific theme (v0.61.0+)
149
+ # quickscale init myapp --theme starter_html # Default HTML theme
150
+ # quickscale init myapp --theme starter_htmx # HTMX theme (coming in v0.67.0)
151
+ # quickscale init myapp --theme starter_react # React theme (coming in v0.68.0)
147
152
  ```
148
153
 
149
154
  **Choose your development workflow:**
@@ -118,6 +118,11 @@ See [competitive_analysis.md](./docs/overview/competitive_analysis.md) for detai
118
118
  # Create your first project
119
119
  quickscale init myapp
120
120
  cd myapp
121
+
122
+ # Or choose a specific theme (v0.61.0+)
123
+ # quickscale init myapp --theme starter_html # Default HTML theme
124
+ # quickscale init myapp --theme starter_htmx # HTMX theme (coming in v0.67.0)
125
+ # quickscale init myapp --theme starter_react # React theme (coming in v0.68.0)
121
126
  ```
122
127
 
123
128
  **Choose your development workflow:**
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "quickscale-cli"
3
- version = "0.60.0"
3
+ version = "0.61.0"
4
4
  description = "Command-line interface for QuickScale Django project generator"
5
5
  authors = ["Experto AI <victor@experto.ai>"]
6
6
  license = "Apache-2.0"
@@ -26,7 +26,7 @@ packages = [{include = "quickscale_cli", from = "src"}]
26
26
  [tool.poetry.dependencies]
27
27
  python = "^3.10"
28
28
  click = "^8.1.0"
29
- quickscale-core = "^0.60.0"
29
+ quickscale-core = "^0.61.0"
30
30
 
31
31
  [tool.poetry.group.dev.dependencies]
32
32
  pytest = "^7.4.0"
@@ -1,2 +1,2 @@
1
1
  # Auto-generated by scripts/version_tool.sh
2
- __version__ = "0.60.0"
2
+ __version__ = "0.61.0"
@@ -11,6 +11,24 @@ from quickscale_cli.commands.development_commands import down, logs, manage, ps,
11
11
  from quickscale_core.generator import ProjectGenerator
12
12
 
13
13
 
14
+ class InitCommand(click.Command):
15
+ """Custom init command with enhanced error messages."""
16
+
17
+ def parse_args(self, ctx, args):
18
+ """Override parse_args to provide better error messages."""
19
+ try:
20
+ return super().parse_args(ctx, args)
21
+ except click.MissingParameter as e:
22
+ if "project_name" in str(e).lower() or "PROJECT_NAME" in str(e):
23
+ click.secho("\n❌ Error: PROJECT_NAME is required", fg="red", err=True)
24
+ click.echo("\n💡 Usage examples:", err=True)
25
+ click.echo(" quickscale init myapp", err=True)
26
+ click.echo(" quickscale init myapp --theme starter_html", err=True)
27
+ click.echo("\n📖 For more help, run: quickscale init --help", err=True)
28
+ ctx.exit(2)
29
+ raise
30
+
31
+
14
32
  @click.group()
15
33
  @click.version_option(version=quickscale_cli.__version__, prog_name="quickscale")
16
34
  def cli() -> None:
@@ -37,22 +55,51 @@ cli.add_command(ps)
37
55
  cli.add_command(deploy)
38
56
 
39
57
 
40
- @cli.command()
41
- @click.argument("project_name")
42
- def init(project_name: str) -> None:
43
- """Generate a new Django project with production-ready configurations."""
58
+ @cli.command(cls=InitCommand)
59
+ @click.argument("project_name", required=True, metavar="PROJECT_NAME")
60
+ @click.option(
61
+ "--theme",
62
+ type=click.Choice(["starter_html", "starter_htmx", "starter_react"], case_sensitive=False),
63
+ default="starter_html",
64
+ help="Theme to use for the project (default: starter_html)",
65
+ )
66
+ def init(project_name: str, theme: str) -> None:
67
+ """
68
+ Generate a new Django project with production-ready configurations.
69
+
70
+ \b
71
+ Examples:
72
+ quickscale init myapp # Create project with default HTML theme
73
+ quickscale init myapp --theme starter_html # Explicitly specify HTML theme
74
+
75
+ \b
76
+ Choose from available themes:
77
+ - starter_html: Pure HTML + CSS (default, production-ready)
78
+ - starter_htmx: HTMX + Alpine.js (coming in v0.67.0)
79
+ - starter_react: React + TypeScript SPA (coming in v0.68.0)
80
+ """
44
81
  try:
45
- # Initialize generator
46
- generator = ProjectGenerator()
82
+ # Validate theme availability
83
+ if theme in ["starter_htmx", "starter_react"]:
84
+ click.secho(f"❌ Error: Theme '{theme}' is not yet implemented", fg="red", err=True)
85
+ click.echo(f"\n💡 The '{theme}' theme is planned for a future release:", err=True)
86
+ click.echo(" - starter_htmx: Coming in v0.67.0", err=True)
87
+ click.echo(" - starter_react: Coming in v0.68.0", err=True)
88
+ click.echo("\n📖 For now, use the default 'starter_html' theme", err=True)
89
+ raise click.Abort()
90
+
91
+ # Initialize generator with theme
92
+ generator = ProjectGenerator(theme=theme)
47
93
 
48
94
  # Generate project in current directory
49
95
  output_path = Path.cwd() / project_name
50
96
 
51
97
  click.echo(f"🚀 Generating project: {project_name}")
98
+ click.echo(f"🎨 Using theme: {theme}")
52
99
  generator.generate(project_name, output_path)
53
100
 
54
101
  # Success message
55
- click.secho(f"\n✅ Created project: {project_name}", fg="green", bold=True)
102
+ click.secho(f"\n✅ Created project: {project_name} (theme: {theme})", fg="green", bold=True)
56
103
 
57
104
  # Next steps instructions
58
105
  click.echo("\n📋 Next steps:")
@@ -63,6 +110,9 @@ def init(project_name: str) -> None:
63
110
  click.echo(" poetry run python manage.py runserver")
64
111
  click.echo("\n📖 See README.md for more details")
65
112
 
113
+ except click.Abort:
114
+ # Re-raise click.Abort without catching it as a generic exception
115
+ raise
66
116
  except ValueError as e:
67
117
  # Invalid project name
68
118
  click.secho(f"❌ Error: {e}", fg="red", err=True)