quickscale-cli 0.57.1__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.
@@ -0,0 +1,34 @@
1
+ """QuickScale CLI package.
2
+
3
+ Reads the canonical version from the repository-level `VERSION` file so the CLI
4
+ stays in sync with other packages when the release is bumped in one place.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pathlib import Path
10
+ from typing import Tuple
11
+
12
+ __author__ = "Experto AI"
13
+ __email__ = "victor@experto.ai"
14
+
15
+ # Prefer an embedded package-level `_version.py` if it exists (build step).
16
+ try:
17
+ from ._version import __version__ # type: ignore
18
+ except Exception:
19
+ _root = Path(__file__).resolve().parents[3]
20
+ _version_file = _root / "VERSION"
21
+ if _version_file.exists():
22
+ __version__ = _version_file.read_text(encoding="utf8").strip()
23
+ else:
24
+ __version__ = "0.0.0"
25
+
26
+ # Version tuple for programmatic access
27
+ parts = __version__.split("-")[0].split(".")
28
+ VERSION: Tuple[int, int, int] = (
29
+ int(parts[0]) if len(parts) > 0 else 0,
30
+ int(parts[1]) if len(parts) > 1 else 0,
31
+ int(parts[2]) if len(parts) > 2 else 0,
32
+ )
33
+
34
+ __all__ = ["__version__", "VERSION"]
@@ -0,0 +1,2 @@
1
+ # Auto-generated by scripts/version_tool.sh
2
+ __version__ = "0.57.0"
quickscale_cli/main.py ADDED
@@ -0,0 +1,81 @@
1
+ """QuickScale CLI - Main entry point for project generation commands."""
2
+
3
+ from pathlib import Path
4
+
5
+ import click
6
+
7
+ import quickscale_cli
8
+ import quickscale_core
9
+ from quickscale_core.generator import ProjectGenerator
10
+
11
+
12
+ @click.group()
13
+ @click.version_option(version=quickscale_cli.__version__, prog_name="quickscale")
14
+ def cli() -> None:
15
+ """QuickScale - Compose your Django SaaS."""
16
+ pass
17
+
18
+
19
+ @cli.command()
20
+ def version() -> None:
21
+ """Show version information for CLI and core packages."""
22
+ click.echo(f"QuickScale CLI v{quickscale_cli.__version__}")
23
+ click.echo(f"QuickScale Core v{quickscale_core.__version__}")
24
+
25
+
26
+ @cli.command()
27
+ @click.argument("project_name")
28
+ def init(project_name: str) -> None:
29
+ """Generate a new Django project with production-ready configurations."""
30
+ try:
31
+ # Initialize generator
32
+ generator = ProjectGenerator()
33
+
34
+ # Generate project in current directory
35
+ output_path = Path.cwd() / project_name
36
+
37
+ click.echo(f"šŸš€ Generating project: {project_name}")
38
+ generator.generate(project_name, output_path)
39
+
40
+ # Success message
41
+ click.secho(f"\nāœ… Created project: {project_name}", fg="green", bold=True)
42
+
43
+ # Next steps instructions
44
+ click.echo("\nšŸ“‹ Next steps:")
45
+ click.echo(f" cd {project_name}")
46
+ click.echo(" # Recommended: use Poetry for dependency management")
47
+ click.echo(" poetry install")
48
+ click.echo(" poetry run python manage.py migrate")
49
+ click.echo(" poetry run python manage.py runserver")
50
+ click.echo("\nšŸ“– See README.md for more details")
51
+
52
+ except ValueError as e:
53
+ # Invalid project name
54
+ click.secho(f"āŒ Error: {e}", fg="red", err=True)
55
+ click.echo("\nšŸ’” Tip: Project name must be a valid Python identifier", err=True)
56
+ click.echo(" - Use only letters, numbers, and underscores", err=True)
57
+ click.echo(" - Cannot start with a number", err=True)
58
+ click.echo(" - Cannot use Python reserved keywords", err=True)
59
+ raise click.Abort()
60
+ except FileExistsError as e:
61
+ # Directory already exists
62
+ click.secho(f"āŒ Error: {e}", fg="red", err=True)
63
+ click.echo(
64
+ "\nšŸ’” Tip: Choose a different project name or remove the existing directory", err=True
65
+ )
66
+ raise click.Abort()
67
+ except PermissionError as e:
68
+ # Permission issues
69
+ click.secho(f"āŒ Error: {e}", fg="red", err=True)
70
+ click.echo("\nšŸ’” Tip: Check directory permissions or try a different location", err=True)
71
+ raise click.Abort()
72
+ except Exception as e:
73
+ # Unexpected errors
74
+ click.secho(f"āŒ Unexpected error: {e}", fg="red", err=True)
75
+ click.echo("\nšŸ› This is a bug. Please report it at:", err=True)
76
+ click.echo(" https://github.com/Experto-AI/quickscale/issues", err=True)
77
+ raise
78
+
79
+
80
+ if __name__ == "__main__":
81
+ cli()
@@ -0,0 +1,24 @@
1
+ Metadata-Version: 2.1
2
+ Name: quickscale-cli
3
+ Version: 0.57.1
4
+ Summary: Command-line interface for QuickScale Django project generator
5
+ Home-page: https://github.com/Experto-AI/quickscale
6
+ License: Apache-2.0
7
+ Keywords: django,cli,project-generator,saas
8
+ Author: Experto AI
9
+ Author-email: victor@experto.ai
10
+ Requires-Python: >=3.10,<4.0
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Framework :: Django
13
+ Classifier: Framework :: Django :: 4.2
14
+ Classifier: Framework :: Django :: 5.0
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Requires-Dist: click (>=8.1.0,<9.0.0)
22
+ Requires-Dist: quickscale-core (>=0.57.1,<0.58.0)
23
+ Project-URL: Documentation, https://github.com/Experto-AI/quickscale/tree/main/docs
24
+ Project-URL: Repository, https://github.com/Experto-AI/quickscale
@@ -0,0 +1,7 @@
1
+ quickscale_cli/__init__.py,sha256=vjfSGsN08XWPQ3ofZkw9PyhI008B1-wKlXGKcpCNXUc,1007
2
+ quickscale_cli/_version.py,sha256=_8Qyl6t7S-WivPtIA_jkDZ9ZL6t0k2oYm8kziHiAxvI,67
3
+ quickscale_cli/main.py,sha256=d4W_xQis14iXhzkLJ6ceRksXjoOOXrjwuH09LzC189Q,2933
4
+ quickscale_cli-0.57.1.dist-info/METADATA,sha256=LHXjIehGeTiVh6EpZQRZh0Sbg6VHBIjitAmjB95iQQs,1027
5
+ quickscale_cli-0.57.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
+ quickscale_cli-0.57.1.dist-info/entry_points.txt,sha256=z20_2c7RNhNf1gt6xeP03UZ9zVoTYLvE_ltUF_pCDC4,54
7
+ quickscale_cli-0.57.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 1.9.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ quickscale=quickscale_cli.main:cli
3
+