alms-cli 0.1.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.
- alms_cli/__init__.py +3 -0
- alms_cli/__main__.py +5 -0
- alms_cli/commands/__init__.py +6 -0
- alms_cli/commands/info.py +73 -0
- alms_cli/commands/init.py +129 -0
- alms_cli/main.py +41 -0
- alms_cli/templates/__init__.py +1329 -0
- alms_cli/ui/__init__.py +23 -0
- alms_cli/ui/components.py +121 -0
- alms_cli-0.1.0.dist-info/METADATA +108 -0
- alms_cli-0.1.0.dist-info/RECORD +14 -0
- alms_cli-0.1.0.dist-info/WHEEL +4 -0
- alms_cli-0.1.0.dist-info/entry_points.txt +2 -0
- alms_cli-0.1.0.dist-info/licenses/LICENSE +21 -0
alms_cli/ui/__init__.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""UI components for beautiful terminal output."""
|
|
2
|
+
|
|
3
|
+
from alms_cli.ui.components import (
|
|
4
|
+
print_header,
|
|
5
|
+
print_step,
|
|
6
|
+
print_success,
|
|
7
|
+
print_error,
|
|
8
|
+
print_info,
|
|
9
|
+
print_warning,
|
|
10
|
+
create_progress,
|
|
11
|
+
print_tree,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"print_header",
|
|
16
|
+
"print_step",
|
|
17
|
+
"print_success",
|
|
18
|
+
"print_error",
|
|
19
|
+
"print_info",
|
|
20
|
+
"print_warning",
|
|
21
|
+
"create_progress",
|
|
22
|
+
"print_tree",
|
|
23
|
+
]
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"""Rich UI components for beautiful terminal output."""
|
|
2
|
+
|
|
3
|
+
from rich.console import Console
|
|
4
|
+
from rich.panel import Panel
|
|
5
|
+
from rich.tree import Tree
|
|
6
|
+
from rich.progress import Progress, SpinnerColumn, TextColumn, BarColumn, TimeElapsedColumn
|
|
7
|
+
from rich.table import Table
|
|
8
|
+
from rich import box
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
console = Console()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def print_header(title: str, subtitle: str = ""):
|
|
15
|
+
"""Print a beautiful header panel."""
|
|
16
|
+
content = f"[bold white]{title}[/bold white]"
|
|
17
|
+
if subtitle:
|
|
18
|
+
content += f"\n[dim]{subtitle}[/dim]"
|
|
19
|
+
|
|
20
|
+
console.print()
|
|
21
|
+
console.print(
|
|
22
|
+
Panel(
|
|
23
|
+
content,
|
|
24
|
+
box=box.ROUNDED,
|
|
25
|
+
border_style="blue",
|
|
26
|
+
padding=(1, 2),
|
|
27
|
+
)
|
|
28
|
+
)
|
|
29
|
+
console.print()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def print_step(step_num: int, total: int, message: str):
|
|
33
|
+
"""Print a step indicator."""
|
|
34
|
+
console.print(f"[bold blue]Step {step_num}/{total}:[/bold blue] {message}")
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def print_success(message: str):
|
|
38
|
+
"""Print a success message."""
|
|
39
|
+
console.print(f"[bold green]✓[/bold green] [green]{message}[/green]")
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def print_error(message: str):
|
|
43
|
+
"""Print an error message."""
|
|
44
|
+
console.print(f"[bold red]✗[/bold red] [red]{message}[/red]")
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def print_info(message: str):
|
|
48
|
+
"""Print an info message."""
|
|
49
|
+
console.print(f"[bold blue]ℹ[/bold blue] [blue]{message}[/blue]")
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def print_warning(message: str):
|
|
53
|
+
"""Print a warning message."""
|
|
54
|
+
console.print(f"[bold yellow]⚠[/bold yellow] [yellow]{message}[/yellow]")
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def create_progress():
|
|
58
|
+
"""Create a beautiful progress bar."""
|
|
59
|
+
return Progress(
|
|
60
|
+
SpinnerColumn(),
|
|
61
|
+
TextColumn("[bold blue]{task.description}"),
|
|
62
|
+
BarColumn(),
|
|
63
|
+
TextColumn("[progress.percentage]{task.percentage:>3.0f}%"),
|
|
64
|
+
TimeElapsedColumn(),
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def print_tree(directory: Path, prefix: str = ""):
|
|
69
|
+
"""Print a beautiful directory tree."""
|
|
70
|
+
tree = Tree(
|
|
71
|
+
f"[bold blue]{directory.name}[/bold blue]",
|
|
72
|
+
guide_style="blue",
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
def add_to_tree(path: Path, parent: Tree):
|
|
76
|
+
items = sorted(path.iterdir(), key=lambda x: (not x.is_dir(), x.name))
|
|
77
|
+
for item in items:
|
|
78
|
+
if item.name.startswith('.') or item.name == '__pycache__':
|
|
79
|
+
continue
|
|
80
|
+
|
|
81
|
+
if item.is_dir():
|
|
82
|
+
branch = parent.add(
|
|
83
|
+
f"[bold blue]{item.name}/[/bold blue]",
|
|
84
|
+
guide_style="blue",
|
|
85
|
+
)
|
|
86
|
+
add_to_tree(item, branch)
|
|
87
|
+
else:
|
|
88
|
+
parent.add(
|
|
89
|
+
f"[dim]{item.name}[/dim]",
|
|
90
|
+
guide_style="dim",
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
add_to_tree(directory, tree)
|
|
94
|
+
console.print(tree)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def print_project_summary(project_path: Path, files_created: int, features: list[str]):
|
|
98
|
+
"""Print a beautiful project summary panel."""
|
|
99
|
+
table = Table(
|
|
100
|
+
box=box.ROUNDED,
|
|
101
|
+
border_style="green",
|
|
102
|
+
title="[bold green]Project Created Successfully![/bold green]",
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
table.add_column("Property", style="bold blue")
|
|
106
|
+
table.add_column("Value", style="white")
|
|
107
|
+
|
|
108
|
+
table.add_row("Name", project_path.name)
|
|
109
|
+
table.add_row("Location", str(project_path))
|
|
110
|
+
table.add_row("Files Created", str(files_created))
|
|
111
|
+
table.add_row("Features", ", ".join(features))
|
|
112
|
+
|
|
113
|
+
console.print()
|
|
114
|
+
console.print(table)
|
|
115
|
+
console.print()
|
|
116
|
+
|
|
117
|
+
console.print("[bold]Next steps:[/bold]")
|
|
118
|
+
console.print(f" [dim]cd[/dim] [cyan]{project_path.name}[/cyan]")
|
|
119
|
+
console.print(f" [dim]uv sync[/dim]")
|
|
120
|
+
console.print(f" [dim]uv run -m src.api.main[/dim]")
|
|
121
|
+
console.print()
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: alms-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: ALMS CLI - Beautiful project scaffolding tool for AI-first backends
|
|
5
|
+
Project-URL: Homepage, https://github.com/KJ-AIML/alms
|
|
6
|
+
Project-URL: Repository, https://github.com/KJ-AIML/alms
|
|
7
|
+
Project-URL: Documentation, https://github.com/KJ-AIML/alms#readme
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/KJ-AIML/alms/issues
|
|
9
|
+
Author-email: Your Name <your.email@example.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai,alms,backend,cli,fastapi,scaffolding,starter-kit
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
20
|
+
Requires-Python: >=3.13
|
|
21
|
+
Requires-Dist: questionary>=2.0.0
|
|
22
|
+
Requires-Dist: rich>=13.7.0
|
|
23
|
+
Requires-Dist: typer>=0.12.0
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# ALMS CLI
|
|
27
|
+
|
|
28
|
+
> **Beautiful project scaffolding tool for AI-first backends.**
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
### Install via pip (Global)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install alms-cli
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Install via uv (Recommended)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
uv pip install alms-cli
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Run without installing (like uvx)
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
uvx alms-cli
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Usage
|
|
51
|
+
|
|
52
|
+
### Create a new project
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
alms init my-project
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Create a project non-interactively
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
alms init my-project --no-interactive
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Show project information
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
alms info
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Features
|
|
71
|
+
|
|
72
|
+
- Beautiful terminal UI with Rich
|
|
73
|
+
- Interactive prompts with Questionary
|
|
74
|
+
- Complete ALMS project scaffolding
|
|
75
|
+
- Feature selection (Database, Redis, AI Agents, Observability, Docker, CI/CD)
|
|
76
|
+
- Progress indicators and status updates
|
|
77
|
+
|
|
78
|
+
## Development
|
|
79
|
+
|
|
80
|
+
### Local development
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
cd cli
|
|
84
|
+
uv sync
|
|
85
|
+
uv run alms
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Build package
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
cd cli
|
|
92
|
+
uv pip install build
|
|
93
|
+
uv run python -m build
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Publish to PyPI
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Install twine
|
|
100
|
+
uv pip install twine
|
|
101
|
+
|
|
102
|
+
# Upload to PyPI
|
|
103
|
+
twine upload dist/*
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
MIT
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
alms_cli/__init__.py,sha256=fXCWZ4SBZGwiw0VqxN45Rj7vBHISEYCJ4dS3md8rMnw,76
|
|
2
|
+
alms_cli/__main__.py,sha256=EJNKgmlV2y9BNHoDeSAIw2zCuXV65EUjmOSoOjGBwhw,83
|
|
3
|
+
alms_cli/main.py,sha256=xvXsAuE0WocpT02q5qPLH4vXPkHE1sbSHpp3DDieuDs,1701
|
|
4
|
+
alms_cli/commands/__init__.py,sha256=0yOjHRNlOS6IsTvdRioKzwlVRFAcj2f9EW5LGoLc3p4,153
|
|
5
|
+
alms_cli/commands/info.py,sha256=DyTfrpfMxpl2zfIpB4BbGj6eehUhMxe3q6-coEbSGPI,2002
|
|
6
|
+
alms_cli/commands/init.py,sha256=aYtpN1hH-uRNpxcf2SHXnmOwOAC3YbTZIae-lbkTxvw,4213
|
|
7
|
+
alms_cli/templates/__init__.py,sha256=ynhlcsI4UNqCRZlGBLW0wkDBLclyk9ip32X1SjxqtbU,35645
|
|
8
|
+
alms_cli/ui/__init__.py,sha256=4P-Q94ZvnHMZE2Hu8Z9eEymezKio0kQXtC8vkXWQgqw,406
|
|
9
|
+
alms_cli/ui/components.py,sha256=_0b24asZtnnhEBjuMBZRtRcOw6WZobjWyNqpmH8nhmo,3600
|
|
10
|
+
alms_cli-0.1.0.dist-info/METADATA,sha256=l9fcTQTn7eIHFFUpmCL4X4e7pH2wgDUNlaZrz_ejH8M,2093
|
|
11
|
+
alms_cli-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
12
|
+
alms_cli-0.1.0.dist-info/entry_points.txt,sha256=N9S17YY-k6OjRqShRwxSXHb2S22WcsYWdKfVbAiuFcs,43
|
|
13
|
+
alms_cli-0.1.0.dist-info/licenses/LICENSE,sha256=bLUwa_kCLCthIiLMAsnR9p4SEQD2si88veoFYqOVSsE,1061
|
|
14
|
+
alms_cli-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ALMS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|